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 |
---|---|---|---|---|---|---|
reads the text from the whole file
|
public static String readWholeFile(String filename) {
try {
Scanner scanner = new Scanner(new File(filename));
//scanner.useDelimiter("\\Z");
String returnString = "";
while (scanner.hasNextLine()) {
returnString += scanner.nextLine();
returnString += System.lineSeparator();
}
return returnString;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void readTextFile(String path) throws IOException {\n FileReader fileReader=new FileReader(path);\n BufferedReader bufferedReader=new BufferedReader(fileReader);\n String value=null;\n while((value=bufferedReader.readLine())!=null){\n System.out.println(value);\n }\n }",
"public String readTextFromFile()\n\t{\n\t\tString fileText = \"\";\n\t\tString filePath = \"/Users/zcon5199/Documents/\";\n\t\tString fileName = filePath + \"saved text.txt\";\n\t\tFile inputFile = new File(fileName);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner fileScanner = new Scanner(inputFile);\n\t\t\twhile(fileScanner.hasNext())\n\t\t\t{\n\t\t\t\tfileText += fileScanner.nextLine() + \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tfileScanner.close();\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException fileException)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(baseFrame, \"the file is not here :/\");\n\t\t}\n\t\t\n\t\treturn fileText;\n\t}",
"public String readFile(File file) {\r\n\t\tString line;\r\n\t\tString allText = \"\";\r\n\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(file))) {\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\r\n\t\t\t\tallText += line + \"\\n\";\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn allText;\r\n\t}",
"String readText(FsPath path);",
"private void get_text() {\n InputStream inputStream = JsonUtil.class.getClassLoader().getResourceAsStream(\"data.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n this.text = sb.toString().trim();\n }",
"public String getFileText(String filePath) {\n String fileText = \"\"; \n \n File myFile = new File(filePath);\n Scanner myReader; \n \n try {\n myReader = new Scanner(myFile);\n \n while(myReader.hasNext()) {\n fileText+= myReader.nextLine() + \"\\n\"; \n }\n \n } catch (FileNotFoundException ex) {\n logger.log(Level.SEVERE, \"Error getting text from text file\", ex.getMessage()); \n }\n \n return fileText; \n }",
"private static String getText(IFile file) throws CoreException, IOException {\n\t\tInputStream in = file.getContents();\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tbyte[] buf = new byte[1024];\n\t\tint read = in.read(buf);\n\t\twhile (read > 0) {\n\t\t\tout.write(buf, 0, read);\n\t\t\tread = in.read(buf);\n\t\t}\n\t\treturn out.toString();\n\t}",
"public void readFromFile() {\n\n\t}",
"private static void ReadText(String path) {\n\t\t//reads the file, throws an error if there is no file to open\n\t\ttry {\n\t\t\tinput = new Scanner(new File(path));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error opening file...\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString line; //stores the string of text from the .txt file\n\t\tString parsedWord; //Stores the word of the parsed word\n\t\tint wordLength; //Stores the length of the word\n\t\tint lineNum = 1; //Stores the number of line\n\t\ttry {\n\t\t\t//loops while there is still a new line in the .txt file\n\t\t\twhile ((line = input.nextLine()) != null) {\n\t\t\t\t//separates the lines by words\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t//loops while there are still more words in the line\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tparsedWord = st.nextToken();\n\t\t\t\t\twordLength = parsedWord.length();\n\t\t\t\t\t//Regex gets rid of all punctuation\n\t\t\t\t\tif (parsedWord.matches(\".*\\\\p{Punct}\")) {\n\t\t\t\t\t\tparsedWord = parsedWord.substring(0, wordLength - 1);\n\t\t\t\t\t}\n\t\t\t\t\t//add the word to the list\n\t\t\t\t\twordList.add(parsedWord);\n\t\t\t\t\tlineList.add(lineNum);\n\t\t\t\t}\n\t\t\t\tlineNum++;\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Do nothing\n\t\t}\n\t\tinput.close();\n\t}",
"private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}",
"public String readText(String _filename) {\r\n\t\treturn readText(_filename, \"text\", (java.net.URL) null);\r\n\t}",
"public void readFile();",
"private static String readTextFile(File file) throws IOException {\n return Files.lines(file.toPath()).collect(Collectors.joining(\"\\n\"));\n }",
"@Override\n\tpublic void ReadTextFile() {\n\t\t// Using Buffered Stream I/O\n\t\ttry (BufferedInputStream in = new BufferedInputStream(new FileInputStream(inFileStr))) {\n\t\t\tbyte[] contents = new byte[bufferSize];\n\t\t\tstartTime = System.nanoTime();\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(contents)) != -1) {\n\t\t\t\tsnippets.add(new String(contents));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}",
"private static void readFile() throws IOException\r\n\t{\r\n\t\tString s1;\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\tSystem.out.println(\"\\ndbs3.txt File\");\r\n\t\twhile ((s1 = br.readLine())!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(s1);\r\n\t\t}//end while loop to read files\r\n\t\t\r\n\t\tbr.close();//close the buffered reader\r\n\t}",
"@Override\n\tpublic void ReadTextFile() {\n\t\t// Using a programmer-managed byte-array\n\t\ttry (FileInputStream in = new FileInputStream(inFileStr)) {\n\t\t\tstartTime = System.nanoTime();\n\t\t\tbyte[] byteArray = new byte[bufferSize];\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(byteArray)) != -1) {\n\t\t\t\tsnippets.add(new String(byteArray));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public String read() {\n\t\tStringBuffer text = new StringBuffer((int)file.length());\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\tString line;\n\t\t\tString ret = \"\\n\";\n\t\t\twhile (!eof) {\n\t\t\t\tline = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\ttext.append(line);\n\t\t\t\t\ttext.append(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\treturn text.toString();\n\t}",
"public void readText(String filename) throws IOException{\n\t\t\n\t\tif(sentences == null){\n\t\t\tsentences = new ArrayList<Sentence>();\n\t\t}\n\t\t\n\t\t//read from file\n\t\tFileInputStream inputStream = new FileInputStream(filename);\n\t\tDataInputStream stream = new DataInputStream(inputStream);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line;\n\t\twhile((line = reader.readLine()) != null){\n\t\t\tsentences.add(new Sentence(line));\n\t\t}\n\t\treader.close();\n\t\tstream.close();\n\t\tinputStream.close();\n\t\t\n\t\t\n\t}",
"public abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;",
"public static String getTextFromFile(File file) {\n InputStream fis = null;\n InputStreamReader isr = null;\n BufferedReader bufferedReader = null;\n StringBuilder sb = new StringBuilder(\"\");\n try {\n fis = new FileInputStream(file);\n isr = new InputStreamReader(fis);\n bufferedReader = new BufferedReader(isr);\n String line;\n while ((line = bufferedReader.readLine()) != null) sb.append(line);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fis != null && isr != null && bufferedReader != null) {\n try {\n fis.close();\n isr.close();\n bufferedReader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }",
"private String readFile(String file) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n\n try (Stream<String> stream = Files.lines(Paths.get(file), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n\n return contentBuilder.toString();\n\n }",
"public String readFile(){\n\t\tString res = \"\";\n\t\t\n\t\tFile log = new File(filePath);\n\t\tBufferedReader bf = null;\n\t\t\n\t\ttry{\n\t\t\tbf = new BufferedReader(new FileReader(log));\n\t\t\tString line = bf.readLine();\n\t\t\n\t\t\n\t\t\twhile (line != null){\n\t\t\t\tres += line+\"\\n\";\n\t\t\t\tline = bf.readLine();\n\t\t\t}\n\t\t\n\t\t\treturn res;\n\t\t}\n\t\tcatch(Exception oops){\n\t\t\tSystem.err.println(\"There was an error reading the file \"+oops.getStackTrace());\n\t\t\treturn \"\";\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tbf.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"There was an error closing the read Buffer \"+e.getStackTrace());\n\t\t\t}\n\t\t}\n\t}",
"public String readFromFile(String path) {\n BufferedReader br = null;\n String returnString =\"\";\n try {\n String sCurrentLine;\n br = new BufferedReader(new FileReader(path));\n while ((sCurrentLine = br.readLine()) != null) {\n returnString+=sCurrentLine;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null)br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n return returnString;\n }",
"private String readFile() {\n try {\n BufferedReader in = new BufferedReader(new FileReader(\"C:\\\\Users\"\n + \"\\\\MohammadLoqman\\\\cs61b\\\\sp19-s1547\"\n + \"\\\\proj3\\\\byow\\\\Core\\\\previousGame.txt\"));\n StringBuilder sb = new StringBuilder();\n String toLoad;\n try {\n toLoad = in.readLine();\n while (toLoad != null) {\n sb.append(toLoad);\n sb.append(System.lineSeparator());\n toLoad = in.readLine();\n }\n String everything = sb.toString();\n return everything;\n } catch (IOException E) {\n System.out.println(\"do nothin\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found\");\n }\n return null;\n\n }",
"public String read(File file) throws IOException {\n\t\t\tInputStream is = null;\r\n\t\t\tis = new FileInputStream(file);\r\n\t\t\t\r\n\t\t\tAccessTextFile test = new AccessTextFile();\r\n//\t\t\tInputStream is = new FileInputStream(\"E:\\\\test.txt\");\r\n\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\ttest.readToBuffer(buffer, is);\r\n\t\t\tSystem.out.println(buffer); // 将读到 buffer 中的内容写出来\r\n\t\t\tis.close();\t\t\r\n\t\t\treturn buffer.toString();\r\n\t\t }",
"public static String readFile() {\n\t\tFileReader file;\n\t\tString textFile = \"\";\n\n\t\ttry {\n\t\t\tfile = new FileReader(path);\n\n\t\t\t// Output string.\n\t\t\ttextFile = new String();\n\n\t\t\tBufferedReader bfr = new BufferedReader(file);\n\n\t\t\ttextFile= bfr.readLine();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading the file\");\n\t\t}\n\t\treturn textFile;\n\n\t}",
"public String readFileContents(String filename) {\n return null;\n\n }",
"static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}",
"public void readFile(String name) {\n\t\tString filename = this.path + name;\n\t\tFile file = new File(filename);\n\t\t\n\t\t\n\t\ttry {\t\t \n\t\t\tScanner reader = new Scanner(file);\n\t\t\t\n\t\t\twhile (reader.hasNextLine()) {\n\t\t\t\tString data = reader.nextLine();\n\t\t System.out.println(data);\n\t\t\t}\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t System.out.println(\"File not found!\");\n\t\t} \n\t}",
"public void read_file(String filename)\n {\n out.println(\"READ\");\n out.println(filename);\n try\n {\n String content = null;\n content = in.readLine();\n System.out.println(\"READ content : \"+content);\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }",
"public String readFromFile() throws IOException {\n return br.readLine();\n }",
"public String ReadFile() throws IOException {\n File file = context.getFilesDir();\n File textfile = new File(file + \"/\" + this.fileName);\n\n FileInputStream input = context.openFileInput(this.fileName);\n byte[] buffer = new byte[(int)textfile.length()];\n\n input.read(buffer);\n\n return new String(buffer);\n }",
"public static String readTextStream(String filename) throws IOException {\n StringBuffer sb = new StringBuffer();\n BufferedReader fileReader = new BufferedReader(new InputStreamReader(FileHelper.class.getClassLoader().getResourceAsStream(filename)));\n FileHelper.read(sb, fileReader);\n return sb.toString();\n }",
"public static void demoReadAll(){\n try{\n //Read entire file bytes. Return in byte format. Don't need to close() after use. \n byte[] b = Files.readAllBytes(Paths.get(\"country.txt\"));\n String s = new String(b);\n System.out.println(s);\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }",
"public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}",
"private static String readFile(File file) {\n String result = \"\";\n\n try (BufferedReader bufferedReader = new BufferedReader(\n new FileReader(file))) {\n result = bufferedReader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"public String getContents(File file) {\n\t //...checks on file are elided\n\t StringBuilder contents = new StringBuilder();\n\t \n\t try {\n\t //use buffering, reading one line at a time\n\t //FileReader always assumes default encoding is OK!\n\t BufferedReader input = new BufferedReader(new FileReader(file));\n\t try {\n\t String line = null; \n\n\t while (( line = input.readLine()) != null){\n\t contents.append(line);\n\t contents.append(\"\\r\\n\");\t }\n\t }\n\t finally {\n\t input.close();\n\t }\n\t }\n\t catch (IOException ex){\n\t log.error(\"Greska prilikom citanja iz fajla: \"+ex);\n\t }\n\t \n\t return contents.toString();\n\t}",
"@SuppressWarnings(\"unused\")\n private String readFile(File f) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n StringBuilder builder = new StringBuilder();\n while (line != null) {\n builder.append(line).append('\\n');\n line = reader.readLine();\n }\n reader.close();\n return builder.toString();\n }",
"public String readFile(){\r\n StringBuffer str = new StringBuffer(); //StringBuffer is a mutable string\r\n Charset charset = Charset.forName(\"UTF-8\"); //UTF-8 character encoding\r\n Path file = Paths.get(filename + \".txt\");\r\n try (BufferedReader reader = Files.newBufferedReader(file, charset)) { // Buffer: a memory area that buffered streams read\r\n String line = null;\r\n while ((line = reader.readLine()) != null) { //Readers and writers are on top of streams and converts bytes to characters and back, using a character encoding\r\n str.append(line + \"\\n\");\r\n }\r\n }\r\n catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n return str.toString();\r\n }",
"public String textExtractor(String filePath) {\n\n StringBuilder textBuilder = new StringBuilder();\n try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/\" + filePath), \"UTF-8\"))) {\n while (bufferedReader.ready()) {\n textBuilder.append(bufferedReader.readLine()).append(\"/n\");\n }\n\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return textBuilder.toString();\n }",
"public void GetData(String nameFile) throws IOException {\n File file = new File(nameFile);\n BufferedReader finalLoad = new BufferedReader(new FileReader(file));\n int symbol = finalLoad.read();\n int indexText = 0;\n while (symbol != -1) {\n text[indexText++] = (char) symbol;\n if (indexText >= Constants.MAX_TEXT - 1) {\n PrintError(\"to mach size of file\".toCharArray(), \"\".toCharArray());\n break;\n }\n symbol = finalLoad.read();\n }\n text[indexText++] = '\\n';\n text[indexText] = '\\0';\n finalLoad.close();\n //System.exit(1);\n }",
"private void readPdfFile(String path) {\n\n try {\n PdfReader pdfReader = new PdfReader(path);\n fileTextContent = PdfTextExtractor.getTextFromPage(pdfReader, 1).trim();\n Log.i(\"PDF_CONTENTS\", \"The pdf content: \"+ fileTextContent);\n pdfReader.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }",
"public void readFile() {\r\n\t\tBufferedReader br = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString currentLine;\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\r\n\t\t\twhile ((currentLine = br.readLine()) != null) {\r\n\r\n\t\t\t\tif (!currentLine.equals(\"\")) {\r\n\t\t\t\t\tString[] paragraphs = currentLine.split(\"\\\\n\\\\n\");\r\n\r\n\t\t\t\t\tfor (String paragraphEntry : paragraphs) {\r\n\t\t\t\t\t\t//process(paragraphEntry);\r\n\t\t\t\t\t\t//System.out.println(\"Para:\"+paragraphEntry);\r\n\t\t\t\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\t\t\t\tparagraph.process(paragraphEntry);\r\n\t\t\t\t\t\tthis.paragraphs.add(paragraph);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)br.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public static String readTextFile(File file) throws IOException {\n StringBuffer sb = new StringBuffer();\n BufferedReader fileReader = new BufferedReader(new FileReader(file));\n FileHelper.read(sb, fileReader);\n return sb.toString();\n }",
"public static String getText(File file) {\n\t try {\n\t StringBuilder builder = new StringBuilder();\n\t BufferedReader input = new BufferedReader(new FileReader(file));\n\t try {\n\t String lineSeparator = System.getProperty(\"line.separator\");\n\t if (lineSeparator == null) {\n\t lineSeparator = \"\\n\";\n\t }\n\t for (String line; (line = input.readLine()) != null; ) {\n\t builder.append(line);\n\t builder.append(lineSeparator);\n\t }\n\t return builder.toString();\n\t } finally {\n\t input.close();\n\t }\n\t } catch (Exception e) {\n\t throw new RuntimeException(e.getMessage(), e);\n\t }\n\t }",
"public String textExtractor(File file) {\n StringBuilder textBuilder = new StringBuilder();\n\n try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), \"UTF-8\"))) {\n while (bufferedReader.ready()) {\n textBuilder.append(bufferedReader.readLine()).append(\"\\n\");\n }\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n\n return textBuilder.toString();\n }",
"public String readText(String _filename, java.net.URL _codebase) {\r\n\t\treturn readText(_filename, \"text\", _codebase);\r\n\t}",
"public void readFile()\r\n\t{\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tx = new Scanner(new File(\"clean vipr measles results.txt\"));\r\n\t\t\t\r\n\t\t\twhile (x.hasNext())\r\n\t\t\t{\r\n\t\t\t\tString a = x.next();\r\n\t\t\t\tString b = x.next();\r\n\t\t\t\tString c = x.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.printf(\"%s %s %s \\n\\n\", a,b,c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tx.close();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"file not found\");\r\n\t\t}\r\n\t\r\n\t}",
"@Test\n\tpublic void testReadTxtFile() throws FileNotFoundException {\n\t\tFileParser fp = new FileParser();\n\t\tArrayList<String> parsedLines = fp.readTxtFile(\"test.txt\");\n\t\tassertEquals(\"This is a test file\", parsedLines.get(0));\n\t\tassertEquals(\"University of Virginia\", parsedLines.get(1));\n\n\t\tArrayList<String> parsedWords = fp.readTxtFile(\"test1.txt\");\n\t\tassertEquals(\"test\", parsedWords.get(0));\n\t\tassertEquals(\"file\", parsedWords.get(1));\n\t}",
"public void readFile(File f) {\r\n if(f.getName().endsWith(\".txt\")) {\r\n if(f.getName().equals(\"USQRecorders.txt\")) {\r\n readAndTxt(f); \r\n lab_android.setText(\"Android read in\");\r\n }else if(f.getName().equals(\"mdl_log.txt\")) {\r\n readModLog(f);\r\n lab_moodle.setText(\"Moodle read in\");\r\n }else if(f.getName().equals(\"mdl_chat_messages.txt\") || f.getName().equals(\"mdl_forum_posts.txt\") || f.getName().equals(\"mdl_quiz_attempts.txt\")) {\r\n \treadtabs(f);\r\n }else{\r\n //illegal file name\r\n //JOptionPane.showMessageDialog(null, \"only accept .txt file named 'USQRecorders.txt','mdl_log.txt','mdl_chat_messages.txt','mdl_forum_posts.txt' and 'mdl_quiz_attempts.txt'\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if(fromzip == false) {\r\n copyOldtxt(f);\r\n }\r\n } else if(f.getName().endsWith(\".zip\")) {\r\n if(f.getName().endsWith(\".zip\"))fromzip=true;\r\n readZip(f);\r\n copyOldtxt(f);\r\n //delete original\r\n File del = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File dels[] = del.listFiles();\r\n for(int i=0 ; i<dels.length ; i++){\r\n dels[i].delete();\r\n }\r\n File tmp = new File(workplace + \"/temp/USQ_IMAGE/\");\r\n tmp.delete();\r\n tmp = new File(workplace + \"/temp\");\r\n tmp.delete();\r\n lab_android.setText(\"Android read in\");\r\n } else if(f.getName().endsWith(\".png\")) {\r\n readImage(f);\r\n }\r\n }",
"public String readFile (String pathOfFileSelected) {\n\n File file = new File(pathOfFileSelected);\n\n StringBuilder text = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line;\n\n while ((line = br.readLine()) != null) {\n text.append(line);\n text.append('\\n');\n }\n br.close();\n Log.d(TAG, \"readFile: text: \" +text.toString());\n return text.toString().trim();\n }\n catch (IOException e) {\n Log.e(TAG, \"readFile: \",e );\n return null;\n }\n }",
"private static String readFileContents(File file) throws FileNotFoundException {\n StringBuilder fileContents = new StringBuilder((int) file.length());\n\n try (Scanner scanner = new Scanner(file)) {\n while (scanner.hasNext()) {\n fileContents.append(scanner.next());\n }\n return fileContents.toString();\n }\n }",
"private static String readFile(String path) throws IOException {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(path)))) {\n\t\t\tStringBuilder input = new StringBuilder();\n\t\t\tString tmp; while ((tmp = br.readLine()) != null) input.append(tmp+\"\\n\");\n\t\t\treturn input.toString();\n\t\t}\n\t}",
"protected abstract void readFile();",
"public String read() throws Exception {\r\n\t\tBufferedReader reader = null;\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tif (input==null) input = new FileInputStream(file);\r\n\t\t\treader = new BufferedReader(new InputStreamReader(input,charset));\r\n\t\t\tchar[] c= null;\r\n\t\t\twhile (reader.read(c=new char[8192])!=-1) {\r\n\t\t\t\tsb.append(c);\r\n\t\t\t}\r\n\t\t\tc=null;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\treturn sb.toString().trim();\r\n\t}",
"public String readFile(String filePath)\n {\n String result = \"\";\n try {\n\n FileReader reader = new FileReader(filePath);\n Scanner scanner = new Scanner(reader);\n\n while(scanner.hasNextLine())\n {\n result += scanner.nextLine();\n }\n reader.close();\n }\n catch(FileNotFoundException ex)\n {\n System.out.println(\"File not found. Please contact the administrator.\");\n }\n catch (Exception ex)\n {\n System.out.println(\"Some error occurred. Please contact the administrator.\");\n }\n return result;\n }",
"public static void reading(String fileName)\n {\n\n }",
"public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}",
"private String getFileContent(String filePath) {\r\n\r\n\t\ttry {\r\n\t\t\tString text = new String(Files.readAllBytes(Paths.get(filePath)), StandardCharsets.UTF_8);\r\n\t\t\treturn text;\r\n\t\t} catch (Exception ex) {\r\n\t\t\treturn \"-1\";\r\n\t\t}\r\n\t}",
"public static void main(String[] args) throws Exception {\n FileReader fr = new FileReader(\"data/text.txt\");\n\n int i;\n while ((i=fr.read()) != -1)\n System.out.print((char)i);\n\n }",
"protected String openReadFile(Path filePath) throws IOException{\n\t\tString line;\n\t\tStringBuilder sb = new StringBuilder();\n\t\t// Read the document\n\t\tBufferedReader reader = Files.newBufferedReader(filePath, ENCODING);\n\t\t// Append each line in the document to our string\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tsb.append(line);\n\t\t\tsb.append(\"\\n\"); // readLine discards new-row characters, re-append them.\n\t\t}\n\t\tif(sb.length() != 0){\n\t\t\tsb.deleteCharAt(sb.length()-1); // However last line doesn't contain one, remove it.\n\t\t}\n\t\treader.close();\n\t\treturn new String(sb.toString());\n\t}",
"public static String readTextFile(File file) {\n\n\t\tBufferedInputStream bis = null;\n\t\tFileInputStream fis = null;\n\t\tStringBuffer sb = new StringBuffer();\n\t\ttry {\n\t\t\t// FileInputStream to read the file\n\t\t\tfis = new FileInputStream(file);\n\n\t\t\t/*\n\t\t\t * Passed the FileInputStream to BufferedInputStream For Fast read\n\t\t\t * using the buffer array.\n\t\t\t */\n\t\t\tbis = new BufferedInputStream(fis);\n\n\t\t\t/*\n\t\t\t * available() method of BufferedInputStream returns 0 when there\n\t\t\t * are no more bytes present in the file to be read\n\t\t\t */\n\t\t\twhile (bis.available() > 0) {\n\t\t\t\tsb.append((char) bis.read());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"The specified file not found\" + fnfe);\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"I/O Exception: \" + ioe);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (bis != null && fis != null) {\n\t\t\t\t\tfis.close();\n\t\t\t\t\tbis.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.out.println(\"Error in InputStream close(): \" + ioe);\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\n\t}",
"public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }",
"private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}",
"private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }",
"public static String readFile(String filePath) throws IOException {\n\t\tString text = \"\";\n\t\tBufferedReader br = new BufferedReader(new FileReader(filePath));\n\t\ttry {\n\n\t\t\tint intch;\n\t\t\twhile ((intch = br.read()) != -1) {\n\t\t\t\ttext += (char) intch;\n\t\t\t}\n\t\t} finally {\n\t\t\tbr.close();\n\t\t}\n\t\treturn text;\n\t}",
"public static void read7() {\n //read file into stream, try-with-resources\n try (Stream<String> stream = Files.lines(Paths.get(filePath))) {\n\n stream.forEach(System.out::println);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void TextFromFile(JTextPane tp)\n \t {\n try{\n //the file path\n String path = \"readMe.md\";\n File file = new File(path);\n FileReader fr = new FileReader(file);\n while(fr.read() != -1){\n tp.read(fr,null);\n }\n fr.close();\n } catch(Exception ex){\n ex.printStackTrace();\n }\n }",
"private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}",
"private String getFileContent(java.io.File fileObj) {\n String returned = \"\";\n try {\n java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.FileReader(fileObj));\n while (reader.ready()) {\n returned = returned + reader.readLine() + lineSeparator;\n }\n } catch (FileNotFoundException ex) {\n JTVProg.logPrint(this, 0, \"файл [\" + fileObj.getName() + \"] не найден\");\n } catch (IOException ex) {\n JTVProg.logPrint(this, 0, \"[\" + fileObj.getName() + \"]: ошибка ввода/вывода\");\n }\n return returned;\n }",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"public String readFileContent(File file) {\n StringBuilder fileContentBuilder = new StringBuilder();\n if (file.exists()) {\n String stringLine;\n try {\n FileReader fileReader = new FileReader(file);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n while ((stringLine = bufferedReader.readLine()) != null) {\n fileContentBuilder.append(stringLine + \"\\n\");\n }\n bufferedReader.close();\n fileReader.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return fileContentBuilder.toString();\n }",
"public static void main(String[] args) {\n byte[] content = null;\n try {\n content = Files.readAllBytes(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\diemkhang\\\\test reader\\\\introduce.txt\").toPath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(new String(content));\n }",
"public void leseTextEin()\r\n\t{\n\t\tif( this.text != \"\" )\r\n\t\t\treturn;\r\n\t\t\r\n\t StringBuffer buffer = new StringBuffer();\r\n\t BufferedReader input = null;\r\n\t \r\n\t try \r\n\t {\r\n\t \tinput = new BufferedReader( new FileReader(this.dateipfad) );\r\n\t \tString line = null; \r\n\t \twhile ((line=input.readLine()) != null)\r\n\t \t{\r\n\t \t\tbuffer.append(line); \r\n\t \t\tbuffer.append(System.getProperty(\"line.separator\"));\r\n\t \t}\r\n\t }\r\n\t catch (IOException ex)\r\n\t { ex.printStackTrace(); }\r\n\t finally \r\n\t {\r\n\t \ttry\r\n\t \t{\r\n\t \t\tif (input!= null) \r\n\t \t\t\tinput.close();\r\n\t \t}\r\n\t \tcatch (IOException ex)\r\n\t \t{ ex.printStackTrace(); }\r\n\t }\r\n\t this.text = buffer.toString();\r\n\t}",
"public static void readFile(String fileName)throws FileNotFoundException{ \r\n\t\t\r\n\t\tScanner sc = new Scanner(fileName);\r\n\t\t \r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\tString q1 = sc.next();\r\n\t\t\tString q1info = sc.next();\r\n\t\t}\r\n\t}",
"public String loadTextFile(String path) throws IOException {\n File file = new File(path);\n\n // Convert the file to a string.\n String output;\n try {\n output = Files.toString(file, Charsets.UTF_8);\n } catch (IOException ex) {\n LoggerFactory.getLogger(Resources.class).error(\"Unable to locate the resource at \" + path + \".\", ex);\n throw ex;\n }\n\n return output;\n }",
"public void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}",
"public String readFromFile(String filePath){\n String fileData = \"\";\n try{\n File myFile = new File(filePath);\n Scanner myReader = new Scanner(myFile);\n while (myReader.hasNextLine()){\n String data = myReader.nextLine();\n fileData += data+\"\\n\";\n }\n myReader.close();\n } catch(FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n return fileData;\n }",
"@Override\r\n\tpublic void test() {\n\t\tFile file = new File(\"c:\\\\testing.txt\");\r\n\t\tFileInputStream fis = null;\r\n\t\tBufferedInputStream bis = null;\r\n\t\t\r\n\t\tbyte[] buf = new byte[1024];\r\n\t\t\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream(file);\r\n\t\t\tbis = new BufferedInputStream(fis);\r\n\t\t\t\r\n\t\t\twhile (bis.available() != 0) {\r\n\t\t\t\tSystem.out.println(bis.read(buf));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(bis!=null)\r\n\t\t\t\t\tbis.close();\r\n\t\t\t\tif(fis != null) \r\n\t\t\t\t\tfis.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private String readFile(String fileName) {\n//Initialize\nString line = null;\nString allContent = \"\";\nBufferedReader fileReader = null;\n \nwhile (true) {\ntry {\nfileReader = new BufferedReader (new FileReader (fileName));\n \n//Replace tags with indicated content\nwhile((line = fileReader.readLine()) != null) {\nline = replaceTags(line);\nallContent += line;\n}\n} catch (Exception e) {\nSystem.err.println(\"Read error: \"+e);\nbreak;\n//Close BufferedReader if initialized\n}//end catch\nbreak;\n}//end while loop\n \nfileReadSuccessful = true;\nreturn allContent;\n}",
"static String readFile(String path) throws IOException{\n\t\tFileInputStream fs = new FileInputStream(path);\n\t\tStringBuffer sb = new StringBuffer();\n\t\t// read a file\n\t\tint singleByte = fs.read(); // read singleByte\n\t\twhile(singleByte!=-1){\n\t\t\tsb.append((char)singleByte);\n\t\t\t///System.out.print((char)singleByte);\n\t\t\tsingleByte = fs.read();\n\t\t}\n\t\tfs.close(); // close the file\n\t\treturn sb.toString();\n\t}",
"public static String getText(String name) throws Exception{\n \tFile file = getFile(name);\n \treturn getTextFromFile(file);\n }",
"private String getStringFromFile() throws FileNotFoundException {\n String contents;\n FileInputStream fis = new FileInputStream(f);\n StringBuilder stringBuilder = new StringBuilder();\n try {\n InputStreamReader inputStreamReader = new InputStreamReader(fis, \"UTF-8\");\n BufferedReader reader = new BufferedReader(inputStreamReader);\n String line = reader.readLine();\n while (line != null) {\n stringBuilder.append(line).append('\\n');\n line = reader.readLine();\n }\n } catch (IOException e) {\n // Error occurred when opening raw file for reading.\n } finally {\n contents = stringBuilder.toString();\n }\n return contents;\n }",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}",
"public static String readWholeText(FileSystem filesystem, String file) throws PathNotFoundException, AccessDeniedException, NotAFileException\n\t{\n\t\ttry {\n\t\t\treturn new String(readWhole(filesystem, file), \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn \"\";\n\t\t}\n\t}",
"private void loadText() {\n\t\ttext1 = app.loadStrings(\"./data/imports/TXT 1.txt\");\n\t\ttext2 = app.loadStrings(\"./data/imports/TXT 2.txt\");\n\t}",
"public static String readFile(String path) {\n String contents = \"\";\n try {\n BufferedReader br = new BufferedReader(new FileReader(path));\n\n StringBuilder sb = new StringBuilder();\n String line = br.readLine();\n while (line != null) {\n sb.append(line);\n sb.append(System.lineSeparator());\n line = br.readLine();\n }\n contents = sb.toString();\n br.close();\n } catch (Exception e) {\n System.out.println(e.toString());\n System.exit(1);\n }\n return contents;\n }",
"public String readLineOfText() \r\n\t{\r\n\t\tString lineOfText = null;\r\n\t\t\r\n\t\t// Read a line of text from the input file and convert it to upper case\r\n\t\ttry \r\n\t\t{\r\n\t\t\tlineOfText = inFile.readLine();\r\n\t\t} // try\r\n\t\tcatch (Exception Error) \r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tthrow (Error);\r\n\t\t\t} // try\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\t// We are in real trouble if we get here.\r\n\t\t\t} // catch\r\n\r\n\t\t} // catch\r\n\r\n\t\treturn (lineOfText);\r\n\t}",
"public String readAllLines() {\n String ans = \"\";\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"./assets/Instruction.txt\"));\n String str;\n while ((str = br.readLine()) != null) {\n ans += (str + \"\\n\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n assert ans != null;\n return ans;\n }",
"public void readAndTxt(File f) { \r\n //read android txt\r\n String str = new String();\r\n try {\r\n BufferedReader br = new BufferedReader(new FileReader(f.getAbsolutePath()));\r\n while((str = br.readLine()) != null){\r\n String info[] = str.split(\" \");\r\n AndroidRec ar = new AndroidRec(info[0], info[1], info[2], info[3], info[4], info[5], info[6], info[7]);\r\n andrec.add(ar);\r\n }\r\n br.close(); \r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read Android text file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public static String read(String filename) throws IOException {\n // Reading input by lines:\n BufferedReader in = new BufferedReader(new FileReader(filename));\n// BufferedInputStream in2 = new BufferedInputStream(new FileInputStream(filename));\n String s;\n int s2;\n StringBuilder sb = new StringBuilder();\n while((s = in.readLine())!= null)\n sb.append( s + \"\\n\");\n// sb.append((char) s2);\n in.close();\n return sb.toString();\n }",
"public String read(String filePath) throws IOException {\r\n\t\t//read file into stream\r\n\t\t\treturn new String(Files.readAllBytes(Paths.get(filePath)));\r\n\t}",
"public String readFile(String filename)\n {\n StringBuilder texts = new StringBuilder();\n \n try \n {\n FileReader inputFile = new FileReader(filename);\n Scanner parser = new Scanner(inputFile);\n \n while (parser.hasNextLine())\n {\n String line = parser.nextLine();\n texts.append(line + \";\");\n }\n \n inputFile.close();\n parser.close();\n return texts.toString();\n \n }\n \n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n return error;\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n return error;\n } \n }",
"public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }",
"private void ReadFile(String fileName){\n\t\tFileInputStream FIS \t= null;\n\t\tBufferedInputStream BIS = null;\n\t\tDataInputStream DIS \t= null;\n\t\tFile file \t\t\t\t= null;\n\t\t//content stores the files content, each line being separated by a '@'\n\t\tfile \t\t = new File(fileName);\n\t\t\n\t\tString content = \"\";\n\t\tString [] splitContent = new String [2];\n\t\t\n\t\ttry{\n\t\t\t//Setup Input Streams\n\t\t\tFIS = new FileInputStream(file);\n\t\t BIS = new BufferedInputStream(FIS);\n\t\t DIS = new DataInputStream(BIS);\n\t\t\t\n\t\t //do the following while the file contains more lines of text\n\t\t while (DIS.available() != 0){\n\t\t \t//read a line of text\n\t\t\t content = DIS.readLine();\n\t\t\t //confirm that the line is of the correct format\n\t\t\t if (content.contains(\"> \")){\n\t\t\t \t//split the line into the user and a list of who they follow\n\t\t\t \tsplitContent = content.split(\"> \");\n\t\t\t \t//create the tweet\n\t\t\t \tif (splitContent[1].length() > 140) throw new IllegalArgumentException(\"Tweet length is too large ( > 140 characters\");\n\t\t\t \tTweet tweet = new Tweet(new User(splitContent[0]), splitContent[1]);\n\t\t\t \ttweets.add(tweet);\n\t\t\t }else{\n\t\t\t \tSystem.out.println(\"ERROR - USER FILE IS NOT OF CORRECT FORMAT\");\n\t\t\t }\n\t\t }\n\t\t // dispose stream resources;\n\t\t FIS.close();\n\t\t BIS.close();\n\t\t DIS.close();\t\t \n\t } catch (FileNotFoundException e) {\n\t \te.printStackTrace();\n\t } catch (IOException e) {\n\t \te.printStackTrace();\n\t }\n\t\n\t}",
"@Override\n\tpublic synchronized String readWordFromFile(){\n\t\tString new_Word = null;\n\t\ttry{\n\t\t\t\tString newLine = br.readLine();\n\t\t\t\tif(newLine!=null){\n\t\t\t\t\tnew_Word = newLine;\n\t\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn new_Word;\n\t}",
"public TextfileReader() throws IOException {\n getText();\n }"
] |
[
"0.74208033",
"0.7352987",
"0.724682",
"0.72422606",
"0.70876324",
"0.7085796",
"0.7055894",
"0.6977508",
"0.6914493",
"0.68981254",
"0.6886455",
"0.6885357",
"0.6876397",
"0.68558764",
"0.6833485",
"0.6806809",
"0.67896974",
"0.67883915",
"0.67685115",
"0.6729399",
"0.66939014",
"0.6690876",
"0.66766506",
"0.66588765",
"0.66581696",
"0.6657726",
"0.66572773",
"0.6607764",
"0.66037273",
"0.6589707",
"0.6586949",
"0.6577833",
"0.6567974",
"0.6564252",
"0.6562765",
"0.65531504",
"0.6552655",
"0.6541211",
"0.6509563",
"0.64959747",
"0.64849734",
"0.6477741",
"0.64733523",
"0.6463751",
"0.64622855",
"0.6451366",
"0.64368665",
"0.6435523",
"0.64351994",
"0.64323056",
"0.64292747",
"0.6415585",
"0.64143467",
"0.64011467",
"0.63828135",
"0.637931",
"0.6360508",
"0.6356383",
"0.634569",
"0.63450867",
"0.63430697",
"0.6330705",
"0.63158804",
"0.6301319",
"0.6298566",
"0.62966394",
"0.6290565",
"0.6290088",
"0.6282843",
"0.6282634",
"0.62815315",
"0.6264936",
"0.62612915",
"0.62612915",
"0.6259128",
"0.6249044",
"0.6241987",
"0.62409925",
"0.62349707",
"0.6219897",
"0.6219081",
"0.6217322",
"0.61931336",
"0.6188425",
"0.6187336",
"0.6186748",
"0.6181974",
"0.6174404",
"0.6173538",
"0.6172081",
"0.6170563",
"0.6164388",
"0.61635274",
"0.6134385",
"0.613381",
"0.61218834",
"0.6121139",
"0.6112222",
"0.6095406",
"0.6082499"
] |
0.607982
|
100
|
save the context recievied via constructor in a local variable
|
public Functions(Context context){
this.context=context;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Context context();",
"Context context();",
"Context createContext();",
"Context createContext();",
"Context getContext();",
"public abstract void makeContext();",
"public abstract Context context();",
"public String getContext() { return context; }",
"public Object getContextObject() {\n return context;\n }",
"public cl_context getContext() {\r\n return context;\r\n }",
"@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}",
"void saveContext();",
"protected final TranslationContext context() {\n\t\treturn context;\n\t}",
"Map<String, Object> getContext();",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"public static Context getContext() {\n\t\treturn context;\n\t}",
"public static Context getContext() {\n\t\treturn instance;\n\t}",
"@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}",
"public String getContext() {\r\n\t\treturn context;\r\n\t}",
"private void saveAsCurrentSession(Context context) {\n \t// Save the context\n \tthis.context = context;\n }",
"public Context getContext() {\r\n\t\treturn context;\r\n\t}",
"public Context() {\n\t\tstates = new ObjectStack<>();\n\t}",
"public String getContext() {\n\t\treturn context;\n\t}",
"public Context getContext() {\n\t\treturn context;\n\t}",
"CTX_Context getContext();",
"ContextBucket getContext() {\n\treturn context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public String getContext() {\n return context;\n }",
"public Context getContext() {\n return context;\n }",
"ContextVariable createContextVariable();",
"java.lang.String getContext();",
"public static Context getInstance(){\n\t\treturn (Context) t.get();\n\t}",
"RegistrationContextImpl(RegistrationContext ctx) {\n this.messageLayer = ctx.getMessageLayer();\n this.appContext = ctx.getAppContext();\n this.description = ctx.getDescription();\n this.isPersistent = ctx.isPersistent();\n }",
"public Context getContext() {\n return contextMain;\n }",
"@Override\r\n\t\t\tprotected void restoreContext() {\n\t\t\t\t\r\n\t\t\t}",
"public synchronized static void setContext(Context con){\n\t\tcontext = con;\n\t}",
"public void setContextObject(Object co) {\n context = co;\n }",
"@Override\n public Context getContext() {\n return this.getApplicationContext();\n }",
"private Context getContext() {\n return mContext;\n }",
"private Context getContext() {\n return mContext;\n }",
"public Context getContext() {\n\t\treturn ctx;\n\t}",
"private static Context prepareContext() {\r\n\r\n Context context = new Context();\r\n\r\n ContextProperties properties = new ContextProperties();\r\n\r\n // Context requires a name\r\n properties.setName(\"Example_Package_Context\");\r\n\r\n // description is nice\r\n properties.setDescription(\"Example package Context.\");\r\n\r\n // define the type\r\n properties.setType(\"ExampleType\");\r\n\r\n /*\r\n * Organizational Unit(s) is/are required\r\n */\r\n OrganizationalUnitRefs ous = new OrganizationalUnitRefs();\r\n\r\n // add the Organizational Unit with objid escidoc:ex3 (the ou of the\r\n // example eSciDoc representation package) to the list of\r\n // organizational Units\r\n ous.add(new OrganizationalUnitRef(\"escidoc:ex3\"));\r\n properties.setOrganizationalUnitRefs(ous);\r\n\r\n context.setProperties(properties);\r\n\r\n return context;\r\n }",
"RenderingContext getContext();",
"public Context() {\n }",
"void getContext() {\n playerName = getIntent().getExtras().getString(\"player_name\");\n Log.i(\"DiplomaActivity\", \"getContext - Player name: \" + playerName);\n }",
"com.google.protobuf.ByteString getContext();",
"public Context getContext() {\n\t\treturn null;\n\t}",
"public abstract ApplicationLoader.Context context();",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public static Object contextToHold () {\n\n return Lists.list ( Reflection.contextToHold (),\n Annotations.contextToHold());\n }",
"public IRuntimeContext getContext() {\n return fContext;\n }",
"public Context getContext() {\n return this;\n }",
"public static Context getContext(){\n return appContext;\n }",
"public MyServiceDataSingleton(Context context) {\r\n myContext = context;\r\n }",
"@Override\r\n\tpublic Context getContext() {\n\t\treturn null;\r\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n context=getContext();\n\n }",
"protected RestContext getContext() {\n\t\tif (context.get() == null)\n\t\t\tthrow new InternalServerError(\"RestContext object not set on resource.\");\n\t\treturn context.get();\n\t}",
"private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }",
"public com.google.protobuf.ByteString getContext() {\n return context_;\n }",
"public Context getThis()\r\n {\r\n return this.context;\r\n }",
"void setContext(Map<String, Object> context);",
"public Context getContext() {\n return (Context)this;\n }",
"public Context getContext() {\n return this.mService.mContext;\n }",
"public ScriptContext(Context context, Scriptable global)\n\t{\n\t\tthis.context = context;\n\t\tthis.global = global;\n//\t\tSystem.out.println(\"Creating new ScriptContext \" + this);\n\t}",
"public interface SessionContext\nextends Serializable {\n\n /** Set the name of the context.\n * This method must be invoked in the init phase.\n * In addition a load and a save resource can be provided.\n */\n void setup(String value, String loadResource, String saveResource);\n\n /**\n * Get the name of the context\n */\n String getName();\n\n /**\n * Get a document fragment.\n * If the node specified by the path exist, its content is returned\n * as a DocumentFragment.\n * If the node does not exists, <CODE>null</CODE> is returned.\n */\n DocumentFragment getXML(String path)\n throws ProcessingException ;\n\n /**\n * Set a document fragment at the given path.\n * The implementation of this method is context specific.\n * Usually all children of the node specified by the path are removed\n * and the children of the fragment are inserted as new children.\n * If the path is not existent it is created.\n */\n void setXML(String path, DocumentFragment fragment)\n throws ProcessingException;\n\n /**\n * Append a document fragment at the given path.\n * The implementation of this method is context specific.\n * Usually the children of the fragment are appended as new children of the\n * node specified by the path.\n * If the path is not existent it is created and this method should work\n * in the same way as setXML.\n */\n void appendXML(String path, DocumentFragment fragment)\n throws ProcessingException;\n\n /**\n * Remove some content from the context.\n * The implementation of this method is context specific.\n * Usually this method should remove all children of the node specified\n * by the path.\n */\n void removeXML(String path)\n throws ProcessingException;\n\n /**\n * Set a context attribute.\n * Attributes over a means to store any data (object) in a session\n * context. If <CODE>value</CODE> is <CODE>null</CODE> the attribute is\n * removed. If already an attribute exists with the same key, the value\n * is overwritten with the new one.\n */\n void setAttribute(String key, Object value)\n throws ProcessingException;\n\n /**\n * Get the value of a context attribute.\n * If the attribute is not available return <CODE>null</CODE>.\n */\n Object getAttribute(String key)\n throws ProcessingException;\n\n /**\n * Get the value of a context attribute.\n * If the attribute is not available the return the\n * <CODE>defaultObject</CODE>.\n */\n Object getAttribute(String key, Object defaultObject)\n throws ProcessingException;\n\n /**\n * Get a copy of the first node specified by the path.\n * If the node does not exist, <CODE>null</CODE> is returned.\n */\n Node getSingleNode(String path)\n throws ProcessingException;\n\n /**\n * Get a copy of all nodes specified by the path.\n */\n NodeList getNodeList(String path)\n throws ProcessingException;\n\n /**\n * Set the value of a node. The node is copied before insertion.\n */\n void setNode(String path, Node node)\n throws ProcessingException;\n\n /**\n * Get the value of this node.\n * This is similiar to the xsl:value-of function.\n * If the node does not exist, <code>null</code> is returned.\n */\n String getValueOfNode(String path)\n throws ProcessingException;\n\n /**\n * Set the value of a node.\n * All children of the node are removed beforehand and one single text\n * node with the given value is appended to the node.\n */\n void setValueOfNode(String path, String value)\n throws ProcessingException;\n\n /**\n * Stream the XML directly to the handler.\n * This streams the contents of getXML() to the given handler without\n * creating a DocumentFragment containing a copy of the data.\n * If no data is available (if the path does not exist) <code>false</code> is\n * returned, otherwise <code>true</code>.\n */\n boolean streamXML(String path,\n ContentHandler contentHandler,\n LexicalHandler lexicalHandler)\n throws SAXException, ProcessingException;\n\n /**\n * Try to load XML into the context.\n * If the context does not provide the ability of loading,\n * an exception is thrown.\n */\n void loadXML(String path,\n SourceParameters parameters)\n throws SAXException, ProcessingException, IOException;\n\n /**\n * Try to save XML from the context.\n * If the context does not provide the ability of saving,\n * an exception is thrown.\n */\n void saveXML(String path,\n SourceParameters parameters)\n throws SAXException, ProcessingException, IOException;\n}",
"private Context genereateContext() {\n Context newContext = new Context();\n String path = \"\"; // NOI18N\n newContext.setAttributeValue(ATTR_PATH, path);\n\n // if tomcat 5.0.x generate a logger\n if (tomcatVersion == TomcatVersion.TOMCAT_50) {\n // generate default logger\n newContext.setLogger(true);\n newContext.setLoggerClassName(\"org.apache.catalina.logger.FileLogger\"); // NOI18N\n newContext.setLoggerPrefix(computeLoggerPrefix(path));\n newContext.setLoggerSuffix(\".log\"); // NOI18N\n newContext.setLoggerTimestamp(\"true\"); // NOI18N\n } else if (tomcatVersion == TomcatVersion.TOMCAT_55\n || tomcatVersion == TomcatVersion.TOMCAT_60\n || tomcatVersion == TomcatVersion.TOMCAT_70){\n // tomcat 5.5, 6.0 and 7.0\n newContext.setAntiJARLocking(\"true\"); // NOI18N\n }\n return newContext;\n }",
"static synchronized Context getContext() {\n checkState();\n return sInstance.mContext;\n }",
"SimpleContextVariable createSimpleContextVariable();",
"public Context() {\n this.usersList = JsonParser.getUsersFromJsonArray();\n this.editedUsersList = new ArrayList<>();\n }",
"public void context_save(long context) {\n context_save(nativeHandle, context);\n }",
"public Context getContext() {\n if (context == null) {\n context = Model.getSingleton().getSession().getContext(this.contextId);\n }\n return context;\n }",
"@Override\r\n\tpublic Context getContext()\r\n\t{\n\t\treturn this.getActivity().getApplicationContext();\r\n\t}",
"public PContext() {\r\n\t\tthis(new PDirective(), null, null);\r\n\t}",
"@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}",
"@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}",
"public ContextRequest getContext() {\n\t\treturn context;\n\t}",
"public MyApp() {\n sContext = this;\n }",
"public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }",
"public ContextInstance getContextInstance() {\n\t\treturn token.getProcessInstance().getContextInstance();\r\n\t}",
"public Map<String, Object> context() {\n return unmodifiableMap(context);\n }",
"public final Context getContext() {\n return mContext;\n }",
"private void establishContext() {\n ParcelableNote encoded = getIntent().getParcelableExtra(NOTE_EXTRA);\n mCtx = (encoded == null) ? Context.CREATE : Context.UPDATE;\n\n if (mCtx == Context.UPDATE) {\n mNote = encoded.getNote();\n mTags.addAll(mNote.tags());\n\n EditText title = findViewById(R.id.edit_note_title);\n title.setText(mNote.title());\n EditText body = findViewById(R.id.edit_note_body);\n body.setText(mNote.body());\n }\n }",
"public Context getContext() {\n return mContext;\n }",
"public void setContext(Context context) {\n this.contextMain = context;\n }",
"public ModuleContext getContext() {\r\n return context;\r\n }",
"public IContextInformation getContextInformation()\n {\n return null;\n }",
"public Context getContext() {\n if (context == null) {\n try {\n context = new InitialContext();\n } catch (NamingException exception) {\n }\n }\n return context;\n }",
"public Context getContext() {\n\t\treturn mContext;\n\t}",
"@Override\r\n\tpublic void setContext(Context context) {\r\n\t\tthis.context = context;\r\n\t}",
"private RequestContext() {\n\t\tencoding = DEFAULT_ENCODING;\n\t\tstatusCode = DEFAULT_STATUS_CODE;\n\t\tstatusText = DEFAULT_STATUS_TEXT;\n\t\tmimeType = DEFAULT_MIME_TYPE;\n\t\tcontentLength = DEFAULT_CONTENT_LENGHT;\n\t\theaderGenerated = DEFAULT_HEADER_GENERATED;\n\t\tcharset = Charset.forName(encoding);\n\t}",
"long getCurrentContext();",
"public final Object getContextInfo() {\n return this.info;\n }",
"void setContext(Context context) {\n\t\tthis.context = context;\n\t}",
"com.google.protobuf.ByteString\n getContextBytes();",
"default String getContext() {\n return getContextOpt().orElseThrow(IllegalStateException::new);\n }",
"@JsonProperty(\"context\")\n public Context getContext() {\n return context;\n }",
"public Context getContext() {\n return this.mContext;\n }",
"public Context getContext() {\n return this.mContext;\n }",
"public java.lang.String getContext() {\n java.lang.Object ref = context_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n context_ = s;\n return s;\n }\n }",
"private AppContext()\n {\n }"
] |
[
"0.74081933",
"0.74081933",
"0.7172364",
"0.7172364",
"0.71707976",
"0.7076411",
"0.7037989",
"0.6996679",
"0.69485986",
"0.68524027",
"0.68333185",
"0.6828188",
"0.6785349",
"0.67712444",
"0.67473954",
"0.67473954",
"0.6711818",
"0.6698438",
"0.66755295",
"0.666617",
"0.6654368",
"0.6626035",
"0.66009927",
"0.6598018",
"0.65687436",
"0.65629345",
"0.655867",
"0.655867",
"0.655867",
"0.6538737",
"0.65007806",
"0.64635485",
"0.6438445",
"0.64350903",
"0.6434287",
"0.64257246",
"0.6399942",
"0.6396822",
"0.639236",
"0.6377576",
"0.6377576",
"0.63409555",
"0.632122",
"0.6316589",
"0.63060164",
"0.63013864",
"0.6276616",
"0.62691975",
"0.6268319",
"0.625536",
"0.6253221",
"0.62493014",
"0.62486416",
"0.6246395",
"0.6241664",
"0.6221027",
"0.6219742",
"0.6213338",
"0.6205075",
"0.6196163",
"0.6186359",
"0.611027",
"0.6106014",
"0.6102875",
"0.6097585",
"0.60946935",
"0.60912246",
"0.60801274",
"0.60772645",
"0.607626",
"0.6063239",
"0.60225",
"0.60148776",
"0.6014384",
"0.60127854",
"0.60127854",
"0.60076636",
"0.6007534",
"0.6005555",
"0.60003924",
"0.5991134",
"0.5970669",
"0.59570974",
"0.59539205",
"0.5952571",
"0.5951293",
"0.59457207",
"0.594461",
"0.59419924",
"0.59378827",
"0.5922216",
"0.5908898",
"0.59072953",
"0.5872223",
"0.58641785",
"0.58631593",
"0.5860394",
"0.58569384",
"0.58569384",
"0.5855477",
"0.5854695"
] |
0.0
|
-1
|
called before request is started
|
@Override
public void onStart() {
System.out.println("Get Bill Details ");
System.out.println("Get Bill Details URL "+jobDecrypt(context.getString(R.string.url_inquire)));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}",
"private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}",
"protected void onBeginRequest()\n\t{\n\t}",
"@Override\n\tpublic void initRequest() {\n\n\t}",
"@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}",
"@Override\n public void beforeStart() {\n \n }",
"private Request() {\n initFields();\n }",
"protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}",
"protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}",
"private WebRequest() {\n initFields();\n }",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void preServe() {\n\n\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public void onStart() {\n // onStart might not be called because this object may be created after the fragment/activity's onStart method.\n connectivityMonitor.register();\n\n requestTracker.resumeRequests();\n }",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}",
"protected void onBegin() {}",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@Override\n public void init(final FilterConfig filterConfig) {\n Misc.log(\"Request\", \"initialized\");\n }",
"public void onStart() {\n /* do nothing - stub */\n }",
"@Test(expected=IllegalStateException.class)\n public void onRequestBeforeInitialization() {\n onRequest();\n fail(\"cannot do stubbing, Jadler hasn't been initialized yet\");\n }",
"@Override\n public void preRun() {\n super.preRun();\n }",
"public void request() {\n }",
"@Override\n\tpublic void onStart() {\n\n\t\tsuper.onStart();\n\n\t\t/*\n\t\t * Connect the client. Don't re-start any requests here;\n\t\t * instead, wait for onResume()\n\t\t */\n\t\tmLocationClient.connect();\n\t}",
"private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }",
"@Override\n\tpublic String init_request() {\n\t\treturn null;\n\t}",
"private RequestManager() {\n\t // no instances\n\t}",
"private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}",
"public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }",
"@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}",
"private void initData() {\n requestServerToGetInformation();\n }",
"public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}",
"private void doBeforeApplyRequest(final PhaseEvent arg0) {\n\t}",
"@Override\n public void onStart() {\n \n }",
"@Override\n public void onStart() {\n \n }",
"@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }",
"protected void onFirstUse() {}",
"private RequestExecution() {}",
"private Request() {}",
"private Request() {}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"public static void initial(Context context) {\n VDVolley.VDVolleyRequestManager.initial(context);\n }",
"@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}",
"@Override\n protected void doInit() {\n super.doInit();\n this.startTime = (String) this.getRequest().getAttributes().get(\"startTime\");\n this.endTime = (String) this.getRequest().getAttributes().get(\"endTime\");\n this.interval = (String) this.getRequest().getAttributes().get(\"samplingInterval\");\n }",
"@Before\n public void setup() {\n config.setProperty(Constants.PROPERTY_RETRY_DELAY, \"1\");\n config.setProperty(Constants.PROPERTY_RETRY_LIMIT, \"3\");\n rc = new RequestContext(null);\n rc.setTimeToLiveSeconds(2);\n }",
"protected void preload(HttpServletRequest request) {\r\n/* 39 */ log.debug(\"RoomCtl preload method start\");\r\n/* 40 */ HostelModel model = new HostelModel();\r\n/* */ try {\r\n/* 42 */ List l = model.list();\r\n/* 43 */ request.setAttribute(\"hostelList\", l);\r\n/* 44 */ } catch (ApplicationException e) {\r\n/* 45 */ log.error(e);\r\n/* */ } \r\n/* 47 */ log.debug(\"RoomCtl preload method end\");\r\n/* */ }",
"private void handleRequestOnPre() {\n ConnectionsFragment frag = (ConnectionsFragment) getSupportFragmentManager()\n .findFragmentByTag(getString(R.string.keys_fragment_connections));\n frag.handleRequestOnPre();\n }",
"protected void start() {\n }",
"public void onStart() {\n\t\t\n\t}",
"@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"private void setupRequestContext() {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\n\t\tRequestContextHolder.setRequestAttributes(attributes);\n\t}",
"public void init(HttpServletRequest request) throws ServletException {\n\t}",
"protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}",
"@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }",
"@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}",
"public void startProcessingRequest(MailboxSession session) {\n // Do nothing \n }",
"@Override\r\npublic void requestInitialized(ServletRequestEvent arg0) {\n\t\r\n}",
"public void initRequest() {\n repo.getData();\n }",
"public void onModuleLoad() {\n\n\t\tJsonpRequestBuilder requestBuilder = new JsonpRequestBuilder();\n\t\t// requestBuilder.setTimeout(10000);\n//\t\trequestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback());\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"public void onStart() {\n }",
"private void runBaseInit(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.initBaseSim();\n }",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"@Override\r\n public void start() {\r\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(\"tag\",\"onStart\" );\n\t}",
"@Override\n public void start() {\n }",
"@Override public void start() {\n }",
"public void before() {\n process = Thread.currentThread();\n }",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}",
"private void onPreRequestData(int tag) {\n }"
] |
[
"0.75935924",
"0.7434612",
"0.73579293",
"0.7111827",
"0.709784",
"0.7078375",
"0.6828659",
"0.6786365",
"0.6777992",
"0.67673975",
"0.66835743",
"0.6548043",
"0.64955246",
"0.6423946",
"0.642192",
"0.6405631",
"0.6396179",
"0.6341774",
"0.63408804",
"0.6340001",
"0.63343185",
"0.6332091",
"0.6324497",
"0.6319413",
"0.6308262",
"0.63070047",
"0.6294066",
"0.62936974",
"0.62899816",
"0.6280114",
"0.6251576",
"0.6250244",
"0.62485415",
"0.6239764",
"0.6239764",
"0.62341434",
"0.6220207",
"0.6206572",
"0.619618",
"0.619618",
"0.6189883",
"0.6189883",
"0.616631",
"0.6163374",
"0.6162591",
"0.6162158",
"0.61620075",
"0.615203",
"0.6147391",
"0.6136904",
"0.61330914",
"0.61321586",
"0.61321586",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.60981625",
"0.60883504",
"0.6082095",
"0.6081294",
"0.60770726",
"0.60736835",
"0.6072115",
"0.6066453",
"0.60584384",
"0.604778",
"0.6046884",
"0.6045228",
"0.6045228",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60396403",
"0.6036059",
"0.6030069",
"0.6015103",
"0.6014955",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6000028",
"0.5998341",
"0.5994331",
"0.59908134",
"0.59816813",
"0.5978696",
"0.5975132",
"0.5972102",
"0.5972102",
"0.5969578",
"0.59682727"
] |
0.0
|
-1
|
called when response HTTP status is "4XX" (eg. 401, 403, 404)
|
@Override
public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void authenticationFailedHandler(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) {\n response.setHeader(HttpHeaders.WWW_AUTHENTICATE, \"Basic\");\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n }",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\t\tpublic void onError(int httpcode) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] bytes, Throwable throwable) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if (statusCode == 404) {\n Toast.makeText(getApplicationContext(),\n \"Requested resource not found\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n Toast.makeText(getApplicationContext(),\n \"Something went wrong at server end\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else {\n Toast.makeText(\n getApplicationContext(),\n \"Error Occured n Most Common Error: n1. Device not connected to Internetn2. Web App is not deployed in App servern3. App server is not runningn HTTP Status code : \"\n + statusCode, Toast.LENGTH_LONG)\n .show();\n }\n }",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, AuthenticationException failed) throws IOException {\n\t\t\n\t\tresponse.setStatus(401);\n response.setContentType(\"application/json\"); \n response.getWriter().append(json(failed));\n\t}",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {\n }",
"void heartbeatInvalidStatusCode(XMLHttpRequest xhr);",
"@Override\n protected void handleErrorResponseCode(int code, String message) {\n }",
"public abstract int statusCode();",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '400'\n if(statusCode == 400){\n Toast.makeText(getApplicationContext(), \"Error Creating Donation!!\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 400, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"int getStatusCode();",
"int getStatusCode();",
"int getStatusCode( );",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable e, JSONArray errorResponse) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if(statusCode == 404){\n Toast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n }",
"@Override\n\t\t\t\t\tpublic void httpFail(String response) {\n\t\t\t\t\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\r\n public void afterCompletion(HttpServletRequest request,\r\n HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception \r\n {\n }",
"@Override\r\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception {\n \r\n }",
"@Override\n public void commence(HttpServletRequest request,\n HttpServletResponse response,\n AuthenticationException authException) throws IOException {\n\n String requestURI = request.getRequestURI();\n if(requestURI.startsWith(\"/api\")){\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n BaseResponse baseResponse = new BaseResponse();\n baseResponse.setMessage(authException.getMessage());\n baseResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n out.write(new ObjectMapper().writeValueAsString(baseResponse));\n out.flush();\n out.close();\n\n// response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n }else {\n response.sendRedirect(\"/login?redirect=\"+requestURI);\n }\n }",
"private void abortUnauthorised(HttpServletResponse httpResponse) throws IOException {\n httpResponse.setHeader(HttpHeaders.WWW_AUTHENTICATE, WWW_AUTHENTICATION_HEADER);\n httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, UNAUTHORISED_MESSAGE);\n }",
"abstract Integer getStatusCode();",
"@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Throwable error,\n String content) {\n\n if(statusCode == 404){\n Toast.makeText(context, \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }else if(statusCode == 500){\n Toast.makeText(context, \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }else{\n // Toast.makeText(context, \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n Log.e(\"status Response\", String.valueOf(volleyError));\n // mProgressDialog.dismiss();\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest req, HttpServletResponse resp, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"public void setHttpStatusCode(int value) {\n this.httpStatusCode = value;\n }",
"public abstract int getHttpStatusErrorCode();",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .entity(\"You cannot access this resource\").build()\n );\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n // Showing error message if something goes wrong.\n Toast.makeText(ClaimStatusActivity.this, volleyError.toString(), Toast.LENGTH_LONG).show();\n }",
"private final void m37299a(int i) throws Exception {\n if (Callback.DEFAULT_DRAG_ANIMATION_DURATION <= i) {\n if (299 >= i) {\n return;\n }\n }\n if (i != 405) {\n if (i != 409) {\n if (i != 410) {\n if (i != 422) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Network Error: status code \");\n stringBuilder.append(i);\n throw new IOException(stringBuilder.toString());\n }\n }\n }\n }\n throw ((Throwable) new UsernameTakenException());\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\r\n\t\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tbyte[] binaryData, Throwable error) {\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfor (Header h : headers) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"========\", h.getName() + \"----------->\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ URLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (binaryData != null) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"=====+\", \"content : \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t\tLog.e(\"statusCode : \", statusCode + \"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\tif (ppd != null) {\r\n//\t\t\t\t\t\t\t\tppd.dismiss();\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tTool.showToast(context, \"系统错误!\");\r\n\t\t\t\t\t\t}",
"public static void validateResponseStatusCode(Response response) {\n\t\tresponse.then().statusCode(200);\n\n\t}",
"public void setResponseStatus(int responseStatus) {\n this.responseStatus = responseStatus;\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.i(\"doRequest\", \"doRequest failed\");\n\n }",
"@Override\n\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\tAuthenticationException authException) throws IOException, ServletException {\n\t\tApiResponse res = new ApiResponse(HttpServletResponse.SC_UNAUTHORIZED, \"Unauthorised\");\n\t\tres.setErrors(authException.getMessage());\n\t\tres.setStatus(false);\n OutputStream out = response.getOutputStream();\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(out, res);\n out.flush();\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"获取订单超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}",
"@Override\n public void onSuccess(Response response) {\n if (Responses.isServerErrorRange(response)\n || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) {\n OptionalInt next = incrementHostIfNecessary(pin);\n instrumentation.receivedErrorStatus(pin, channel, response, next);\n } else {\n instrumentation.successfulResponse(channel.stableIndex());\n }\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tHandlerInterceptor.super.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\r\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onResponceError(final ErrorCode errorCode) {\n }",
"private void setStatusCode(String statusLine) {\n \n \t\tString[] each = statusLine.split( \" \" );\n \t\tresponseHTTPVersion = each[0];\n \t\tstatusCode = each[1];\n\t\treasonPhrase = each[2];\n \t}",
"private AuthenticationFailureHandler authenticationFailureHandler() {\r\n return (HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) -> {\r\n prepareResponse(response, null, HttpStatus.UNAUTHORIZED,\r\n exception);\r\n };\r\n }",
"@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}",
"public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\r\n\t}",
"public int statusCode(){\n return code;\n }",
"public void setHttpStatusCode(Integer httpStatusCode) {\n this.httpStatusCode = httpStatusCode;\n }",
"private void badMove(HttpServletResponse response) throws IOException {\r\n // Handle a bad request\r\n response.setStatus(400);\r\n try (PrintWriter out = response.getWriter()) {\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Tic Tac Toe</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>400 Bad Request</h1>\");\r\n out.println(\"</html>\"); \r\n }\r\n }",
"private void handleError(HttpServletResponse resp, Throwable ex) {\r\n try {\r\n if (resp.isCommitted()) {\r\n PrintWriter out = resp.getWriter();\r\n ex.printStackTrace(out);\r\n return;\r\n }\r\n resp.setStatus(500);\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<html>\");\r\n out.println(\" <head><title>Execution Error: 500</title></head>\");\r\n out.println(\" <body>\");\r\n out.println(\" <h2>Execution Error: \"+ex.getClass().getSimpleName()+\"</h2>\");\r\n out.println(\" <p>Stack trace:</p>\");\r\n out.print(\" <blockquote><pre>\");\r\n if (ex instanceof RhinoException) {\r\n RhinoException rex = (RhinoException)ex;\r\n rex.printStackTrace(out);\r\n } else {\r\n ex.printStackTrace(out);\r\n }\r\n out.println(\"</pre></blockquote>\");\r\n out.println(\" <p><address>Powered by Alt Framework</address></p>\");\r\n out.println(\" </body>\");\r\n out.println(\"</html>\");\r\n } catch (IOException ex2) {\r\n ex2.printStackTrace(System.err);\r\n }\r\n }",
"void setResponseFormatError(){\n responseFormatError = true;\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n\n NetworkResponse networkResponse = error.networkResponse;\n Log.i(\"Checking\", new String(error.networkResponse.data));\n if(networkResponse != null && networkResponse.data != null)\n {\n switch (networkResponse.statusCode)\n {\n\n default:\n break;\n }\n }\n }",
"public final void handleError(Throwable th) {\r\n if (!(th instanceof HttpException)) {\r\n Snackbar.Companion.showMessage(this, \"죄송합니다.\\n서비스가 잠시 지연되고 있습니다.\\n잠시 후 다시 이용해주세요.\");\r\n } else if (((HttpException) th).code() == 401) {\r\n Intent intent = new Intent(this, IntroActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }\r\n }",
"@Override\n\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\n\t\t}"
] |
[
"0.6556771",
"0.6077015",
"0.6009509",
"0.60011625",
"0.58474255",
"0.5837503",
"0.5828418",
"0.5827644",
"0.5789087",
"0.5762918",
"0.57514864",
"0.5749605",
"0.5708024",
"0.5708024",
"0.56651163",
"0.56601477",
"0.56389934",
"0.5637643",
"0.5623692",
"0.5621627",
"0.5621548",
"0.56179726",
"0.5612367",
"0.56021035",
"0.5597549",
"0.5587198",
"0.5586976",
"0.5586976",
"0.556676",
"0.5561483",
"0.55557436",
"0.5535916",
"0.55345094",
"0.54923624",
"0.54899997",
"0.54794014",
"0.54766464",
"0.547494",
"0.547494",
"0.5471556",
"0.5461637",
"0.5456165",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5429481",
"0.5427608",
"0.5427608",
"0.5424738",
"0.54235286",
"0.54234964",
"0.54202765",
"0.54136056",
"0.5412538",
"0.5411571",
"0.53989565",
"0.5390575",
"0.5390575",
"0.53829384",
"0.5379672",
"0.5379672",
"0.53763235",
"0.5375512",
"0.5373627",
"0.53614867",
"0.5357745",
"0.5357003",
"0.5357003",
"0.53449166",
"0.53449166",
"0.53449166",
"0.53432655",
"0.53249854",
"0.5322552",
"0.5320998",
"0.53180057",
"0.5313068",
"0.5313068",
"0.53125215",
"0.53115463",
"0.53062314",
"0.53062314",
"0.5305276",
"0.5299047",
"0.52971244",
"0.52939934",
"0.5291314",
"0.52906823",
"0.5286733",
"0.52840805",
"0.5282959",
"0.52825016",
"0.52775574",
"0.5270314",
"0.5269613",
"0.5262051"
] |
0.53255516
|
76
|
called when request is retried
|
@Override
public void onRetry(int retryNo) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onRetry(HttpRequest req, String reason) {\n\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\n\t\tpublic boolean isRetry() { return true; }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"void doRetry();",
"@Override\n\t\tpublic boolean isRetry() { return false; }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"void onRetryAuthentication();",
"@Override\n void setRetry() {\n if (mNextReqTime > 32 * 60 * 1000 || mController.isStop()) {\n if (DEBUG)\n Log.d(TAG, \"################ setRetry timeout, cancel retry : \" + mController.isStop());\n cancelRetry();\n return;\n }\n if (mCurRetryState == RetryState.IDLE) {\n mCurRetryState = RetryState.RUNNING;\n if (mReceiver == null) {\n IntentFilter filter = new IntentFilter(INTENT_ACTION_RETRY);\n mReceiver = new stateReceiver();\n mContext.registerReceiver(mReceiver, filter);\n }\n\n }\n Intent intent = new Intent(INTENT_ACTION_RETRY);\n PendingIntent sender = PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n long nextReq = SystemClock.elapsedRealtime() + mNextReqTime;\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(nextReq);\n if(DEBUG) Log.i(TAG, \"start to get location after: \" + mNextReqTime + \"ms\");\n mAlarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextReq, sender);\n mNextReqTime = mNextReqTime * 2;\n }",
"public int getRequestRetryCount() {\n \t\treturn 1;\n \t}",
"public void markRequestRetryReplace() throws JNCException {\n markLeafReplace(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n super.onRetry(retryNo);\n // 返回重试次数\n }",
"public abstract long retryAfter();",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext context) {\n\t\t\tif (executionCount >= MAX_REQUEST_RETRY_COUNTS) {\n\t\t\t\t// Do not retry if over max retry count\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (exception instanceof NoHttpResponseException) {\n\t\t\t\t// Retry if the server dropped connection on us\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (exception instanceof SSLHandshakeException) {\n\t\t\t\t// Do not retry on SSL handshake exception\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tHttpRequest request = (HttpRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);\n\t\t\tboolean idempotent = (request instanceof HttpEntityEnclosingRequest);\n\t\t\tif (!idempotent) {\n\t\t\t\t// Retry if the request is considered idempotent\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\n\t\t}",
"public void addRequestRetry() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"request-retry\",\n null,\n childrenNames());\n }",
"public int retry() {\r\n\t\treturn ++retryCount;\r\n\t}",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"public boolean isRetried ()\r\n {\r\n return hasFailed () && retried_;\r\n }",
"public void onTryFails(int currentRetryCount, Exception e) {}",
"@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }",
"private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }",
"public void markRequestRetryCreate() throws JNCException {\n markLeafCreate(\"requestRetry\");\n }",
"public void retryRequired(){\n startFetching(query);\n }",
"public boolean isRetry();",
"public DefaultHttpRequestRetryHandler() {\n this(3);\n }",
"public void incrementRetryCount() {\n this.retryCount++;\n }",
"public void markRequestRetryDelete() throws JNCException {\n markLeafDelete(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\tpublic void setWasRetried(boolean wasRetried) {\n\t\t\t\n\t\t}",
"private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }",
"boolean allowRetry(int retry, long startTimeOfExecution);",
"@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}",
"@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}",
"void retry(Task task);",
"public interface OnRetryListener {\n void onRetry();\n}",
"public synchronized void onRequestFailed(Throwable reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"@Override\n\tpublic void onReplayFailed(Throwable cause) {\n\n\t}",
"@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}",
"public void retrySending()\n {\n try\n {\n EmailConfig emailConfig = getEmailConfig();\n int maxRetries = emailConfig.getMaxRetries().intValue();\n boolean saveFailedMails = emailConfig.getSaveFailedEmails();\n List messageFileList = getMessagesInFolder(IEmailConfiguration.EMAIL_RETRY_PATH);\n \n if (maxRetries > 0 && messageFileList.size()>0)\n {\n Session session = getMailSession(true);\n for (Iterator i = messageFileList.iterator(); i.hasNext();)\n {\n resendMail(session, (File)i.next(), maxRetries, saveFailedMails);\n }\n }\n }\n catch (Throwable th)\n {\n AlertLogger.warnLog(CLASSNAME,\"retrySending\",\"Error in retrySending\",th);\n }\n }",
"public boolean isAllowPartialRetryRequests() {\n\t\treturn false;\n\t}",
"public boolean retry() {\n return tries++ < MAX_TRY;\n }",
"void sendRetryMessage(int retryNo);",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"public boolean willRetry() {\n return willRetry;\n }",
"public void markRequestRetryMerge() throws JNCException {\n markLeafMerge(\"requestRetry\");\n }",
"protected abstract void onClickRetryButton();",
"public void resumeRequests() {\n requestTracker.resumeRequests();\n }",
"public synchronized void onRequestFailed(String reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"boolean doRetry() {\n synchronized (mHandler) {\n boolean doRetry = currentRetry < MAX_RETRIES;\n boolean futureSync = mHandler.hasMessages(0);\n\n if (doRetry && !futureSync) {\n currentRetry++;\n mHandler.postDelayed(getNewRunnable(), currentRetry * 15_000);\n }\n\n return mHandler.hasMessages(0);\n }\n }",
"public void resendRequestingQueue() {\n Logger.m1416d(TAG, \"Action - resendRequestingQueue - size:\" + this.mRequestingQueue.size());\n printRequestingQueue();\n printRequestingCache();\n while (true) {\n Requesting requesting = (Requesting) this.mRequestingQueue.pollFirst();\n if (requesting == null) {\n return;\n }\n if (requesting.request.getCommand() == 2) {\n this.mRequestingQueue.remove(requesting);\n this.mRequestingCache.remove(requesting.request.getHead().getRid());\n } else {\n requesting.retryAgain();\n sendCommandWithLoggedIn(requesting);\n }\n }\n }",
"@Override\n protected void onRequestTimeout(Tuple request) {\n }",
"public static HttpRequestRetryHandler getRetryHandler(final String... details) throws JSONException {\n\t\treturn new HttpRequestRetryHandler() {\n\t\t\t@Override\n\t\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext httpContext) {\n\t\t\t\tLOGGER.info(\"Request Execution no: \" + executionCount);\n\t\t\t\t// System.out.println(\"Request Execution no: \"+executionCount);\n\t\t\t\tif (executionCount >= 5) {\n\t\t\t\t\tLOGGER.info(\"Aborting Request retry using Job Schedular\");\n\t\t\t\t\tSystem.out.println(details);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tLOGGER.info(\"Retrying request...\");\n\t\t\t\t// System.out.println(\"Retrying request...\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t}",
"protected int retryLimit() {\n return DEFAULT_RETRIES;\n }",
"@Override\n public int getRetryDelay() {\n return retryDelay;\n }",
"@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }",
"@Around(\"execution(public void edu.sjsu.cmpe275.aop.TweetService.*(..))\")\n public Object retryAdvice(ProceedingJoinPoint joinPoint) throws Throwable {\n IOException exception = null;\n boolean retry = false;\n for (int i = 1; i <= 4; i++) {\n if (retry) {\n System.out.println(\"Network Error: Retry #\" + (i - 1));\n }\n try {\n// System.out.println(\"proceed !!! - \" + i);\n return joinPoint.proceed();\n } catch (IOException e) {\n System.out.println(\"Network Exception!!\");\n exception = e;\n retry = true;\n }\n }\n return joinPoint;\n }",
"@Test\n\tpublic void testRetryTheSuccess() {\n\t\tgenerateValidRequestMock();\n\t\tworker = PowerMockito.spy(new HttpRepublisherWorker(dummyPublisher, actionedRequest));\n\t\tWhitebox.setInternalState(worker, CloseableHttpClient.class, httpClientMock);\n\t\ttry {\n\t\t\twhen(httpClientMock.execute(any(HttpRequestBase.class), any(ResponseHandler.class)))\n\t\t\t\t\t.thenThrow(new IOException(\"Exception to retry on\")).thenReturn(mockResponse);\n\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not reach here!\");\n\t\t}\n\t\tworker.run();\n\t\t// verify should attempt to calls\n\t\ttry {\n\t\t\tverify(httpClientMock, times(2)).execute(any(HttpRequestBase.class), any(ResponseHandler.class));\n\t\t\tassertEquals(RequestState.SUCCESS, actionedRequest.getAction());\n\t\t} catch (ClientProtocolException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t}\n\t}",
"String getLogRetryAttempted();",
"public interface RetryCallback {\n void retry();\n}",
"public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }",
"public Object doWithRetry(RetryContext context) throws Throwable {\n \t\t\t\t((StringHolder) item).string = ((StringHolder) item).string + (count++);\n \t\t\t\tthrow new RuntimeException(\"Barf!\");\n \t\t\t}",
"protected short maxRetries() { return 15; }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"int getRetries();",
"@Override\n public void onFailure(@NonNull Exception e) {\n resultCallback.onResultCallback(Result.retry());\n }",
"public void retry(String myError) {\n try {\n request.setAttribute(\"myError\", myError);\n servletCtx.getRequestDispatcher(\"/hiddenJsps/iltds/asm/asmFormLookup.jsp\").forward(\n request,\n response);\n }\n catch (Exception e) {\n e.printStackTrace();\n ReportError err = new ReportError(request, response, servletCtx);\n err.setFromOp(this.getClass().getName());\n err.setErrorMessage(e.toString());\n try {\n err.invoke();\n }\n catch (Exception _axxx) {\n }\n return;\n }\n\n }",
"@Override\n public void onRetry(EasyVideoPlayer player, Uri source) {\n }",
"public boolean shouldRetryOnTimeout() {\r\n return configuration.shouldRetryOnTimeout();\r\n }",
"public void setRecoveryRetries(int retries);",
"@Override\n protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {\n return RetryConstraint.CANCEL;\n }",
"@Override\n public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {\n if (response.getStatusCode() != 429 || isRateLimitError(response)) {\n return false;\n }\n\n try {\n // Note that this will consume the response body. At this point,\n // subsequent retry handlers or error handlers will not be able to read\n // again the payload, but that should only be attempted when the\n // command is not retryable and an exception should be thrown.\n Error error = parseError.apply(response);\n logger.debug(\"processing error: %s\", error);\n\n boolean isRetryable = RETRYABLE_ERROR_CODE.equals(error.details().code());\n return isRetryable ? super.shouldRetryRequest(command, response) : false;\n } catch (Exception ex) {\n // If we can't parse the error, just assume it is not a retryable error\n logger.warn(\"could not parse error. Request won't be retried: %s\", ex.getMessage());\n return false;\n }\n }",
"void doShowRetry();",
"int getSleepBeforeRetry();",
"@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n }",
"@Override\n public void refresh404(String tag) {\n this.retrySubredditLoad(tag, true);\n }",
"int getRetryCount() {\n return retryCount;\n }",
"@Override\npublic boolean retry(ITestResult result) {\n\tif(minretryCount<=maxretryCount){\n\t\t\n\t\tSystem.out.println(\"Following test is failing====\"+result.getName());\n\t\t\n\t\tSystem.out.println(\"Retrying the test Count is=== \"+ (minretryCount+1));\n\t\t\n\t\t//increment counter each time by 1 \n\t\tminretryCount++;\n\n\t\treturn true;\n\t}\n\treturn false;\n}",
"protected void responseFail(){\n\t\tqueue.clear();\n\t}",
"@SuppressLint({\"MissingPermission\"})\n public void performRetry(BitmapHunter bitmapHunter) {\n if (!bitmapHunter.isCancelled()) {\n boolean z = false;\n if (this.service.isShutdown()) {\n performError(bitmapHunter, false);\n return;\n }\n NetworkInfo networkInfo = null;\n if (this.scansNetworkChanges) {\n networkInfo = ((ConnectivityManager) Utils.getService(this.context, \"connectivity\")).getActiveNetworkInfo();\n }\n if (bitmapHunter.shouldRetry(this.airplaneMode, networkInfo)) {\n if (bitmapHunter.getPicasso().loggingEnabled) {\n Utils.log(DISPATCHER_THREAD_NAME, \"retrying\", Utils.getLogIdsForHunter(bitmapHunter));\n }\n if (bitmapHunter.getException() instanceof NetworkRequestHandler.ContentLengthException) {\n bitmapHunter.networkPolicy |= NetworkPolicy.NO_CACHE.index;\n }\n bitmapHunter.future = this.service.submit(bitmapHunter);\n return;\n }\n if (this.scansNetworkChanges && bitmapHunter.supportsReplay()) {\n z = true;\n }\n performError(bitmapHunter, z);\n if (z) {\n markForReplay(bitmapHunter);\n }\n }\n }",
"public int getRetryCounter() {\n return retryCounter;\n }",
"public int getRetryCount() {\n return this.retryCount;\n }"
] |
[
"0.75707495",
"0.71223557",
"0.708606",
"0.708606",
"0.708606",
"0.70619875",
"0.70552206",
"0.7043375",
"0.70329213",
"0.7000176",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.68454117",
"0.67548937",
"0.66509813",
"0.66171354",
"0.6563032",
"0.65053856",
"0.6490632",
"0.6428123",
"0.6406295",
"0.63772553",
"0.6373688",
"0.63179487",
"0.62930536",
"0.6232586",
"0.6228076",
"0.6208991",
"0.61556816",
"0.6153714",
"0.61366165",
"0.61240745",
"0.609088",
"0.60801405",
"0.60801405",
"0.60801405",
"0.60801286",
"0.6069371",
"0.60616755",
"0.60025185",
"0.59949255",
"0.5989343",
"0.5971205",
"0.59620184",
"0.59328943",
"0.5919711",
"0.5915562",
"0.59127265",
"0.5908276",
"0.5889815",
"0.5880013",
"0.5861297",
"0.5841774",
"0.5832887",
"0.5829258",
"0.58266306",
"0.58247644",
"0.5807472",
"0.5777949",
"0.57727486",
"0.57669175",
"0.57663864",
"0.57340205",
"0.57249516",
"0.57184875",
"0.57108945",
"0.5710721",
"0.5696096",
"0.56867766",
"0.5666037",
"0.565227",
"0.56513613",
"0.56513613",
"0.56483084",
"0.5628219",
"0.56266356",
"0.5614541",
"0.56120384",
"0.5610174",
"0.5609583",
"0.558204",
"0.5580145",
"0.5569716",
"0.5561803",
"0.55507225",
"0.55472994",
"0.553112",
"0.55132467",
"0.55084723",
"0.5488465",
"0.54863226"
] |
0.7021514
|
11
|
called before request is started
|
@Override
public void onStart() {
progress.setMessage(context.getString(R.string.msg_connecting));
progress.show();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}",
"private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}",
"protected void onBeginRequest()\n\t{\n\t}",
"@Override\n\tpublic void initRequest() {\n\n\t}",
"@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}",
"@Override\n public void beforeStart() {\n \n }",
"private Request() {\n initFields();\n }",
"protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}",
"protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}",
"private WebRequest() {\n initFields();\n }",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void preServe() {\n\n\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public void onStart() {\n // onStart might not be called because this object may be created after the fragment/activity's onStart method.\n connectivityMonitor.register();\n\n requestTracker.resumeRequests();\n }",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}",
"protected void onBegin() {}",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@Override\n public void init(final FilterConfig filterConfig) {\n Misc.log(\"Request\", \"initialized\");\n }",
"public void onStart() {\n /* do nothing - stub */\n }",
"@Test(expected=IllegalStateException.class)\n public void onRequestBeforeInitialization() {\n onRequest();\n fail(\"cannot do stubbing, Jadler hasn't been initialized yet\");\n }",
"@Override\n public void preRun() {\n super.preRun();\n }",
"public void request() {\n }",
"@Override\n\tpublic void onStart() {\n\n\t\tsuper.onStart();\n\n\t\t/*\n\t\t * Connect the client. Don't re-start any requests here;\n\t\t * instead, wait for onResume()\n\t\t */\n\t\tmLocationClient.connect();\n\t}",
"private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }",
"@Override\n\tpublic String init_request() {\n\t\treturn null;\n\t}",
"private RequestManager() {\n\t // no instances\n\t}",
"private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}",
"public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }",
"@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}",
"private void initData() {\n requestServerToGetInformation();\n }",
"public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}",
"private void doBeforeApplyRequest(final PhaseEvent arg0) {\n\t}",
"@Override\n public void onStart() {\n \n }",
"@Override\n public void onStart() {\n \n }",
"@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }",
"protected void onFirstUse() {}",
"private RequestExecution() {}",
"private Request() {}",
"private Request() {}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"public static void initial(Context context) {\n VDVolley.VDVolleyRequestManager.initial(context);\n }",
"@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}",
"@Override\n protected void doInit() {\n super.doInit();\n this.startTime = (String) this.getRequest().getAttributes().get(\"startTime\");\n this.endTime = (String) this.getRequest().getAttributes().get(\"endTime\");\n this.interval = (String) this.getRequest().getAttributes().get(\"samplingInterval\");\n }",
"@Before\n public void setup() {\n config.setProperty(Constants.PROPERTY_RETRY_DELAY, \"1\");\n config.setProperty(Constants.PROPERTY_RETRY_LIMIT, \"3\");\n rc = new RequestContext(null);\n rc.setTimeToLiveSeconds(2);\n }",
"protected void preload(HttpServletRequest request) {\r\n/* 39 */ log.debug(\"RoomCtl preload method start\");\r\n/* 40 */ HostelModel model = new HostelModel();\r\n/* */ try {\r\n/* 42 */ List l = model.list();\r\n/* 43 */ request.setAttribute(\"hostelList\", l);\r\n/* 44 */ } catch (ApplicationException e) {\r\n/* 45 */ log.error(e);\r\n/* */ } \r\n/* 47 */ log.debug(\"RoomCtl preload method end\");\r\n/* */ }",
"private void handleRequestOnPre() {\n ConnectionsFragment frag = (ConnectionsFragment) getSupportFragmentManager()\n .findFragmentByTag(getString(R.string.keys_fragment_connections));\n frag.handleRequestOnPre();\n }",
"protected void start() {\n }",
"public void onStart() {\n\t\t\n\t}",
"@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"private void setupRequestContext() {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\n\t\tRequestContextHolder.setRequestAttributes(attributes);\n\t}",
"public void init(HttpServletRequest request) throws ServletException {\n\t}",
"protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}",
"@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }",
"@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}",
"public void startProcessingRequest(MailboxSession session) {\n // Do nothing \n }",
"@Override\r\npublic void requestInitialized(ServletRequestEvent arg0) {\n\t\r\n}",
"public void initRequest() {\n repo.getData();\n }",
"public void onModuleLoad() {\n\n\t\tJsonpRequestBuilder requestBuilder = new JsonpRequestBuilder();\n\t\t// requestBuilder.setTimeout(10000);\n//\t\trequestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback());\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"public void onStart() {\n }",
"private void runBaseInit(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.initBaseSim();\n }",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"@Override\r\n public void start() {\r\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(\"tag\",\"onStart\" );\n\t}",
"@Override\n public void start() {\n }",
"@Override public void start() {\n }",
"public void before() {\n process = Thread.currentThread();\n }",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}",
"private void onPreRequestData(int tag) {\n }"
] |
[
"0.75935924",
"0.7434612",
"0.73579293",
"0.7111827",
"0.709784",
"0.7078375",
"0.6828659",
"0.6786365",
"0.6777992",
"0.67673975",
"0.66835743",
"0.6548043",
"0.64955246",
"0.6423946",
"0.642192",
"0.6405631",
"0.6396179",
"0.6341774",
"0.63408804",
"0.6340001",
"0.63343185",
"0.6332091",
"0.6324497",
"0.6319413",
"0.6308262",
"0.63070047",
"0.6294066",
"0.62936974",
"0.62899816",
"0.6280114",
"0.6251576",
"0.6250244",
"0.62485415",
"0.6239764",
"0.6239764",
"0.62341434",
"0.6220207",
"0.6206572",
"0.619618",
"0.619618",
"0.6189883",
"0.6189883",
"0.616631",
"0.6163374",
"0.6162591",
"0.6162158",
"0.61620075",
"0.615203",
"0.6147391",
"0.6136904",
"0.61330914",
"0.61321586",
"0.61321586",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.60981625",
"0.60883504",
"0.6082095",
"0.6081294",
"0.60770726",
"0.60736835",
"0.6072115",
"0.6066453",
"0.60584384",
"0.604778",
"0.6046884",
"0.6045228",
"0.6045228",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60396403",
"0.6036059",
"0.6030069",
"0.6015103",
"0.6014955",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6000028",
"0.5998341",
"0.5994331",
"0.59908134",
"0.59816813",
"0.5978696",
"0.5975132",
"0.5972102",
"0.5972102",
"0.5969578",
"0.59682727"
] |
0.0
|
-1
|
called when response HTTP status is "4XX" (eg. 401, 403, 404)
|
@Override
public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {
progress.dismiss();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void authenticationFailedHandler(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) {\n response.setHeader(HttpHeaders.WWW_AUTHENTICATE, \"Basic\");\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n }",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\t\tpublic void onError(int httpcode) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] bytes, Throwable throwable) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if (statusCode == 404) {\n Toast.makeText(getApplicationContext(),\n \"Requested resource not found\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n Toast.makeText(getApplicationContext(),\n \"Something went wrong at server end\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else {\n Toast.makeText(\n getApplicationContext(),\n \"Error Occured n Most Common Error: n1. Device not connected to Internetn2. Web App is not deployed in App servern3. App server is not runningn HTTP Status code : \"\n + statusCode, Toast.LENGTH_LONG)\n .show();\n }\n }",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, AuthenticationException failed) throws IOException {\n\t\t\n\t\tresponse.setStatus(401);\n response.setContentType(\"application/json\"); \n response.getWriter().append(json(failed));\n\t}",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {\n }",
"void heartbeatInvalidStatusCode(XMLHttpRequest xhr);",
"@Override\n protected void handleErrorResponseCode(int code, String message) {\n }",
"public abstract int statusCode();",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '400'\n if(statusCode == 400){\n Toast.makeText(getApplicationContext(), \"Error Creating Donation!!\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 400, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"int getStatusCode();",
"int getStatusCode();",
"int getStatusCode( );",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable e, JSONArray errorResponse) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if(statusCode == 404){\n Toast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n\t\t\t\t\tpublic void httpFail(String response) {\n\t\t\t\t\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\r\n public void afterCompletion(HttpServletRequest request,\r\n HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception \r\n {\n }",
"@Override\r\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception {\n \r\n }",
"@Override\n public void commence(HttpServletRequest request,\n HttpServletResponse response,\n AuthenticationException authException) throws IOException {\n\n String requestURI = request.getRequestURI();\n if(requestURI.startsWith(\"/api\")){\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n BaseResponse baseResponse = new BaseResponse();\n baseResponse.setMessage(authException.getMessage());\n baseResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n out.write(new ObjectMapper().writeValueAsString(baseResponse));\n out.flush();\n out.close();\n\n// response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n }else {\n response.sendRedirect(\"/login?redirect=\"+requestURI);\n }\n }",
"private void abortUnauthorised(HttpServletResponse httpResponse) throws IOException {\n httpResponse.setHeader(HttpHeaders.WWW_AUTHENTICATE, WWW_AUTHENTICATION_HEADER);\n httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, UNAUTHORISED_MESSAGE);\n }",
"abstract Integer getStatusCode();",
"@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Throwable error,\n String content) {\n\n if(statusCode == 404){\n Toast.makeText(context, \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }else if(statusCode == 500){\n Toast.makeText(context, \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }else{\n // Toast.makeText(context, \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n Log.e(\"status Response\", String.valueOf(volleyError));\n // mProgressDialog.dismiss();\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest req, HttpServletResponse resp, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"public void setHttpStatusCode(int value) {\n this.httpStatusCode = value;\n }",
"public abstract int getHttpStatusErrorCode();",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .entity(\"You cannot access this resource\").build()\n );\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n // Showing error message if something goes wrong.\n Toast.makeText(ClaimStatusActivity.this, volleyError.toString(), Toast.LENGTH_LONG).show();\n }",
"private final void m37299a(int i) throws Exception {\n if (Callback.DEFAULT_DRAG_ANIMATION_DURATION <= i) {\n if (299 >= i) {\n return;\n }\n }\n if (i != 405) {\n if (i != 409) {\n if (i != 410) {\n if (i != 422) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Network Error: status code \");\n stringBuilder.append(i);\n throw new IOException(stringBuilder.toString());\n }\n }\n }\n }\n throw ((Throwable) new UsernameTakenException());\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\r\n\t\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tbyte[] binaryData, Throwable error) {\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfor (Header h : headers) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"========\", h.getName() + \"----------->\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ URLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (binaryData != null) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"=====+\", \"content : \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t\tLog.e(\"statusCode : \", statusCode + \"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\tif (ppd != null) {\r\n//\t\t\t\t\t\t\t\tppd.dismiss();\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tTool.showToast(context, \"系统错误!\");\r\n\t\t\t\t\t\t}",
"public static void validateResponseStatusCode(Response response) {\n\t\tresponse.then().statusCode(200);\n\n\t}",
"public void setResponseStatus(int responseStatus) {\n this.responseStatus = responseStatus;\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.i(\"doRequest\", \"doRequest failed\");\n\n }",
"@Override\n\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\tAuthenticationException authException) throws IOException, ServletException {\n\t\tApiResponse res = new ApiResponse(HttpServletResponse.SC_UNAUTHORIZED, \"Unauthorised\");\n\t\tres.setErrors(authException.getMessage());\n\t\tres.setStatus(false);\n OutputStream out = response.getOutputStream();\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(out, res);\n out.flush();\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"获取订单超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n\r\n }",
"@Override\n public void onSuccess(Response response) {\n if (Responses.isServerErrorRange(response)\n || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) {\n OptionalInt next = incrementHostIfNecessary(pin);\n instrumentation.receivedErrorStatus(pin, channel, response, next);\n } else {\n instrumentation.successfulResponse(channel.stableIndex());\n }\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tHandlerInterceptor.super.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\r\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onResponceError(final ErrorCode errorCode) {\n }",
"private void setStatusCode(String statusLine) {\n \n \t\tString[] each = statusLine.split( \" \" );\n \t\tresponseHTTPVersion = each[0];\n \t\tstatusCode = each[1];\n\t\treasonPhrase = each[2];\n \t}",
"private AuthenticationFailureHandler authenticationFailureHandler() {\r\n return (HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) -> {\r\n prepareResponse(response, null, HttpStatus.UNAUTHORIZED,\r\n exception);\r\n };\r\n }",
"@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}",
"public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\r\n\t}",
"public int statusCode(){\n return code;\n }",
"public void setHttpStatusCode(Integer httpStatusCode) {\n this.httpStatusCode = httpStatusCode;\n }",
"private void badMove(HttpServletResponse response) throws IOException {\r\n // Handle a bad request\r\n response.setStatus(400);\r\n try (PrintWriter out = response.getWriter()) {\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Tic Tac Toe</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>400 Bad Request</h1>\");\r\n out.println(\"</html>\"); \r\n }\r\n }",
"private void handleError(HttpServletResponse resp, Throwable ex) {\r\n try {\r\n if (resp.isCommitted()) {\r\n PrintWriter out = resp.getWriter();\r\n ex.printStackTrace(out);\r\n return;\r\n }\r\n resp.setStatus(500);\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<html>\");\r\n out.println(\" <head><title>Execution Error: 500</title></head>\");\r\n out.println(\" <body>\");\r\n out.println(\" <h2>Execution Error: \"+ex.getClass().getSimpleName()+\"</h2>\");\r\n out.println(\" <p>Stack trace:</p>\");\r\n out.print(\" <blockquote><pre>\");\r\n if (ex instanceof RhinoException) {\r\n RhinoException rex = (RhinoException)ex;\r\n rex.printStackTrace(out);\r\n } else {\r\n ex.printStackTrace(out);\r\n }\r\n out.println(\"</pre></blockquote>\");\r\n out.println(\" <p><address>Powered by Alt Framework</address></p>\");\r\n out.println(\" </body>\");\r\n out.println(\"</html>\");\r\n } catch (IOException ex2) {\r\n ex2.printStackTrace(System.err);\r\n }\r\n }",
"void setResponseFormatError(){\n responseFormatError = true;\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n\n NetworkResponse networkResponse = error.networkResponse;\n Log.i(\"Checking\", new String(error.networkResponse.data));\n if(networkResponse != null && networkResponse.data != null)\n {\n switch (networkResponse.statusCode)\n {\n\n default:\n break;\n }\n }\n }",
"public final void handleError(Throwable th) {\r\n if (!(th instanceof HttpException)) {\r\n Snackbar.Companion.showMessage(this, \"죄송합니다.\\n서비스가 잠시 지연되고 있습니다.\\n잠시 후 다시 이용해주세요.\");\r\n } else if (((HttpException) th).code() == 401) {\r\n Intent intent = new Intent(this, IntroActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }\r\n }",
"@Override\n\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\n\t\t}"
] |
[
"0.6556771",
"0.6077015",
"0.6009509",
"0.60011625",
"0.58474255",
"0.5837503",
"0.5828418",
"0.5827644",
"0.5789087",
"0.5762918",
"0.57514864",
"0.5749605",
"0.5708024",
"0.5708024",
"0.56651163",
"0.56601477",
"0.5637643",
"0.5623692",
"0.5621627",
"0.5621548",
"0.56179726",
"0.5612367",
"0.56021035",
"0.5597549",
"0.5587198",
"0.5586976",
"0.5586976",
"0.556676",
"0.5561483",
"0.55557436",
"0.5535916",
"0.55345094",
"0.54923624",
"0.54899997",
"0.54794014",
"0.54766464",
"0.547494",
"0.547494",
"0.5471556",
"0.5461637",
"0.5456165",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5429481",
"0.5427608",
"0.5427608",
"0.5424738",
"0.54235286",
"0.54234964",
"0.54202765",
"0.54136056",
"0.5412538",
"0.5411571",
"0.53989565",
"0.5390575",
"0.5390575",
"0.53829384",
"0.5379672",
"0.5379672",
"0.53763235",
"0.5375512",
"0.5373627",
"0.53614867",
"0.5357745",
"0.5357003",
"0.5357003",
"0.53449166",
"0.53449166",
"0.53449166",
"0.53432655",
"0.53255516",
"0.53249854",
"0.5322552",
"0.5320998",
"0.53180057",
"0.5313068",
"0.5313068",
"0.53125215",
"0.53115463",
"0.53062314",
"0.53062314",
"0.5305276",
"0.5299047",
"0.52971244",
"0.52939934",
"0.5291314",
"0.52906823",
"0.5286733",
"0.52840805",
"0.5282959",
"0.52825016",
"0.52775574",
"0.5270314",
"0.5269613",
"0.5262051"
] |
0.56389934
|
16
|
called when request is retried
|
@Override
public void onRetry(int retryNo) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onRetry(HttpRequest req, String reason) {\n\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\n\t\tpublic boolean isRetry() { return true; }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"void doRetry();",
"@Override\n\t\tpublic boolean isRetry() { return false; }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"void onRetryAuthentication();",
"@Override\n void setRetry() {\n if (mNextReqTime > 32 * 60 * 1000 || mController.isStop()) {\n if (DEBUG)\n Log.d(TAG, \"################ setRetry timeout, cancel retry : \" + mController.isStop());\n cancelRetry();\n return;\n }\n if (mCurRetryState == RetryState.IDLE) {\n mCurRetryState = RetryState.RUNNING;\n if (mReceiver == null) {\n IntentFilter filter = new IntentFilter(INTENT_ACTION_RETRY);\n mReceiver = new stateReceiver();\n mContext.registerReceiver(mReceiver, filter);\n }\n\n }\n Intent intent = new Intent(INTENT_ACTION_RETRY);\n PendingIntent sender = PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n long nextReq = SystemClock.elapsedRealtime() + mNextReqTime;\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(nextReq);\n if(DEBUG) Log.i(TAG, \"start to get location after: \" + mNextReqTime + \"ms\");\n mAlarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextReq, sender);\n mNextReqTime = mNextReqTime * 2;\n }",
"public int getRequestRetryCount() {\n \t\treturn 1;\n \t}",
"public void markRequestRetryReplace() throws JNCException {\n markLeafReplace(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n super.onRetry(retryNo);\n // 返回重试次数\n }",
"public abstract long retryAfter();",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext context) {\n\t\t\tif (executionCount >= MAX_REQUEST_RETRY_COUNTS) {\n\t\t\t\t// Do not retry if over max retry count\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (exception instanceof NoHttpResponseException) {\n\t\t\t\t// Retry if the server dropped connection on us\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (exception instanceof SSLHandshakeException) {\n\t\t\t\t// Do not retry on SSL handshake exception\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tHttpRequest request = (HttpRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);\n\t\t\tboolean idempotent = (request instanceof HttpEntityEnclosingRequest);\n\t\t\tif (!idempotent) {\n\t\t\t\t// Retry if the request is considered idempotent\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\n\t\t}",
"public void addRequestRetry() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"request-retry\",\n null,\n childrenNames());\n }",
"public int retry() {\r\n\t\treturn ++retryCount;\r\n\t}",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"public boolean isRetried ()\r\n {\r\n return hasFailed () && retried_;\r\n }",
"public void onTryFails(int currentRetryCount, Exception e) {}",
"@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }",
"private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }",
"public void markRequestRetryCreate() throws JNCException {\n markLeafCreate(\"requestRetry\");\n }",
"public void retryRequired(){\n startFetching(query);\n }",
"public boolean isRetry();",
"public DefaultHttpRequestRetryHandler() {\n this(3);\n }",
"public void incrementRetryCount() {\n this.retryCount++;\n }",
"public void markRequestRetryDelete() throws JNCException {\n markLeafDelete(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\tpublic void setWasRetried(boolean wasRetried) {\n\t\t\t\n\t\t}",
"private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }",
"boolean allowRetry(int retry, long startTimeOfExecution);",
"@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}",
"@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}",
"void retry(Task task);",
"public interface OnRetryListener {\n void onRetry();\n}",
"public synchronized void onRequestFailed(Throwable reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"@Override\n\tpublic void onReplayFailed(Throwable cause) {\n\n\t}",
"@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}",
"public void retrySending()\n {\n try\n {\n EmailConfig emailConfig = getEmailConfig();\n int maxRetries = emailConfig.getMaxRetries().intValue();\n boolean saveFailedMails = emailConfig.getSaveFailedEmails();\n List messageFileList = getMessagesInFolder(IEmailConfiguration.EMAIL_RETRY_PATH);\n \n if (maxRetries > 0 && messageFileList.size()>0)\n {\n Session session = getMailSession(true);\n for (Iterator i = messageFileList.iterator(); i.hasNext();)\n {\n resendMail(session, (File)i.next(), maxRetries, saveFailedMails);\n }\n }\n }\n catch (Throwable th)\n {\n AlertLogger.warnLog(CLASSNAME,\"retrySending\",\"Error in retrySending\",th);\n }\n }",
"public boolean isAllowPartialRetryRequests() {\n\t\treturn false;\n\t}",
"public boolean retry() {\n return tries++ < MAX_TRY;\n }",
"void sendRetryMessage(int retryNo);",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"public boolean willRetry() {\n return willRetry;\n }",
"public void markRequestRetryMerge() throws JNCException {\n markLeafMerge(\"requestRetry\");\n }",
"protected abstract void onClickRetryButton();",
"public void resumeRequests() {\n requestTracker.resumeRequests();\n }",
"public synchronized void onRequestFailed(String reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"boolean doRetry() {\n synchronized (mHandler) {\n boolean doRetry = currentRetry < MAX_RETRIES;\n boolean futureSync = mHandler.hasMessages(0);\n\n if (doRetry && !futureSync) {\n currentRetry++;\n mHandler.postDelayed(getNewRunnable(), currentRetry * 15_000);\n }\n\n return mHandler.hasMessages(0);\n }\n }",
"public void resendRequestingQueue() {\n Logger.m1416d(TAG, \"Action - resendRequestingQueue - size:\" + this.mRequestingQueue.size());\n printRequestingQueue();\n printRequestingCache();\n while (true) {\n Requesting requesting = (Requesting) this.mRequestingQueue.pollFirst();\n if (requesting == null) {\n return;\n }\n if (requesting.request.getCommand() == 2) {\n this.mRequestingQueue.remove(requesting);\n this.mRequestingCache.remove(requesting.request.getHead().getRid());\n } else {\n requesting.retryAgain();\n sendCommandWithLoggedIn(requesting);\n }\n }\n }",
"@Override\n protected void onRequestTimeout(Tuple request) {\n }",
"public static HttpRequestRetryHandler getRetryHandler(final String... details) throws JSONException {\n\t\treturn new HttpRequestRetryHandler() {\n\t\t\t@Override\n\t\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext httpContext) {\n\t\t\t\tLOGGER.info(\"Request Execution no: \" + executionCount);\n\t\t\t\t// System.out.println(\"Request Execution no: \"+executionCount);\n\t\t\t\tif (executionCount >= 5) {\n\t\t\t\t\tLOGGER.info(\"Aborting Request retry using Job Schedular\");\n\t\t\t\t\tSystem.out.println(details);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tLOGGER.info(\"Retrying request...\");\n\t\t\t\t// System.out.println(\"Retrying request...\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t}",
"protected int retryLimit() {\n return DEFAULT_RETRIES;\n }",
"@Override\n public int getRetryDelay() {\n return retryDelay;\n }",
"@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }",
"@Around(\"execution(public void edu.sjsu.cmpe275.aop.TweetService.*(..))\")\n public Object retryAdvice(ProceedingJoinPoint joinPoint) throws Throwable {\n IOException exception = null;\n boolean retry = false;\n for (int i = 1; i <= 4; i++) {\n if (retry) {\n System.out.println(\"Network Error: Retry #\" + (i - 1));\n }\n try {\n// System.out.println(\"proceed !!! - \" + i);\n return joinPoint.proceed();\n } catch (IOException e) {\n System.out.println(\"Network Exception!!\");\n exception = e;\n retry = true;\n }\n }\n return joinPoint;\n }",
"@Test\n\tpublic void testRetryTheSuccess() {\n\t\tgenerateValidRequestMock();\n\t\tworker = PowerMockito.spy(new HttpRepublisherWorker(dummyPublisher, actionedRequest));\n\t\tWhitebox.setInternalState(worker, CloseableHttpClient.class, httpClientMock);\n\t\ttry {\n\t\t\twhen(httpClientMock.execute(any(HttpRequestBase.class), any(ResponseHandler.class)))\n\t\t\t\t\t.thenThrow(new IOException(\"Exception to retry on\")).thenReturn(mockResponse);\n\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not reach here!\");\n\t\t}\n\t\tworker.run();\n\t\t// verify should attempt to calls\n\t\ttry {\n\t\t\tverify(httpClientMock, times(2)).execute(any(HttpRequestBase.class), any(ResponseHandler.class));\n\t\t\tassertEquals(RequestState.SUCCESS, actionedRequest.getAction());\n\t\t} catch (ClientProtocolException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t}\n\t}",
"String getLogRetryAttempted();",
"public interface RetryCallback {\n void retry();\n}",
"public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }",
"public Object doWithRetry(RetryContext context) throws Throwable {\n \t\t\t\t((StringHolder) item).string = ((StringHolder) item).string + (count++);\n \t\t\t\tthrow new RuntimeException(\"Barf!\");\n \t\t\t}",
"protected short maxRetries() { return 15; }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"int getRetries();",
"@Override\n public void onFailure(@NonNull Exception e) {\n resultCallback.onResultCallback(Result.retry());\n }",
"public void retry(String myError) {\n try {\n request.setAttribute(\"myError\", myError);\n servletCtx.getRequestDispatcher(\"/hiddenJsps/iltds/asm/asmFormLookup.jsp\").forward(\n request,\n response);\n }\n catch (Exception e) {\n e.printStackTrace();\n ReportError err = new ReportError(request, response, servletCtx);\n err.setFromOp(this.getClass().getName());\n err.setErrorMessage(e.toString());\n try {\n err.invoke();\n }\n catch (Exception _axxx) {\n }\n return;\n }\n\n }",
"@Override\n public void onRetry(EasyVideoPlayer player, Uri source) {\n }",
"public boolean shouldRetryOnTimeout() {\r\n return configuration.shouldRetryOnTimeout();\r\n }",
"public void setRecoveryRetries(int retries);",
"@Override\n protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {\n return RetryConstraint.CANCEL;\n }",
"@Override\n public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {\n if (response.getStatusCode() != 429 || isRateLimitError(response)) {\n return false;\n }\n\n try {\n // Note that this will consume the response body. At this point,\n // subsequent retry handlers or error handlers will not be able to read\n // again the payload, but that should only be attempted when the\n // command is not retryable and an exception should be thrown.\n Error error = parseError.apply(response);\n logger.debug(\"processing error: %s\", error);\n\n boolean isRetryable = RETRYABLE_ERROR_CODE.equals(error.details().code());\n return isRetryable ? super.shouldRetryRequest(command, response) : false;\n } catch (Exception ex) {\n // If we can't parse the error, just assume it is not a retryable error\n logger.warn(\"could not parse error. Request won't be retried: %s\", ex.getMessage());\n return false;\n }\n }",
"void doShowRetry();",
"int getSleepBeforeRetry();",
"@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n }",
"@Override\n public void refresh404(String tag) {\n this.retrySubredditLoad(tag, true);\n }",
"int getRetryCount() {\n return retryCount;\n }",
"@Override\npublic boolean retry(ITestResult result) {\n\tif(minretryCount<=maxretryCount){\n\t\t\n\t\tSystem.out.println(\"Following test is failing====\"+result.getName());\n\t\t\n\t\tSystem.out.println(\"Retrying the test Count is=== \"+ (minretryCount+1));\n\t\t\n\t\t//increment counter each time by 1 \n\t\tminretryCount++;\n\n\t\treturn true;\n\t}\n\treturn false;\n}",
"protected void responseFail(){\n\t\tqueue.clear();\n\t}",
"@SuppressLint({\"MissingPermission\"})\n public void performRetry(BitmapHunter bitmapHunter) {\n if (!bitmapHunter.isCancelled()) {\n boolean z = false;\n if (this.service.isShutdown()) {\n performError(bitmapHunter, false);\n return;\n }\n NetworkInfo networkInfo = null;\n if (this.scansNetworkChanges) {\n networkInfo = ((ConnectivityManager) Utils.getService(this.context, \"connectivity\")).getActiveNetworkInfo();\n }\n if (bitmapHunter.shouldRetry(this.airplaneMode, networkInfo)) {\n if (bitmapHunter.getPicasso().loggingEnabled) {\n Utils.log(DISPATCHER_THREAD_NAME, \"retrying\", Utils.getLogIdsForHunter(bitmapHunter));\n }\n if (bitmapHunter.getException() instanceof NetworkRequestHandler.ContentLengthException) {\n bitmapHunter.networkPolicy |= NetworkPolicy.NO_CACHE.index;\n }\n bitmapHunter.future = this.service.submit(bitmapHunter);\n return;\n }\n if (this.scansNetworkChanges && bitmapHunter.supportsReplay()) {\n z = true;\n }\n performError(bitmapHunter, z);\n if (z) {\n markForReplay(bitmapHunter);\n }\n }\n }",
"public int getRetryCounter() {\n return retryCounter;\n }",
"public int getRetryCount() {\n return this.retryCount;\n }"
] |
[
"0.75707495",
"0.71223557",
"0.708606",
"0.708606",
"0.708606",
"0.70619875",
"0.70552206",
"0.7043375",
"0.70329213",
"0.7000176",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.68454117",
"0.67548937",
"0.66509813",
"0.66171354",
"0.6563032",
"0.65053856",
"0.6490632",
"0.6428123",
"0.6406295",
"0.63772553",
"0.6373688",
"0.63179487",
"0.62930536",
"0.6232586",
"0.6228076",
"0.6208991",
"0.61556816",
"0.6153714",
"0.61366165",
"0.61240745",
"0.609088",
"0.60801405",
"0.60801405",
"0.60801405",
"0.60801286",
"0.6069371",
"0.60616755",
"0.60025185",
"0.59949255",
"0.5989343",
"0.5971205",
"0.59620184",
"0.59328943",
"0.5919711",
"0.5915562",
"0.59127265",
"0.5908276",
"0.5889815",
"0.5880013",
"0.5861297",
"0.5841774",
"0.5832887",
"0.5829258",
"0.58266306",
"0.58247644",
"0.5807472",
"0.5777949",
"0.57727486",
"0.57669175",
"0.57663864",
"0.57340205",
"0.57249516",
"0.57184875",
"0.57108945",
"0.5710721",
"0.5696096",
"0.56867766",
"0.5666037",
"0.565227",
"0.56513613",
"0.56513613",
"0.56483084",
"0.5628219",
"0.56266356",
"0.5614541",
"0.56120384",
"0.5610174",
"0.5609583",
"0.558204",
"0.5580145",
"0.5569716",
"0.5561803",
"0.55507225",
"0.55472994",
"0.553112",
"0.55132467",
"0.55084723",
"0.5488465",
"0.54863226"
] |
0.7021514
|
10
|
called before request is started
|
@Override
public void onStart() {
progress.setMessage(context.getString(R.string.msg_connecting));
progress.show();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}",
"private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}",
"protected void onBeginRequest()\n\t{\n\t}",
"@Override\n\tpublic void initRequest() {\n\n\t}",
"@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}",
"@Override\n public void beforeStart() {\n \n }",
"private Request() {\n initFields();\n }",
"protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}",
"protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}",
"private WebRequest() {\n initFields();\n }",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void preServe() {\n\n\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public void onStart() {\n // onStart might not be called because this object may be created after the fragment/activity's onStart method.\n connectivityMonitor.register();\n\n requestTracker.resumeRequests();\n }",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}",
"protected void onBegin() {}",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@Override\n public void init(final FilterConfig filterConfig) {\n Misc.log(\"Request\", \"initialized\");\n }",
"public void onStart() {\n /* do nothing - stub */\n }",
"@Test(expected=IllegalStateException.class)\n public void onRequestBeforeInitialization() {\n onRequest();\n fail(\"cannot do stubbing, Jadler hasn't been initialized yet\");\n }",
"@Override\n public void preRun() {\n super.preRun();\n }",
"public void request() {\n }",
"@Override\n\tpublic void onStart() {\n\n\t\tsuper.onStart();\n\n\t\t/*\n\t\t * Connect the client. Don't re-start any requests here;\n\t\t * instead, wait for onResume()\n\t\t */\n\t\tmLocationClient.connect();\n\t}",
"private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }",
"@Override\n\tpublic String init_request() {\n\t\treturn null;\n\t}",
"private RequestManager() {\n\t // no instances\n\t}",
"private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}",
"public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }",
"@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}",
"private void initData() {\n requestServerToGetInformation();\n }",
"public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}",
"private void doBeforeApplyRequest(final PhaseEvent arg0) {\n\t}",
"@Override\n public void onStart() {\n \n }",
"@Override\n public void onStart() {\n \n }",
"@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }",
"protected void onFirstUse() {}",
"private RequestExecution() {}",
"private Request() {}",
"private Request() {}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"public static void initial(Context context) {\n VDVolley.VDVolleyRequestManager.initial(context);\n }",
"@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}",
"@Override\n protected void doInit() {\n super.doInit();\n this.startTime = (String) this.getRequest().getAttributes().get(\"startTime\");\n this.endTime = (String) this.getRequest().getAttributes().get(\"endTime\");\n this.interval = (String) this.getRequest().getAttributes().get(\"samplingInterval\");\n }",
"@Before\n public void setup() {\n config.setProperty(Constants.PROPERTY_RETRY_DELAY, \"1\");\n config.setProperty(Constants.PROPERTY_RETRY_LIMIT, \"3\");\n rc = new RequestContext(null);\n rc.setTimeToLiveSeconds(2);\n }",
"protected void preload(HttpServletRequest request) {\r\n/* 39 */ log.debug(\"RoomCtl preload method start\");\r\n/* 40 */ HostelModel model = new HostelModel();\r\n/* */ try {\r\n/* 42 */ List l = model.list();\r\n/* 43 */ request.setAttribute(\"hostelList\", l);\r\n/* 44 */ } catch (ApplicationException e) {\r\n/* 45 */ log.error(e);\r\n/* */ } \r\n/* 47 */ log.debug(\"RoomCtl preload method end\");\r\n/* */ }",
"private void handleRequestOnPre() {\n ConnectionsFragment frag = (ConnectionsFragment) getSupportFragmentManager()\n .findFragmentByTag(getString(R.string.keys_fragment_connections));\n frag.handleRequestOnPre();\n }",
"protected void start() {\n }",
"public void onStart() {\n\t\t\n\t}",
"@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"private void setupRequestContext() {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\n\t\tRequestContextHolder.setRequestAttributes(attributes);\n\t}",
"public void init(HttpServletRequest request) throws ServletException {\n\t}",
"protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}",
"@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }",
"@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}",
"public void startProcessingRequest(MailboxSession session) {\n // Do nothing \n }",
"@Override\r\npublic void requestInitialized(ServletRequestEvent arg0) {\n\t\r\n}",
"public void initRequest() {\n repo.getData();\n }",
"public void onModuleLoad() {\n\n\t\tJsonpRequestBuilder requestBuilder = new JsonpRequestBuilder();\n\t\t// requestBuilder.setTimeout(10000);\n//\t\trequestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback());\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"public void onStart() {\n }",
"private void runBaseInit(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.initBaseSim();\n }",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"@Override\r\n public void start() {\r\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(\"tag\",\"onStart\" );\n\t}",
"@Override\n public void start() {\n }",
"@Override public void start() {\n }",
"public void before() {\n process = Thread.currentThread();\n }",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}",
"private void onPreRequestData(int tag) {\n }"
] |
[
"0.75935924",
"0.7434612",
"0.73579293",
"0.7111827",
"0.709784",
"0.7078375",
"0.6828659",
"0.6786365",
"0.6777992",
"0.67673975",
"0.66835743",
"0.6548043",
"0.64955246",
"0.6423946",
"0.642192",
"0.6405631",
"0.6396179",
"0.6341774",
"0.63408804",
"0.6340001",
"0.63343185",
"0.6332091",
"0.6324497",
"0.6319413",
"0.6308262",
"0.63070047",
"0.6294066",
"0.62936974",
"0.62899816",
"0.6280114",
"0.6251576",
"0.6250244",
"0.62485415",
"0.6239764",
"0.6239764",
"0.62341434",
"0.6220207",
"0.6206572",
"0.619618",
"0.619618",
"0.6189883",
"0.6189883",
"0.616631",
"0.6163374",
"0.6162591",
"0.6162158",
"0.61620075",
"0.615203",
"0.6147391",
"0.6136904",
"0.61330914",
"0.61321586",
"0.61321586",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.60981625",
"0.60883504",
"0.6082095",
"0.6081294",
"0.60770726",
"0.60736835",
"0.6072115",
"0.6066453",
"0.60584384",
"0.604778",
"0.6046884",
"0.6045228",
"0.6045228",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60396403",
"0.6036059",
"0.6030069",
"0.6015103",
"0.6014955",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6000028",
"0.5998341",
"0.5994331",
"0.59908134",
"0.59816813",
"0.5978696",
"0.5975132",
"0.5972102",
"0.5972102",
"0.5969578",
"0.59682727"
] |
0.0
|
-1
|
called when response HTTP status is "4XX" (eg. 401, 403, 404)
|
@Override
public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {
progress.dismiss();
e.printStackTrace();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void authenticationFailedHandler(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) {\n response.setHeader(HttpHeaders.WWW_AUTHENTICATE, \"Basic\");\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n }",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\t\tpublic void onError(int httpcode) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] bytes, Throwable throwable) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if (statusCode == 404) {\n Toast.makeText(getApplicationContext(),\n \"Requested resource not found\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n Toast.makeText(getApplicationContext(),\n \"Something went wrong at server end\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else {\n Toast.makeText(\n getApplicationContext(),\n \"Error Occured n Most Common Error: n1. Device not connected to Internetn2. Web App is not deployed in App servern3. App server is not runningn HTTP Status code : \"\n + statusCode, Toast.LENGTH_LONG)\n .show();\n }\n }",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, AuthenticationException failed) throws IOException {\n\t\t\n\t\tresponse.setStatus(401);\n response.setContentType(\"application/json\"); \n response.getWriter().append(json(failed));\n\t}",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {\n }",
"void heartbeatInvalidStatusCode(XMLHttpRequest xhr);",
"@Override\n protected void handleErrorResponseCode(int code, String message) {\n }",
"public abstract int statusCode();",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '400'\n if(statusCode == 400){\n Toast.makeText(getApplicationContext(), \"Error Creating Donation!!\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 400, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"int getStatusCode();",
"int getStatusCode();",
"int getStatusCode( );",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable e, JSONArray errorResponse) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if(statusCode == 404){\n Toast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n }",
"@Override\n\t\t\t\t\tpublic void httpFail(String response) {\n\t\t\t\t\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\r\n public void afterCompletion(HttpServletRequest request,\r\n HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception \r\n {\n }",
"@Override\r\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception {\n \r\n }",
"@Override\n public void commence(HttpServletRequest request,\n HttpServletResponse response,\n AuthenticationException authException) throws IOException {\n\n String requestURI = request.getRequestURI();\n if(requestURI.startsWith(\"/api\")){\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n BaseResponse baseResponse = new BaseResponse();\n baseResponse.setMessage(authException.getMessage());\n baseResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n out.write(new ObjectMapper().writeValueAsString(baseResponse));\n out.flush();\n out.close();\n\n// response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n }else {\n response.sendRedirect(\"/login?redirect=\"+requestURI);\n }\n }",
"private void abortUnauthorised(HttpServletResponse httpResponse) throws IOException {\n httpResponse.setHeader(HttpHeaders.WWW_AUTHENTICATE, WWW_AUTHENTICATION_HEADER);\n httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, UNAUTHORISED_MESSAGE);\n }",
"abstract Integer getStatusCode();",
"@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Throwable error,\n String content) {\n\n if(statusCode == 404){\n Toast.makeText(context, \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }else if(statusCode == 500){\n Toast.makeText(context, \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }else{\n // Toast.makeText(context, \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n Log.e(\"status Response\", String.valueOf(volleyError));\n // mProgressDialog.dismiss();\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest req, HttpServletResponse resp, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"public void setHttpStatusCode(int value) {\n this.httpStatusCode = value;\n }",
"public abstract int getHttpStatusErrorCode();",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .entity(\"You cannot access this resource\").build()\n );\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n // Showing error message if something goes wrong.\n Toast.makeText(ClaimStatusActivity.this, volleyError.toString(), Toast.LENGTH_LONG).show();\n }",
"private final void m37299a(int i) throws Exception {\n if (Callback.DEFAULT_DRAG_ANIMATION_DURATION <= i) {\n if (299 >= i) {\n return;\n }\n }\n if (i != 405) {\n if (i != 409) {\n if (i != 410) {\n if (i != 422) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Network Error: status code \");\n stringBuilder.append(i);\n throw new IOException(stringBuilder.toString());\n }\n }\n }\n }\n throw ((Throwable) new UsernameTakenException());\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\r\n\t\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tbyte[] binaryData, Throwable error) {\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfor (Header h : headers) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"========\", h.getName() + \"----------->\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ URLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (binaryData != null) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"=====+\", \"content : \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t\tLog.e(\"statusCode : \", statusCode + \"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\tif (ppd != null) {\r\n//\t\t\t\t\t\t\t\tppd.dismiss();\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tTool.showToast(context, \"系统错误!\");\r\n\t\t\t\t\t\t}",
"public static void validateResponseStatusCode(Response response) {\n\t\tresponse.then().statusCode(200);\n\n\t}",
"public void setResponseStatus(int responseStatus) {\n this.responseStatus = responseStatus;\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.i(\"doRequest\", \"doRequest failed\");\n\n }",
"@Override\n\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\tAuthenticationException authException) throws IOException, ServletException {\n\t\tApiResponse res = new ApiResponse(HttpServletResponse.SC_UNAUTHORIZED, \"Unauthorised\");\n\t\tres.setErrors(authException.getMessage());\n\t\tres.setStatus(false);\n OutputStream out = response.getOutputStream();\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(out, res);\n out.flush();\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"获取订单超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n\r\n }",
"@Override\n public void onSuccess(Response response) {\n if (Responses.isServerErrorRange(response)\n || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) {\n OptionalInt next = incrementHostIfNecessary(pin);\n instrumentation.receivedErrorStatus(pin, channel, response, next);\n } else {\n instrumentation.successfulResponse(channel.stableIndex());\n }\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tHandlerInterceptor.super.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\r\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onResponceError(final ErrorCode errorCode) {\n }",
"private void setStatusCode(String statusLine) {\n \n \t\tString[] each = statusLine.split( \" \" );\n \t\tresponseHTTPVersion = each[0];\n \t\tstatusCode = each[1];\n\t\treasonPhrase = each[2];\n \t}",
"private AuthenticationFailureHandler authenticationFailureHandler() {\r\n return (HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) -> {\r\n prepareResponse(response, null, HttpStatus.UNAUTHORIZED,\r\n exception);\r\n };\r\n }",
"@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}",
"public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\r\n\t}",
"public int statusCode(){\n return code;\n }",
"public void setHttpStatusCode(Integer httpStatusCode) {\n this.httpStatusCode = httpStatusCode;\n }",
"private void badMove(HttpServletResponse response) throws IOException {\r\n // Handle a bad request\r\n response.setStatus(400);\r\n try (PrintWriter out = response.getWriter()) {\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Tic Tac Toe</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>400 Bad Request</h1>\");\r\n out.println(\"</html>\"); \r\n }\r\n }",
"private void handleError(HttpServletResponse resp, Throwable ex) {\r\n try {\r\n if (resp.isCommitted()) {\r\n PrintWriter out = resp.getWriter();\r\n ex.printStackTrace(out);\r\n return;\r\n }\r\n resp.setStatus(500);\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<html>\");\r\n out.println(\" <head><title>Execution Error: 500</title></head>\");\r\n out.println(\" <body>\");\r\n out.println(\" <h2>Execution Error: \"+ex.getClass().getSimpleName()+\"</h2>\");\r\n out.println(\" <p>Stack trace:</p>\");\r\n out.print(\" <blockquote><pre>\");\r\n if (ex instanceof RhinoException) {\r\n RhinoException rex = (RhinoException)ex;\r\n rex.printStackTrace(out);\r\n } else {\r\n ex.printStackTrace(out);\r\n }\r\n out.println(\"</pre></blockquote>\");\r\n out.println(\" <p><address>Powered by Alt Framework</address></p>\");\r\n out.println(\" </body>\");\r\n out.println(\"</html>\");\r\n } catch (IOException ex2) {\r\n ex2.printStackTrace(System.err);\r\n }\r\n }",
"void setResponseFormatError(){\n responseFormatError = true;\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n\n NetworkResponse networkResponse = error.networkResponse;\n Log.i(\"Checking\", new String(error.networkResponse.data));\n if(networkResponse != null && networkResponse.data != null)\n {\n switch (networkResponse.statusCode)\n {\n\n default:\n break;\n }\n }\n }",
"public final void handleError(Throwable th) {\r\n if (!(th instanceof HttpException)) {\r\n Snackbar.Companion.showMessage(this, \"죄송합니다.\\n서비스가 잠시 지연되고 있습니다.\\n잠시 후 다시 이용해주세요.\");\r\n } else if (((HttpException) th).code() == 401) {\r\n Intent intent = new Intent(this, IntroActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }\r\n }",
"@Override\n\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\n\t\t}"
] |
[
"0.6556771",
"0.6077015",
"0.6009509",
"0.60011625",
"0.58474255",
"0.5837503",
"0.5828418",
"0.5827644",
"0.5789087",
"0.5762918",
"0.57514864",
"0.5749605",
"0.5708024",
"0.5708024",
"0.56651163",
"0.56601477",
"0.56389934",
"0.5637643",
"0.5623692",
"0.5621627",
"0.5621548",
"0.56179726",
"0.5612367",
"0.56021035",
"0.5597549",
"0.5587198",
"0.5586976",
"0.5586976",
"0.556676",
"0.55557436",
"0.5535916",
"0.55345094",
"0.54923624",
"0.54899997",
"0.54794014",
"0.54766464",
"0.547494",
"0.547494",
"0.5471556",
"0.5461637",
"0.5456165",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5429481",
"0.5427608",
"0.5427608",
"0.5424738",
"0.54235286",
"0.54234964",
"0.54202765",
"0.54136056",
"0.5412538",
"0.5411571",
"0.53989565",
"0.5390575",
"0.5390575",
"0.53829384",
"0.5379672",
"0.5379672",
"0.53763235",
"0.5375512",
"0.5373627",
"0.53614867",
"0.5357745",
"0.5357003",
"0.5357003",
"0.53449166",
"0.53449166",
"0.53449166",
"0.53432655",
"0.53255516",
"0.53249854",
"0.5322552",
"0.5320998",
"0.53180057",
"0.5313068",
"0.5313068",
"0.53125215",
"0.53115463",
"0.53062314",
"0.53062314",
"0.5305276",
"0.5299047",
"0.52971244",
"0.52939934",
"0.5291314",
"0.52906823",
"0.5286733",
"0.52840805",
"0.5282959",
"0.52825016",
"0.52775574",
"0.5270314",
"0.5269613",
"0.5262051"
] |
0.5561483
|
29
|
called when request is retried
|
@Override
public void onRetry(int retryNo) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onRetry(HttpRequest req, String reason) {\n\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n\t\tpublic boolean isRetry() { return true; }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"void doRetry();",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\n\t\tpublic boolean isRetry() { return false; }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"void onRetryAuthentication();",
"@Override\n void setRetry() {\n if (mNextReqTime > 32 * 60 * 1000 || mController.isStop()) {\n if (DEBUG)\n Log.d(TAG, \"################ setRetry timeout, cancel retry : \" + mController.isStop());\n cancelRetry();\n return;\n }\n if (mCurRetryState == RetryState.IDLE) {\n mCurRetryState = RetryState.RUNNING;\n if (mReceiver == null) {\n IntentFilter filter = new IntentFilter(INTENT_ACTION_RETRY);\n mReceiver = new stateReceiver();\n mContext.registerReceiver(mReceiver, filter);\n }\n\n }\n Intent intent = new Intent(INTENT_ACTION_RETRY);\n PendingIntent sender = PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n long nextReq = SystemClock.elapsedRealtime() + mNextReqTime;\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(nextReq);\n if(DEBUG) Log.i(TAG, \"start to get location after: \" + mNextReqTime + \"ms\");\n mAlarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextReq, sender);\n mNextReqTime = mNextReqTime * 2;\n }",
"public int getRequestRetryCount() {\n \t\treturn 1;\n \t}",
"public void markRequestRetryReplace() throws JNCException {\n markLeafReplace(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n super.onRetry(retryNo);\n // 返回重试次数\n }",
"public abstract long retryAfter();",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext context) {\n\t\t\tif (executionCount >= MAX_REQUEST_RETRY_COUNTS) {\n\t\t\t\t// Do not retry if over max retry count\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (exception instanceof NoHttpResponseException) {\n\t\t\t\t// Retry if the server dropped connection on us\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (exception instanceof SSLHandshakeException) {\n\t\t\t\t// Do not retry on SSL handshake exception\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tHttpRequest request = (HttpRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);\n\t\t\tboolean idempotent = (request instanceof HttpEntityEnclosingRequest);\n\t\t\tif (!idempotent) {\n\t\t\t\t// Retry if the request is considered idempotent\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\n\t\t}",
"public void addRequestRetry() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"request-retry\",\n null,\n childrenNames());\n }",
"public int retry() {\r\n\t\treturn ++retryCount;\r\n\t}",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"public boolean isRetried ()\r\n {\r\n return hasFailed () && retried_;\r\n }",
"public void onTryFails(int currentRetryCount, Exception e) {}",
"@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }",
"private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }",
"public void markRequestRetryCreate() throws JNCException {\n markLeafCreate(\"requestRetry\");\n }",
"public void retryRequired(){\n startFetching(query);\n }",
"public boolean isRetry();",
"public DefaultHttpRequestRetryHandler() {\n this(3);\n }",
"public void incrementRetryCount() {\n this.retryCount++;\n }",
"public void markRequestRetryDelete() throws JNCException {\n markLeafDelete(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\tpublic void setWasRetried(boolean wasRetried) {\n\t\t\t\n\t\t}",
"private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }",
"boolean allowRetry(int retry, long startTimeOfExecution);",
"@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}",
"@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}",
"void retry(Task task);",
"public interface OnRetryListener {\n void onRetry();\n}",
"public synchronized void onRequestFailed(Throwable reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"@Override\n\tpublic void onReplayFailed(Throwable cause) {\n\n\t}",
"@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}",
"public void retrySending()\n {\n try\n {\n EmailConfig emailConfig = getEmailConfig();\n int maxRetries = emailConfig.getMaxRetries().intValue();\n boolean saveFailedMails = emailConfig.getSaveFailedEmails();\n List messageFileList = getMessagesInFolder(IEmailConfiguration.EMAIL_RETRY_PATH);\n \n if (maxRetries > 0 && messageFileList.size()>0)\n {\n Session session = getMailSession(true);\n for (Iterator i = messageFileList.iterator(); i.hasNext();)\n {\n resendMail(session, (File)i.next(), maxRetries, saveFailedMails);\n }\n }\n }\n catch (Throwable th)\n {\n AlertLogger.warnLog(CLASSNAME,\"retrySending\",\"Error in retrySending\",th);\n }\n }",
"public boolean isAllowPartialRetryRequests() {\n\t\treturn false;\n\t}",
"public boolean retry() {\n return tries++ < MAX_TRY;\n }",
"void sendRetryMessage(int retryNo);",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"public boolean willRetry() {\n return willRetry;\n }",
"public void markRequestRetryMerge() throws JNCException {\n markLeafMerge(\"requestRetry\");\n }",
"protected abstract void onClickRetryButton();",
"public void resumeRequests() {\n requestTracker.resumeRequests();\n }",
"public synchronized void onRequestFailed(String reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"boolean doRetry() {\n synchronized (mHandler) {\n boolean doRetry = currentRetry < MAX_RETRIES;\n boolean futureSync = mHandler.hasMessages(0);\n\n if (doRetry && !futureSync) {\n currentRetry++;\n mHandler.postDelayed(getNewRunnable(), currentRetry * 15_000);\n }\n\n return mHandler.hasMessages(0);\n }\n }",
"public void resendRequestingQueue() {\n Logger.m1416d(TAG, \"Action - resendRequestingQueue - size:\" + this.mRequestingQueue.size());\n printRequestingQueue();\n printRequestingCache();\n while (true) {\n Requesting requesting = (Requesting) this.mRequestingQueue.pollFirst();\n if (requesting == null) {\n return;\n }\n if (requesting.request.getCommand() == 2) {\n this.mRequestingQueue.remove(requesting);\n this.mRequestingCache.remove(requesting.request.getHead().getRid());\n } else {\n requesting.retryAgain();\n sendCommandWithLoggedIn(requesting);\n }\n }\n }",
"@Override\n protected void onRequestTimeout(Tuple request) {\n }",
"public static HttpRequestRetryHandler getRetryHandler(final String... details) throws JSONException {\n\t\treturn new HttpRequestRetryHandler() {\n\t\t\t@Override\n\t\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext httpContext) {\n\t\t\t\tLOGGER.info(\"Request Execution no: \" + executionCount);\n\t\t\t\t// System.out.println(\"Request Execution no: \"+executionCount);\n\t\t\t\tif (executionCount >= 5) {\n\t\t\t\t\tLOGGER.info(\"Aborting Request retry using Job Schedular\");\n\t\t\t\t\tSystem.out.println(details);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tLOGGER.info(\"Retrying request...\");\n\t\t\t\t// System.out.println(\"Retrying request...\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t}",
"protected int retryLimit() {\n return DEFAULT_RETRIES;\n }",
"@Override\n public int getRetryDelay() {\n return retryDelay;\n }",
"@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }",
"@Around(\"execution(public void edu.sjsu.cmpe275.aop.TweetService.*(..))\")\n public Object retryAdvice(ProceedingJoinPoint joinPoint) throws Throwable {\n IOException exception = null;\n boolean retry = false;\n for (int i = 1; i <= 4; i++) {\n if (retry) {\n System.out.println(\"Network Error: Retry #\" + (i - 1));\n }\n try {\n// System.out.println(\"proceed !!! - \" + i);\n return joinPoint.proceed();\n } catch (IOException e) {\n System.out.println(\"Network Exception!!\");\n exception = e;\n retry = true;\n }\n }\n return joinPoint;\n }",
"@Test\n\tpublic void testRetryTheSuccess() {\n\t\tgenerateValidRequestMock();\n\t\tworker = PowerMockito.spy(new HttpRepublisherWorker(dummyPublisher, actionedRequest));\n\t\tWhitebox.setInternalState(worker, CloseableHttpClient.class, httpClientMock);\n\t\ttry {\n\t\t\twhen(httpClientMock.execute(any(HttpRequestBase.class), any(ResponseHandler.class)))\n\t\t\t\t\t.thenThrow(new IOException(\"Exception to retry on\")).thenReturn(mockResponse);\n\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not reach here!\");\n\t\t}\n\t\tworker.run();\n\t\t// verify should attempt to calls\n\t\ttry {\n\t\t\tverify(httpClientMock, times(2)).execute(any(HttpRequestBase.class), any(ResponseHandler.class));\n\t\t\tassertEquals(RequestState.SUCCESS, actionedRequest.getAction());\n\t\t} catch (ClientProtocolException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t}\n\t}",
"String getLogRetryAttempted();",
"public interface RetryCallback {\n void retry();\n}",
"public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }",
"public Object doWithRetry(RetryContext context) throws Throwable {\n \t\t\t\t((StringHolder) item).string = ((StringHolder) item).string + (count++);\n \t\t\t\tthrow new RuntimeException(\"Barf!\");\n \t\t\t}",
"protected short maxRetries() { return 15; }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"int getRetries();",
"@Override\n public void onFailure(@NonNull Exception e) {\n resultCallback.onResultCallback(Result.retry());\n }",
"public void retry(String myError) {\n try {\n request.setAttribute(\"myError\", myError);\n servletCtx.getRequestDispatcher(\"/hiddenJsps/iltds/asm/asmFormLookup.jsp\").forward(\n request,\n response);\n }\n catch (Exception e) {\n e.printStackTrace();\n ReportError err = new ReportError(request, response, servletCtx);\n err.setFromOp(this.getClass().getName());\n err.setErrorMessage(e.toString());\n try {\n err.invoke();\n }\n catch (Exception _axxx) {\n }\n return;\n }\n\n }",
"@Override\n public void onRetry(EasyVideoPlayer player, Uri source) {\n }",
"public boolean shouldRetryOnTimeout() {\r\n return configuration.shouldRetryOnTimeout();\r\n }",
"public void setRecoveryRetries(int retries);",
"@Override\n protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {\n return RetryConstraint.CANCEL;\n }",
"@Override\n public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {\n if (response.getStatusCode() != 429 || isRateLimitError(response)) {\n return false;\n }\n\n try {\n // Note that this will consume the response body. At this point,\n // subsequent retry handlers or error handlers will not be able to read\n // again the payload, but that should only be attempted when the\n // command is not retryable and an exception should be thrown.\n Error error = parseError.apply(response);\n logger.debug(\"processing error: %s\", error);\n\n boolean isRetryable = RETRYABLE_ERROR_CODE.equals(error.details().code());\n return isRetryable ? super.shouldRetryRequest(command, response) : false;\n } catch (Exception ex) {\n // If we can't parse the error, just assume it is not a retryable error\n logger.warn(\"could not parse error. Request won't be retried: %s\", ex.getMessage());\n return false;\n }\n }",
"void doShowRetry();",
"int getSleepBeforeRetry();",
"@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n }",
"@Override\n public void refresh404(String tag) {\n this.retrySubredditLoad(tag, true);\n }",
"int getRetryCount() {\n return retryCount;\n }",
"@Override\npublic boolean retry(ITestResult result) {\n\tif(minretryCount<=maxretryCount){\n\t\t\n\t\tSystem.out.println(\"Following test is failing====\"+result.getName());\n\t\t\n\t\tSystem.out.println(\"Retrying the test Count is=== \"+ (minretryCount+1));\n\t\t\n\t\t//increment counter each time by 1 \n\t\tminretryCount++;\n\n\t\treturn true;\n\t}\n\treturn false;\n}",
"protected void responseFail(){\n\t\tqueue.clear();\n\t}",
"@SuppressLint({\"MissingPermission\"})\n public void performRetry(BitmapHunter bitmapHunter) {\n if (!bitmapHunter.isCancelled()) {\n boolean z = false;\n if (this.service.isShutdown()) {\n performError(bitmapHunter, false);\n return;\n }\n NetworkInfo networkInfo = null;\n if (this.scansNetworkChanges) {\n networkInfo = ((ConnectivityManager) Utils.getService(this.context, \"connectivity\")).getActiveNetworkInfo();\n }\n if (bitmapHunter.shouldRetry(this.airplaneMode, networkInfo)) {\n if (bitmapHunter.getPicasso().loggingEnabled) {\n Utils.log(DISPATCHER_THREAD_NAME, \"retrying\", Utils.getLogIdsForHunter(bitmapHunter));\n }\n if (bitmapHunter.getException() instanceof NetworkRequestHandler.ContentLengthException) {\n bitmapHunter.networkPolicy |= NetworkPolicy.NO_CACHE.index;\n }\n bitmapHunter.future = this.service.submit(bitmapHunter);\n return;\n }\n if (this.scansNetworkChanges && bitmapHunter.supportsReplay()) {\n z = true;\n }\n performError(bitmapHunter, z);\n if (z) {\n markForReplay(bitmapHunter);\n }\n }\n }",
"public int getRetryCounter() {\n return retryCounter;\n }",
"public int getRetryCount() {\n return this.retryCount;\n }"
] |
[
"0.75707495",
"0.71223557",
"0.708606",
"0.708606",
"0.708606",
"0.70552206",
"0.7043375",
"0.70329213",
"0.7021514",
"0.7021514",
"0.7021514",
"0.7000176",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.68454117",
"0.67548937",
"0.66509813",
"0.66171354",
"0.6563032",
"0.65053856",
"0.6490632",
"0.6428123",
"0.6406295",
"0.63772553",
"0.6373688",
"0.63179487",
"0.62930536",
"0.6232586",
"0.6228076",
"0.6208991",
"0.61556816",
"0.6153714",
"0.61366165",
"0.61240745",
"0.609088",
"0.60801405",
"0.60801405",
"0.60801405",
"0.60801286",
"0.6069371",
"0.60616755",
"0.60025185",
"0.59949255",
"0.5989343",
"0.5971205",
"0.59620184",
"0.59328943",
"0.5919711",
"0.5915562",
"0.59127265",
"0.5908276",
"0.5889815",
"0.5880013",
"0.5861297",
"0.5841774",
"0.5832887",
"0.5829258",
"0.58266306",
"0.58247644",
"0.5807472",
"0.5777949",
"0.57727486",
"0.57669175",
"0.57663864",
"0.57340205",
"0.57249516",
"0.57184875",
"0.57108945",
"0.5710721",
"0.5696096",
"0.56867766",
"0.5666037",
"0.565227",
"0.56513613",
"0.56513613",
"0.56483084",
"0.5628219",
"0.56266356",
"0.5614541",
"0.56120384",
"0.5610174",
"0.5609583",
"0.558204",
"0.5580145",
"0.5569716",
"0.5561803",
"0.55507225",
"0.55472994",
"0.553112",
"0.55132467",
"0.55084723",
"0.5488465",
"0.54863226"
] |
0.70619875
|
5
|
called before request is started
|
@Override
public void onStart() {
progress.setMessage(context.getString(R.string.msg_connecting));
progress.show();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}",
"private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}",
"protected void onBeginRequest()\n\t{\n\t}",
"@Override\n\tpublic void initRequest() {\n\n\t}",
"@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}",
"@Override\n public void beforeStart() {\n \n }",
"private Request() {\n initFields();\n }",
"protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}",
"protected void onPrepareRequest(HttpUriRequest request) throws IOException {\n\t\t// Nothing.\n\t}",
"private WebRequest() {\n initFields();\n }",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void preServe() {\n\n\t}",
"@Override\n\tpublic void OnRequest() {\n\t\t\n\t}",
"public void onStart() {\n // onStart might not be called because this object may be created after the fragment/activity's onStart method.\n connectivityMonitor.register();\n\n requestTracker.resumeRequests();\n }",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}",
"protected void onBegin() {}",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@Override\n public void init(final FilterConfig filterConfig) {\n Misc.log(\"Request\", \"initialized\");\n }",
"public void onStart() {\n /* do nothing - stub */\n }",
"@Test(expected=IllegalStateException.class)\n public void onRequestBeforeInitialization() {\n onRequest();\n fail(\"cannot do stubbing, Jadler hasn't been initialized yet\");\n }",
"@Override\n public void preRun() {\n super.preRun();\n }",
"public void request() {\n }",
"@Override\n\tpublic void onStart() {\n\n\t\tsuper.onStart();\n\n\t\t/*\n\t\t * Connect the client. Don't re-start any requests here;\n\t\t * instead, wait for onResume()\n\t\t */\n\t\tmLocationClient.connect();\n\t}",
"private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }",
"@Override\n\tpublic String init_request() {\n\t\treturn null;\n\t}",
"private RequestManager() {\n\t // no instances\n\t}",
"private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}",
"public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }",
"@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}",
"private void initData() {\n requestServerToGetInformation();\n }",
"public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}",
"private void doBeforeApplyRequest(final PhaseEvent arg0) {\n\t}",
"@Override\n public void onStart() {\n \n }",
"@Override\n public void onStart() {\n \n }",
"@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }",
"protected void onFirstUse() {}",
"private RequestExecution() {}",
"private Request() {}",
"private Request() {}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}",
"public static void initial(Context context) {\n VDVolley.VDVolleyRequestManager.initial(context);\n }",
"@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}",
"@Override\n protected void doInit() {\n super.doInit();\n this.startTime = (String) this.getRequest().getAttributes().get(\"startTime\");\n this.endTime = (String) this.getRequest().getAttributes().get(\"endTime\");\n this.interval = (String) this.getRequest().getAttributes().get(\"samplingInterval\");\n }",
"@Before\n public void setup() {\n config.setProperty(Constants.PROPERTY_RETRY_DELAY, \"1\");\n config.setProperty(Constants.PROPERTY_RETRY_LIMIT, \"3\");\n rc = new RequestContext(null);\n rc.setTimeToLiveSeconds(2);\n }",
"protected void preload(HttpServletRequest request) {\r\n/* 39 */ log.debug(\"RoomCtl preload method start\");\r\n/* 40 */ HostelModel model = new HostelModel();\r\n/* */ try {\r\n/* 42 */ List l = model.list();\r\n/* 43 */ request.setAttribute(\"hostelList\", l);\r\n/* 44 */ } catch (ApplicationException e) {\r\n/* 45 */ log.error(e);\r\n/* */ } \r\n/* 47 */ log.debug(\"RoomCtl preload method end\");\r\n/* */ }",
"private void handleRequestOnPre() {\n ConnectionsFragment frag = (ConnectionsFragment) getSupportFragmentManager()\n .findFragmentByTag(getString(R.string.keys_fragment_connections));\n frag.handleRequestOnPre();\n }",
"protected void start() {\n }",
"public void onStart() {\n\t\t\n\t}",
"@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"private void setupRequestContext() {\r\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\r\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\r\n\t\tRequestContextHolder.setRequestAttributes(attributes);\r\n\t}",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"@Override\n public void onStart() {\n }",
"private void setupRequestContext() {\n\t\tMockHttpServletRequest request = new MockHttpServletRequest();\n\t\tServletRequestAttributes attributes = new ServletRequestAttributes(request);\n\t\tRequestContextHolder.setRequestAttributes(attributes);\n\t}",
"public void init(HttpServletRequest request) throws ServletException {\n\t}",
"protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}",
"@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }",
"@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}",
"public void startProcessingRequest(MailboxSession session) {\n // Do nothing \n }",
"@Override\r\npublic void requestInitialized(ServletRequestEvent arg0) {\n\t\r\n}",
"public void initRequest() {\n repo.getData();\n }",
"public void onModuleLoad() {\n\n\t\tJsonpRequestBuilder requestBuilder = new JsonpRequestBuilder();\n\t\t// requestBuilder.setTimeout(10000);\n//\t\trequestBuilder.requestObject(SERVER_URL, new Jazz10RequestCallback());\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\tprotected void init() throws SiDCException, Exception {\n\t\tLogAction.getInstance().debug(\"Request:\" + entity);\n\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}",
"public void onStart() {\n }",
"private void runBaseInit(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.initBaseSim();\n }",
"@Override\r\n public boolean isRequest() {\n return false;\r\n }",
"@Override\r\n public void start() {\r\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}",
"@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLog.v(\"tag\",\"onStart\" );\n\t}",
"@Override\n public void start() {\n }",
"@Override public void start() {\n }",
"public void before() {\n process = Thread.currentThread();\n }",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}",
"public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}",
"private void onPreRequestData(int tag) {\n }"
] |
[
"0.75935924",
"0.7434612",
"0.73579293",
"0.7111827",
"0.709784",
"0.7078375",
"0.6828659",
"0.6786365",
"0.6777992",
"0.67673975",
"0.66835743",
"0.6548043",
"0.64955246",
"0.6423946",
"0.642192",
"0.6405631",
"0.6396179",
"0.6341774",
"0.63408804",
"0.6340001",
"0.63343185",
"0.6332091",
"0.6324497",
"0.6319413",
"0.6308262",
"0.63070047",
"0.6294066",
"0.62936974",
"0.62899816",
"0.6280114",
"0.6251576",
"0.6250244",
"0.62485415",
"0.6239764",
"0.6239764",
"0.62341434",
"0.6220207",
"0.6206572",
"0.619618",
"0.619618",
"0.6189883",
"0.6189883",
"0.616631",
"0.6163374",
"0.6162591",
"0.6162158",
"0.61620075",
"0.615203",
"0.6147391",
"0.6136904",
"0.61330914",
"0.61321586",
"0.61321586",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.61232",
"0.60981625",
"0.60883504",
"0.6082095",
"0.6081294",
"0.60770726",
"0.60736835",
"0.6072115",
"0.6066453",
"0.60584384",
"0.604778",
"0.6046884",
"0.6045228",
"0.6045228",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60424894",
"0.60396403",
"0.6036059",
"0.6030069",
"0.6015103",
"0.6014955",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6014819",
"0.6000028",
"0.5998341",
"0.5994331",
"0.59908134",
"0.59816813",
"0.5978696",
"0.5975132",
"0.5972102",
"0.5972102",
"0.5969578",
"0.59682727"
] |
0.0
|
-1
|
called when response HTTP status is "4XX" (eg. 401, 403, 404)
|
@Override
public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {
progress.dismiss();
e.printStackTrace();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void authenticationFailedHandler(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) {\n response.setHeader(HttpHeaders.WWW_AUTHENTICATE, \"Basic\");\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n }",
"protected abstract boolean isExpectedResponseCode(int httpStatus);",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\t\tpublic void onError(int httpcode) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] bytes, Throwable throwable) {\n\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if (statusCode == 404) {\n Toast.makeText(getApplicationContext(),\n \"Requested resource not found\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n Toast.makeText(getApplicationContext(),\n \"Something went wrong at server end\",\n Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else {\n Toast.makeText(\n getApplicationContext(),\n \"Error Occured n Most Common Error: n1. Device not connected to Internetn2. Web App is not deployed in App servern3. App server is not runningn HTTP Status code : \"\n + statusCode, Toast.LENGTH_LONG)\n .show();\n }\n }",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, AuthenticationException failed) throws IOException {\n\t\t\n\t\tresponse.setStatus(401);\n response.setContentType(\"application/json\"); \n response.getWriter().append(json(failed));\n\t}",
"protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {\n }",
"void heartbeatInvalidStatusCode(XMLHttpRequest xhr);",
"@Override\n protected void handleErrorResponseCode(int code, String message) {\n }",
"public abstract int statusCode();",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '400'\n if(statusCode == 400){\n Toast.makeText(getApplicationContext(), \"Error Creating Donation!!\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 400, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"int getStatusCode();",
"int getStatusCode();",
"int getStatusCode( );",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable e, JSONArray errorResponse) {\n // Hide Progress Dialog\n prgDialog.hide();\n // When Http response code is '404'\n if(statusCode == 404){\n Toast.makeText(getApplicationContext(), \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }\n // When Http response code is '500'\n else if(statusCode == 500){\n Toast.makeText(getApplicationContext(), \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }\n // When Http response code other than 404, 500\n else{\n Toast.makeText(getApplicationContext(), \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n }",
"@Override\n\t\t\t\t\tpublic void httpFail(String response) {\n\t\t\t\t\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\r\n public void afterCompletion(HttpServletRequest request,\r\n HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception \r\n {\n }",
"@Override\r\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception {\n \r\n }",
"@Override\n public void commence(HttpServletRequest request,\n HttpServletResponse response,\n AuthenticationException authException) throws IOException {\n\n String requestURI = request.getRequestURI();\n if(requestURI.startsWith(\"/api\")){\n response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n response.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n BaseResponse baseResponse = new BaseResponse();\n baseResponse.setMessage(authException.getMessage());\n baseResponse.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n out.write(new ObjectMapper().writeValueAsString(baseResponse));\n out.flush();\n out.close();\n\n// response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage());\n }else {\n response.sendRedirect(\"/login?redirect=\"+requestURI);\n }\n }",
"private void abortUnauthorised(HttpServletResponse httpResponse) throws IOException {\n httpResponse.setHeader(HttpHeaders.WWW_AUTHENTICATE, WWW_AUTHENTICATION_HEADER);\n httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, UNAUTHORISED_MESSAGE);\n }",
"abstract Integer getStatusCode();",
"@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Throwable error,\n String content) {\n\n if(statusCode == 404){\n Toast.makeText(context, \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }else if(statusCode == 500){\n Toast.makeText(context, \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }else{\n // Toast.makeText(context, \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n Log.e(\"status Response\", String.valueOf(volleyError));\n // mProgressDialog.dismiss();\n }",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\r\n e.printStackTrace();\r\n\r\n }",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest req, HttpServletResponse resp, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n progress.dismiss();\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String content,\n Throwable e) {\n Log.d(\"statusCode\", \"4XX\");\n // Hide Progress Dialog\n //progress.hide();\n String resultErrorMsg = \"\";\n // When Http response code is '404'\n if (statusCode == 404) {\n resultErrorMsg = \"Requested resource not found\";\n }\n // When Http response code is '500'\n else if (statusCode == 500) {\n resultErrorMsg = \"Something went wrong at server end\";\n }\n // When Http response code other than 404, 500\n else {\n resultErrorMsg = \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet or remote server is not up and running]\";\n }\n bro.setResultStateCode(statusCode);\n bro.setResultMsg(resultErrorMsg);\n bro.setResultJSONArray(null);\n listener.onShowJobsFailure(bro);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"recon\", \"error \" + statusCode + \" \" + throwable);\n\n Toast.makeText(getApplicationContext(), \"Error: \" + statusCode + \" Verify your Internet Connection is stable or working.\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .header(HttpHeaders.WWW_AUTHENTICATE,\n AUTHENTICATION_SCHEME + \" realm=\\\"\" + REALM + \"\\\"\")\n .build());\n }",
"public void setHttpStatusCode(int value) {\n this.httpStatusCode = value;\n }",
"public abstract int getHttpStatusErrorCode();",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"@Override\r\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\r\n\t\t\tthrows Exception {\n\r\n\t}",
"private void abortWithUnauthorized(ContainerRequestContext requestContext) {\n requestContext.abortWith(\n Response.status(Response.Status.UNAUTHORIZED)\n .entity(\"You cannot access this resource\").build()\n );\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, String rawJsonResponse, Object response){\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n // Showing error message if something goes wrong.\n Toast.makeText(ClaimStatusActivity.this, volleyError.toString(), Toast.LENGTH_LONG).show();\n }",
"private final void m37299a(int i) throws Exception {\n if (Callback.DEFAULT_DRAG_ANIMATION_DURATION <= i) {\n if (299 >= i) {\n return;\n }\n }\n if (i != 405) {\n if (i != 409) {\n if (i != 410) {\n if (i != 422) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Network Error: status code \");\n stringBuilder.append(i);\n throw new IOException(stringBuilder.toString());\n }\n }\n }\n }\n throw ((Throwable) new UsernameTakenException());\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\r\n\t\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tbyte[] binaryData, Throwable error) {\n\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tfor (Header h : headers) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"========\", h.getName() + \"----------->\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ URLDecoder.decode(h.getValue(), \"UTF-8\"));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (binaryData != null) {\r\n\t\t\t\t\t\t\t\t\tLogger.d(\"=====+\", \"content : \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t\tLog.e(\"statusCode : \", statusCode + \"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ new String(binaryData, \"GBK\"));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\tif (ppd != null) {\r\n//\t\t\t\t\t\t\t\tppd.dismiss();\r\n//\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tTool.showToast(context, \"系统错误!\");\r\n\t\t\t\t\t\t}",
"public static void validateResponseStatusCode(Response response) {\n\t\tresponse.then().statusCode(200);\n\n\t}",
"public void setResponseStatus(int responseStatus) {\n this.responseStatus = responseStatus;\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n public void onError(Status status) {\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\t\n\t}",
"@Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.i(\"doRequest\", \"doRequest failed\");\n\n }",
"@Override\n\tpublic void commence(HttpServletRequest request, HttpServletResponse response,\n\t\t\tAuthenticationException authException) throws IOException, ServletException {\n\t\tApiResponse res = new ApiResponse(HttpServletResponse.SC_UNAUTHORIZED, \"Unauthorised\");\n\t\tres.setErrors(authException.getMessage());\n\t\tres.setStatus(false);\n OutputStream out = response.getOutputStream();\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(out, res);\n out.flush();\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {\n\n Log.i(\"onFailure\", res);\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\t\t\t\t\tToast.makeText(getActivity().getApplicationContext(), \"获取订单超时\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}",
"@Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n\r\n }",
"@Override\n public void onSuccess(Response response) {\n if (Responses.isServerErrorRange(response)\n || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) {\n OptionalInt next = incrementHostIfNecessary(pin);\n instrumentation.receivedErrorStatus(pin, channel, response, next);\n } else {\n instrumentation.successfulResponse(channel.stableIndex());\n }\n }",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tsuper.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n\tpublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n\t\t\tthrows Exception {\n\t\tHandlerInterceptor.super.afterCompletion(request, response, handler, ex);\n\t}",
"@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\n public void onErrorResponse(VolleyError arg0) {\n }",
"@Override\r\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\r\n\t\t\t}",
"@Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onResponceError(final ErrorCode errorCode) {\n }",
"private void setStatusCode(String statusLine) {\n \n \t\tString[] each = statusLine.split( \" \" );\n \t\tresponseHTTPVersion = each[0];\n \t\tstatusCode = each[1];\n\t\treasonPhrase = each[2];\n \t}",
"private AuthenticationFailureHandler authenticationFailureHandler() {\r\n return (HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) -> {\r\n prepareResponse(response, null, HttpStatus.UNAUTHORIZED,\r\n exception);\r\n };\r\n }",
"@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}",
"public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {\r\n\t}",
"public int statusCode(){\n return code;\n }",
"public void setHttpStatusCode(Integer httpStatusCode) {\n this.httpStatusCode = httpStatusCode;\n }",
"private void badMove(HttpServletResponse response) throws IOException {\r\n // Handle a bad request\r\n response.setStatus(400);\r\n try (PrintWriter out = response.getWriter()) {\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Tic Tac Toe</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>400 Bad Request</h1>\");\r\n out.println(\"</html>\"); \r\n }\r\n }",
"private void handleError(HttpServletResponse resp, Throwable ex) {\r\n try {\r\n if (resp.isCommitted()) {\r\n PrintWriter out = resp.getWriter();\r\n ex.printStackTrace(out);\r\n return;\r\n }\r\n resp.setStatus(500);\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<html>\");\r\n out.println(\" <head><title>Execution Error: 500</title></head>\");\r\n out.println(\" <body>\");\r\n out.println(\" <h2>Execution Error: \"+ex.getClass().getSimpleName()+\"</h2>\");\r\n out.println(\" <p>Stack trace:</p>\");\r\n out.print(\" <blockquote><pre>\");\r\n if (ex instanceof RhinoException) {\r\n RhinoException rex = (RhinoException)ex;\r\n rex.printStackTrace(out);\r\n } else {\r\n ex.printStackTrace(out);\r\n }\r\n out.println(\"</pre></blockquote>\");\r\n out.println(\" <p><address>Powered by Alt Framework</address></p>\");\r\n out.println(\" </body>\");\r\n out.println(\"</html>\");\r\n } catch (IOException ex2) {\r\n ex2.printStackTrace(System.err);\r\n }\r\n }",
"void setResponseFormatError(){\n responseFormatError = true;\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n\n NetworkResponse networkResponse = error.networkResponse;\n Log.i(\"Checking\", new String(error.networkResponse.data));\n if(networkResponse != null && networkResponse.data != null)\n {\n switch (networkResponse.statusCode)\n {\n\n default:\n break;\n }\n }\n }",
"public final void handleError(Throwable th) {\r\n if (!(th instanceof HttpException)) {\r\n Snackbar.Companion.showMessage(this, \"죄송합니다.\\n서비스가 잠시 지연되고 있습니다.\\n잠시 후 다시 이용해주세요.\");\r\n } else if (((HttpException) th).code() == 401) {\r\n Intent intent = new Intent(this, IntroActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }\r\n }",
"@Override\n\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\n\t\t}"
] |
[
"0.6556771",
"0.6077015",
"0.6009509",
"0.60011625",
"0.58474255",
"0.5837503",
"0.5828418",
"0.5827644",
"0.5789087",
"0.5762918",
"0.57514864",
"0.5749605",
"0.5708024",
"0.5708024",
"0.56651163",
"0.56601477",
"0.56389934",
"0.5637643",
"0.5623692",
"0.5621627",
"0.5621548",
"0.56179726",
"0.5612367",
"0.56021035",
"0.5597549",
"0.5587198",
"0.5586976",
"0.5586976",
"0.556676",
"0.5561483",
"0.5535916",
"0.55345094",
"0.54923624",
"0.54899997",
"0.54794014",
"0.54766464",
"0.547494",
"0.547494",
"0.5471556",
"0.5461637",
"0.5456165",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5452648",
"0.5429481",
"0.5427608",
"0.5427608",
"0.5424738",
"0.54235286",
"0.54234964",
"0.54202765",
"0.54136056",
"0.5412538",
"0.5411571",
"0.53989565",
"0.5390575",
"0.5390575",
"0.53829384",
"0.5379672",
"0.5379672",
"0.53763235",
"0.5375512",
"0.5373627",
"0.53614867",
"0.5357745",
"0.5357003",
"0.5357003",
"0.53449166",
"0.53449166",
"0.53449166",
"0.53432655",
"0.53255516",
"0.53249854",
"0.5322552",
"0.5320998",
"0.53180057",
"0.5313068",
"0.5313068",
"0.53125215",
"0.53115463",
"0.53062314",
"0.53062314",
"0.5305276",
"0.5299047",
"0.52971244",
"0.52939934",
"0.5291314",
"0.52906823",
"0.5286733",
"0.52840805",
"0.5282959",
"0.52825016",
"0.52775574",
"0.5270314",
"0.5269613",
"0.5262051"
] |
0.55557436
|
30
|
called when request is retried
|
@Override
public void onRetry(int retryNo) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void onRetry(HttpRequest req, String reason) {\n\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\n public void onRetry ( int retryNo){\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\n\t\tpublic boolean isRetry() { return true; }",
"void doRetry();",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\r\n public void onRetry(int retryNo) {\n }",
"@Override\n\t\tpublic boolean isRetry() { return false; }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"@Override\n public void onRetry(int retryNo) {\n }",
"void onRetryAuthentication();",
"@Override\n void setRetry() {\n if (mNextReqTime > 32 * 60 * 1000 || mController.isStop()) {\n if (DEBUG)\n Log.d(TAG, \"################ setRetry timeout, cancel retry : \" + mController.isStop());\n cancelRetry();\n return;\n }\n if (mCurRetryState == RetryState.IDLE) {\n mCurRetryState = RetryState.RUNNING;\n if (mReceiver == null) {\n IntentFilter filter = new IntentFilter(INTENT_ACTION_RETRY);\n mReceiver = new stateReceiver();\n mContext.registerReceiver(mReceiver, filter);\n }\n\n }\n Intent intent = new Intent(INTENT_ACTION_RETRY);\n PendingIntent sender = PendingIntent.getBroadcast(mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n long nextReq = SystemClock.elapsedRealtime() + mNextReqTime;\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(nextReq);\n if(DEBUG) Log.i(TAG, \"start to get location after: \" + mNextReqTime + \"ms\");\n mAlarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextReq, sender);\n mNextReqTime = mNextReqTime * 2;\n }",
"public int getRequestRetryCount() {\n \t\treturn 1;\n \t}",
"public void markRequestRetryReplace() throws JNCException {\n markLeafReplace(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n super.onRetry(retryNo);\n // 返回重试次数\n }",
"public abstract long retryAfter();",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext context) {\n\t\t\tif (executionCount >= MAX_REQUEST_RETRY_COUNTS) {\n\t\t\t\t// Do not retry if over max retry count\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (exception instanceof NoHttpResponseException) {\n\t\t\t\t// Retry if the server dropped connection on us\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (exception instanceof SSLHandshakeException) {\n\t\t\t\t// Do not retry on SSL handshake exception\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tHttpRequest request = (HttpRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);\n\t\t\tboolean idempotent = (request instanceof HttpEntityEnclosingRequest);\n\t\t\tif (!idempotent) {\n\t\t\t\t// Retry if the request is considered idempotent\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\n\t\t}",
"public void addRequestRetry() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"request-retry\",\n null,\n childrenNames());\n }",
"public int retry() {\r\n\t\treturn ++retryCount;\r\n\t}",
"private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }",
"public boolean isRetried ()\r\n {\r\n return hasFailed () && retried_;\r\n }",
"public void onTryFails(int currentRetryCount, Exception e) {}",
"@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }",
"private void retry() {\n if (catalog == null) {\n if (--retries < 0) {\n inactive = true;\n pendingRequests.clear();\n log.error(\"Maximum retries exceeded while attempting to load catalog for endpoint \" + discoveryEndpoint\n + \".\\nThis service will be unavailabe.\");\n } else {\n try {\n sleep(RETRY_INTERVAL * 1000);\n _loadCatalog();\n } catch (InterruptedException e) {\n log.warn(\"Thread for loading CDS Hooks catalog for \" + discoveryEndpoint + \"has been interrupted\"\n + \".\\nThis service will be unavailable.\");\n }\n }\n }\n }",
"public void markRequestRetryCreate() throws JNCException {\n markLeafCreate(\"requestRetry\");\n }",
"public void retryRequired(){\n startFetching(query);\n }",
"public boolean isRetry();",
"public DefaultHttpRequestRetryHandler() {\n this(3);\n }",
"public void incrementRetryCount() {\n this.retryCount++;\n }",
"public void markRequestRetryDelete() throws JNCException {\n markLeafDelete(\"requestRetry\");\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n public void onRetry(int retryNo) {\n Log.d(\"AsyncAndro\", \"AsyncAndroid retryNo:\" + retryNo);\n }",
"@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }",
"@Override\n\t\tpublic void setWasRetried(boolean wasRetried) {\n\t\t\t\n\t\t}",
"private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }",
"boolean allowRetry(int retry, long startTimeOfExecution);",
"@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}",
"@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}",
"void retry(Task task);",
"public interface OnRetryListener {\n void onRetry();\n}",
"public synchronized void onRequestFailed(Throwable reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"@Override\n\tpublic void onReplayFailed(Throwable cause) {\n\n\t}",
"@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}",
"public void retrySending()\n {\n try\n {\n EmailConfig emailConfig = getEmailConfig();\n int maxRetries = emailConfig.getMaxRetries().intValue();\n boolean saveFailedMails = emailConfig.getSaveFailedEmails();\n List messageFileList = getMessagesInFolder(IEmailConfiguration.EMAIL_RETRY_PATH);\n \n if (maxRetries > 0 && messageFileList.size()>0)\n {\n Session session = getMailSession(true);\n for (Iterator i = messageFileList.iterator(); i.hasNext();)\n {\n resendMail(session, (File)i.next(), maxRetries, saveFailedMails);\n }\n }\n }\n catch (Throwable th)\n {\n AlertLogger.warnLog(CLASSNAME,\"retrySending\",\"Error in retrySending\",th);\n }\n }",
"public boolean isAllowPartialRetryRequests() {\n\t\treturn false;\n\t}",
"public boolean retry() {\n return tries++ < MAX_TRY;\n }",
"void sendRetryMessage(int retryNo);",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"public boolean willRetry() {\n return willRetry;\n }",
"public void markRequestRetryMerge() throws JNCException {\n markLeafMerge(\"requestRetry\");\n }",
"protected abstract void onClickRetryButton();",
"public void resumeRequests() {\n requestTracker.resumeRequests();\n }",
"public synchronized void onRequestFailed(String reason) {\r\n\t\tallRequestsTracker.onRequestFailed(reason);\r\n\t\trecentRequestsTracker.onRequestFailed(reason);\r\n\t\tmeter.mark();\r\n\t}",
"boolean doRetry() {\n synchronized (mHandler) {\n boolean doRetry = currentRetry < MAX_RETRIES;\n boolean futureSync = mHandler.hasMessages(0);\n\n if (doRetry && !futureSync) {\n currentRetry++;\n mHandler.postDelayed(getNewRunnable(), currentRetry * 15_000);\n }\n\n return mHandler.hasMessages(0);\n }\n }",
"public void resendRequestingQueue() {\n Logger.m1416d(TAG, \"Action - resendRequestingQueue - size:\" + this.mRequestingQueue.size());\n printRequestingQueue();\n printRequestingCache();\n while (true) {\n Requesting requesting = (Requesting) this.mRequestingQueue.pollFirst();\n if (requesting == null) {\n return;\n }\n if (requesting.request.getCommand() == 2) {\n this.mRequestingQueue.remove(requesting);\n this.mRequestingCache.remove(requesting.request.getHead().getRid());\n } else {\n requesting.retryAgain();\n sendCommandWithLoggedIn(requesting);\n }\n }\n }",
"@Override\n protected void onRequestTimeout(Tuple request) {\n }",
"public static HttpRequestRetryHandler getRetryHandler(final String... details) throws JSONException {\n\t\treturn new HttpRequestRetryHandler() {\n\t\t\t@Override\n\t\t\tpublic boolean retryRequest(IOException exception, int executionCount, HttpContext httpContext) {\n\t\t\t\tLOGGER.info(\"Request Execution no: \" + executionCount);\n\t\t\t\t// System.out.println(\"Request Execution no: \"+executionCount);\n\t\t\t\tif (executionCount >= 5) {\n\t\t\t\t\tLOGGER.info(\"Aborting Request retry using Job Schedular\");\n\t\t\t\t\tSystem.out.println(details);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tLOGGER.info(\"Retrying request...\");\n\t\t\t\t// System.out.println(\"Retrying request...\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t}",
"protected int retryLimit() {\n return DEFAULT_RETRIES;\n }",
"@Override\n public int getRetryDelay() {\n return retryDelay;\n }",
"@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }",
"@Around(\"execution(public void edu.sjsu.cmpe275.aop.TweetService.*(..))\")\n public Object retryAdvice(ProceedingJoinPoint joinPoint) throws Throwable {\n IOException exception = null;\n boolean retry = false;\n for (int i = 1; i <= 4; i++) {\n if (retry) {\n System.out.println(\"Network Error: Retry #\" + (i - 1));\n }\n try {\n// System.out.println(\"proceed !!! - \" + i);\n return joinPoint.proceed();\n } catch (IOException e) {\n System.out.println(\"Network Exception!!\");\n exception = e;\n retry = true;\n }\n }\n return joinPoint;\n }",
"@Test\n\tpublic void testRetryTheSuccess() {\n\t\tgenerateValidRequestMock();\n\t\tworker = PowerMockito.spy(new HttpRepublisherWorker(dummyPublisher, actionedRequest));\n\t\tWhitebox.setInternalState(worker, CloseableHttpClient.class, httpClientMock);\n\t\ttry {\n\t\t\twhen(httpClientMock.execute(any(HttpRequestBase.class), any(ResponseHandler.class)))\n\t\t\t\t\t.thenThrow(new IOException(\"Exception to retry on\")).thenReturn(mockResponse);\n\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not reach here!\");\n\t\t}\n\t\tworker.run();\n\t\t// verify should attempt to calls\n\t\ttry {\n\t\t\tverify(httpClientMock, times(2)).execute(any(HttpRequestBase.class), any(ResponseHandler.class));\n\t\t\tassertEquals(RequestState.SUCCESS, actionedRequest.getAction());\n\t\t} catch (ClientProtocolException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Should not throw this exception\");\n\t\t}\n\t}",
"String getLogRetryAttempted();",
"public interface RetryCallback {\n void retry();\n}",
"public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }",
"public Object doWithRetry(RetryContext context) throws Throwable {\n \t\t\t\t((StringHolder) item).string = ((StringHolder) item).string + (count++);\n \t\t\t\tthrow new RuntimeException(\"Barf!\");\n \t\t\t}",
"protected short maxRetries() { return 15; }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }",
"int getRetries();",
"@Override\n public void onFailure(@NonNull Exception e) {\n resultCallback.onResultCallback(Result.retry());\n }",
"public void retry(String myError) {\n try {\n request.setAttribute(\"myError\", myError);\n servletCtx.getRequestDispatcher(\"/hiddenJsps/iltds/asm/asmFormLookup.jsp\").forward(\n request,\n response);\n }\n catch (Exception e) {\n e.printStackTrace();\n ReportError err = new ReportError(request, response, servletCtx);\n err.setFromOp(this.getClass().getName());\n err.setErrorMessage(e.toString());\n try {\n err.invoke();\n }\n catch (Exception _axxx) {\n }\n return;\n }\n\n }",
"@Override\n public void onRetry(EasyVideoPlayer player, Uri source) {\n }",
"public boolean shouldRetryOnTimeout() {\r\n return configuration.shouldRetryOnTimeout();\r\n }",
"public void setRecoveryRetries(int retries);",
"@Override\n protected RetryConstraint shouldReRunOnThrowable(@NonNull Throwable throwable, int runCount, int maxRunCount) {\n return RetryConstraint.CANCEL;\n }",
"@Override\n public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {\n if (response.getStatusCode() != 429 || isRateLimitError(response)) {\n return false;\n }\n\n try {\n // Note that this will consume the response body. At this point,\n // subsequent retry handlers or error handlers will not be able to read\n // again the payload, but that should only be attempted when the\n // command is not retryable and an exception should be thrown.\n Error error = parseError.apply(response);\n logger.debug(\"processing error: %s\", error);\n\n boolean isRetryable = RETRYABLE_ERROR_CODE.equals(error.details().code());\n return isRetryable ? super.shouldRetryRequest(command, response) : false;\n } catch (Exception ex) {\n // If we can't parse the error, just assume it is not a retryable error\n logger.warn(\"could not parse error. Request won't be retried: %s\", ex.getMessage());\n return false;\n }\n }",
"void doShowRetry();",
"int getSleepBeforeRetry();",
"@Test\n public void testCanRetry() {\n assertEquals(0, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(1, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(2, rc.getAttempts());\n assertTrue(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n assertFalse(rc.attempt());\n assertEquals(3, rc.getAttempts());\n }",
"@Override\n public void refresh404(String tag) {\n this.retrySubredditLoad(tag, true);\n }",
"int getRetryCount() {\n return retryCount;\n }",
"@Override\npublic boolean retry(ITestResult result) {\n\tif(minretryCount<=maxretryCount){\n\t\t\n\t\tSystem.out.println(\"Following test is failing====\"+result.getName());\n\t\t\n\t\tSystem.out.println(\"Retrying the test Count is=== \"+ (minretryCount+1));\n\t\t\n\t\t//increment counter each time by 1 \n\t\tminretryCount++;\n\n\t\treturn true;\n\t}\n\treturn false;\n}",
"protected void responseFail(){\n\t\tqueue.clear();\n\t}",
"@SuppressLint({\"MissingPermission\"})\n public void performRetry(BitmapHunter bitmapHunter) {\n if (!bitmapHunter.isCancelled()) {\n boolean z = false;\n if (this.service.isShutdown()) {\n performError(bitmapHunter, false);\n return;\n }\n NetworkInfo networkInfo = null;\n if (this.scansNetworkChanges) {\n networkInfo = ((ConnectivityManager) Utils.getService(this.context, \"connectivity\")).getActiveNetworkInfo();\n }\n if (bitmapHunter.shouldRetry(this.airplaneMode, networkInfo)) {\n if (bitmapHunter.getPicasso().loggingEnabled) {\n Utils.log(DISPATCHER_THREAD_NAME, \"retrying\", Utils.getLogIdsForHunter(bitmapHunter));\n }\n if (bitmapHunter.getException() instanceof NetworkRequestHandler.ContentLengthException) {\n bitmapHunter.networkPolicy |= NetworkPolicy.NO_CACHE.index;\n }\n bitmapHunter.future = this.service.submit(bitmapHunter);\n return;\n }\n if (this.scansNetworkChanges && bitmapHunter.supportsReplay()) {\n z = true;\n }\n performError(bitmapHunter, z);\n if (z) {\n markForReplay(bitmapHunter);\n }\n }\n }",
"public int getRetryCounter() {\n return retryCounter;\n }",
"public int getRetryCount() {\n return this.retryCount;\n }"
] |
[
"0.75707495",
"0.71223557",
"0.708606",
"0.708606",
"0.708606",
"0.70619875",
"0.70552206",
"0.70329213",
"0.7021514",
"0.7021514",
"0.7021514",
"0.7000176",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.6979388",
"0.68454117",
"0.67548937",
"0.66509813",
"0.66171354",
"0.6563032",
"0.65053856",
"0.6490632",
"0.6428123",
"0.6406295",
"0.63772553",
"0.6373688",
"0.63179487",
"0.62930536",
"0.6232586",
"0.6228076",
"0.6208991",
"0.61556816",
"0.6153714",
"0.61366165",
"0.61240745",
"0.609088",
"0.60801405",
"0.60801405",
"0.60801405",
"0.60801286",
"0.6069371",
"0.60616755",
"0.60025185",
"0.59949255",
"0.5989343",
"0.5971205",
"0.59620184",
"0.59328943",
"0.5919711",
"0.5915562",
"0.59127265",
"0.5908276",
"0.5889815",
"0.5880013",
"0.5861297",
"0.5841774",
"0.5832887",
"0.5829258",
"0.58266306",
"0.58247644",
"0.5807472",
"0.5777949",
"0.57727486",
"0.57669175",
"0.57663864",
"0.57340205",
"0.57249516",
"0.57184875",
"0.57108945",
"0.5710721",
"0.5696096",
"0.56867766",
"0.5666037",
"0.565227",
"0.56513613",
"0.56513613",
"0.56483084",
"0.5628219",
"0.56266356",
"0.5614541",
"0.56120384",
"0.5610174",
"0.5609583",
"0.558204",
"0.5580145",
"0.5569716",
"0.5561803",
"0.55507225",
"0.55472994",
"0.553112",
"0.55132467",
"0.55084723",
"0.5488465",
"0.54863226"
] |
0.7043375
|
7
|
Override to provide a specialized version of ClientFacade
|
protected ClientFacade createClientFacade(IFlushable flushable, IProtocolLogger logger) {
return new ClientFacade(flushable, logger);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}",
"public abstract Client getClient();",
"protected Client getRealClient() {\n\t\treturn client;\n\t}",
"public interface Client {\n \n /**\n * Get the unique id of current client.\n *\n * @return id of client\n */\n String getClientId();\n \n /**\n * Whether is ephemeral of current client.\n *\n * @return true if client is ephemeral, otherwise false\n */\n boolean isEphemeral();\n \n /**\n * Set the last time for updating current client as current time.\n */\n void setLastUpdatedTime();\n \n /**\n * Get the last time for updating current client.\n *\n * @return last time for updating\n */\n long getLastUpdatedTime();\n \n /**\n * Add a new instance for service for current client.\n *\n * @param service publish service\n * @param instancePublishInfo instance\n * @return true if add successfully, otherwise false\n */\n boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);\n \n /**\n * Remove service instance from client.\n *\n * @param service service of instance\n * @return instance info if exist, otherwise {@code null}\n */\n InstancePublishInfo removeServiceInstance(Service service);\n \n /**\n * Get instance info of service from client.\n *\n * @param service service of instance\n * @return instance info\n */\n InstancePublishInfo getInstancePublishInfo(Service service);\n \n /**\n * Get all published service of current client.\n *\n * @return published services\n */\n Collection<Service> getAllPublishedService();\n \n /**\n * Add a new subscriber for target service.\n *\n * @param service subscribe service\n * @param subscriber subscriber\n * @return true if add successfully, otherwise false\n */\n boolean addServiceSubscriber(Service service, Subscriber subscriber);\n \n /**\n * Remove subscriber for service.\n *\n * @param service service of subscriber\n * @return true if remove successfully, otherwise false\n */\n boolean removeServiceSubscriber(Service service);\n \n /**\n * Get subscriber of service from client.\n *\n * @param service service of subscriber\n * @return subscriber\n */\n Subscriber getSubscriber(Service service);\n \n /**\n * Get all subscribe service of current client.\n *\n * @return subscribe services\n */\n Collection<Service> getAllSubscribeService();\n \n /**\n * Generate sync data.\n *\n * @return sync data\n */\n ClientSyncData generateSyncData();\n \n /**\n * Whether current client is expired.\n *\n * @param currentTime unified current timestamp\n * @return true if client has expired, otherwise false\n */\n boolean isExpire(long currentTime);\n \n /**\n * Release current client and release resources if neccessary.\n */\n void release();\n \n /**\n * Recalculate client revision and get its value.\n * @return recalculated revision value\n */\n long recalculateRevision();\n \n /**\n * Get client revision.\n * @return current revision without recalculation\n */\n long getRevision();\n \n /**\n * Set client revision.\n * @param revision revision of this client to update\n */\n void setRevision(long revision);\n \n}",
"@Override\n\tpublic void createClient() {\n\t\t\n\t}",
"public Client getClient() {\n\t\tcheckInit();\n\t\tfinal Client cli = tenant.getContext().getBean(Client.class);\n\t\tif (cli.getEventMapper()==null) {\n\t\t\tcli.setEventMapper(getEventMapper());\n\t\t}\n\t\treturn cli;\n\t}",
"public interface IndexProviderClient extends IndexServiceClient {\n\n}",
"public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }",
"public interface ICordysGatewayClientFactory\r\n{\r\n /**\r\n * Return a client (the factory is also responsable for creating the gateway).\r\n *\r\n * @return A cordys gateway client.\r\n */\r\n ICordysGatewayClient getGatewayClientInstance();\r\n}",
"public ServerInfo clientInterface()\n {\n return client_stub;\n }",
"public static DucktalesClient getClient() {\n \treturn client;\n }",
"public interface ClientService {\n\n /**\n * This service adds the given client to the database.\n * Afterwards with the help of ClientEntity the Client will be persistent.\n *\n * @param client is the Client to add.\n * @return This service returns the persistent DB Client.\n * @throws BaseException as exception.\n */\n Client addClient(Client client) throws BaseException;\n\n /**\n * Update a client service.\n *\n * @param client the client to be updated.\n * @return updated client.\n * @throws BaseException as exception.\n */\n Client updateClient(Client client) throws BaseException;\n\n /**\n * Find client by ID.\n * @param id the ID of a client.\n * @return a client.\n * @throws BaseException as exception.\n */\n Client findClientById(Long id) throws BaseException;\n\n /**\n * It gives back a list of clients, belonging to a user.\n * @param user the employee.\n * @return list of clients.\n * @throws BaseException as exception.\n */\n List<ClientResponse> findUsersClient(User user) throws BaseException;\n}",
"public Factory() {\n this(getInternalClient());\n }",
"public JDispatcherService getClientProxy() {\n\t\t try {\r\n\t\t\t Bundle bundle = Platform.getBundle(\"au.edu.unimelb.plantcell.io.ws.multialign\");\r\n\t\t\t URL u = FileLocator.find(bundle, new Path(\"META-INF/wsdl/tcoffee.wsdl\"), null);\r\n\t\t\t \r\n\t\t\t // must not call default constructor for local WSDL... so...\r\n\t\t\t JDispatcherService_Service cli = new JDispatcherService_Service(u,\r\n\t\t\t\t\t new QName(\"http://soap.jdispatcher.ebi.ac.uk\", \"JDispatcherService\"));\r\n\t\t\t return cli.getJDispatcherServiceHttpPort();\r\n\t\t } catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t Logger.getAnonymousLogger().warning(\"Unable to get TCoffee proxy: \"+e.getMessage());\r\n\t\t\t return null;\r\n\t\t }\r\n\t}",
"protected FHIRClient getClient(Properties properties) throws Exception {\n return FHIRClientFactory.getClient(properties);\n }",
"@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}",
"public ServiceClient() {\n\t\tsuper();\n\t}",
"default Client getClient(Long id) {\r\n return get(Client.class, id);\r\n }",
"public interface Client {\n\n}",
"protected void configureClient() {\n\t\tswitch (getVariant(ClientRegistration.class)) {\n\t\tcase STATIC_CLIENT:\n\t\t\tcallAndStopOnFailure(GetStaticClientConfiguration.class);\n\t\t\tconfigureStaticClient();\n\t\t\tbreak;\n\t\tcase DYNAMIC_CLIENT:\n\t\t\tcallAndStopOnFailure(StoreOriginalClientConfiguration.class);\n\t\t\tcallAndStopOnFailure(ExtractClientNameFromStoredConfig.class);\n\t\t\tconfigureDynamicClient();\n\t\t\tbreak;\n\t\t}\n\n\t\texposeEnvString(\"client_id\");\n\n\t\tcompleteClientConfiguration();\n\t}",
"public static IClient clientAccessor() {\n return Application.getGame().getClientAccessor();\n }",
"Client getClient();",
"ICordysGatewayClient getGatewayClientInstance();",
"@Override\r\n\tpublic Client consulterClient(Long codeClient) {\n\t\treturn dao.consulterClient(codeClient);\r\n\t}",
"@RemoteServiceClient(SimpleHttpService.class)\npublic interface ISimpleHttpServiceClient extends IServiceClient {\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_START)\n void bootup(int port);\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_STOP)\n void shutdown();\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_INFO)\n void info(int port);\n}",
"public static @NonNull ChannelFactory<? extends Channel> clientChannelFactory() {\n return CURR_NETTY_TRANSPORT.clientChannelFactory();\n }",
"public interface InterfaceServeurClient extends Remote {\n\n\tpublic void setServeur(InterfaceServeurClient serveur) throws RemoteException;\n\tpublic void setListeClient(ArrayList<InterfaceServeurClient> client) throws RemoteException;\n\tpublic Partie getPartie() throws RemoteException;\n\tpublic void ajouterClient(InterfaceServeurClient client) throws RemoteException;\n\tpublic boolean retirerClient(InterfaceServeurClient client) throws RemoteException;\n\tpublic InterfaceServeurClient getServeur() throws RemoteException;\n\tpublic String getNamespace() throws RemoteException;\n\tpublic String getNomJoueur() throws RemoteException;\n\tpublic int getIdObjetPartie() throws RemoteException;\n\tpublic void setIdObjetPartie(int idObjetPartie) throws RemoteException;\n\tpublic ArrayList<Dynastie> getListeDynastie() throws RemoteException;\n\tpublic void setListeDynastie(ArrayList<Dynastie> liste) throws RemoteException;\n\tpublic ArrayList<Dynastie> getListeDynastieDispo() throws RemoteException;\n\tpublic void setJoueur(Joueur j) throws RemoteException;\n\n\tpublic boolean deconnecter() throws RemoteException;\n\n\tpublic void notifierChangement(ArrayList<Object> args) throws RemoteException;\n\tpublic void addListener(ChangeListener listener) throws RemoteException;\n\tpublic void removeListener(ChangeListener listener) throws RemoteException;\n\tpublic void clearListeners() throws RemoteException;\n\tpublic Joueur getJoueur() throws RemoteException;\n\tpublic void setPartieCourante(Partie partie) throws RemoteException;\n\tpublic ArrayList<InterfaceServeurClient> getClients() throws RemoteException;\n\tpublic boolean send(Action action, int idClient) throws RemoteException;\n\tpublic void passerTour() throws RemoteException;\n\n\tpublic void switchJoueurEstPret(InterfaceServeurClient client) throws RemoteException;\n\tpublic void switchJoueurPret() throws RemoteException;\n\tpublic boolean setDynastieOfClient(InterfaceServeurClient client, Dynastie dynastie) throws RemoteException;\n\tpublic void setDynastie(Dynastie d) throws RemoteException;\n\tpublic void libererDynastie(Dynastie d) throws RemoteException;\n\tpublic int getUniqueId() throws RemoteException;\n\n\tpublic void envoyerNouveauConflit(Conflits conflit, int idClient) throws RemoteException;\n\tpublic void envoyerRenforts(ArrayList<TuileCivilisation> renforts, Joueur joueur) throws RemoteException;\n\tpublic boolean piocherCartesManquantes(Joueur j) throws RemoteException;\n\tpublic void finirPartie() throws RemoteException;\n\tpublic void envoyerPointsAttribues(Joueur joueur) throws RemoteException;\n\tpublic ArrayList<Joueur> recupererListeJoueurPartie() throws RemoteException;\n\tpublic void chargerPartie() throws RemoteException;\n}",
"<T> T createClientService(Class<T> clientKlass, @Nullable Map<String, Function<Object[], Object[]>> argumentProcessor, boolean useFNF);",
"@Override\n public Client get(String uuid) {\n return null;\n }",
"@Override\n\tpublic void updateClient() {\n\t\t\n\t}",
"private ResourceClient( ResourceConfigurationBase<?> theConfiguration, String theContractRoot, String theContractVersion, String theUserAgent, HttpClient theClient, JsonTranslationFacility theJsonFacility ) {\r\n\t\tPreconditions.checkNotNull( theConfiguration, \"need a configuration object so we can get our endpoint\" );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractRoot ), \"need a contract root\" );\r\n \tPreconditions.checkArgument( theContractRoot.startsWith( \"/\" ), \"the contract root '%s' must be a reference from the root (i.e. start with '/')\", theContractRoot );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractVersion ), \"need a version for contract root '%s'\", theContractRoot );\r\n \tPreconditions.checkArgument( ContractVersion.isValidVersion( theContractVersion), \"the version string '%s' for contract root '%s' is not valid\", theContractVersion, theContractRoot );\r\n\t\tPreconditions.checkArgument( !Strings.isNullOrEmpty( theUserAgent ), \"need a user agent for this client\" );\r\n\r\n\t\t// lets make sure the configuration is valid\r\n\t\ttheConfiguration.validate();\r\n\t\t\r\n\t\t// now let's start preparing the client\r\n\t\tendpoint = new HttpEndpoint( theConfiguration.getEndpoint( ) ); // this will do validation on the endpoint \r\n\t\tcontractRoot = theContractRoot; \r\n\t\tcontractVersion = theContractVersion;\r\n\t\tuserAgent = theUserAgent;\r\n\t\t\r\n\t\t// use the client if sent in, but create a working one otherwise\r\n\t\tif( theClient == null ) {\r\n\t\t\ttry {\r\n\t\t\t SslContextFactory sslContextFactory = null;\r\n\t\r\n\t\t\t if( endpoint.isSecure( ) ) {\r\n\t\t\t \tif( theConfiguration.getAllowUntrustedSsl() ) {\r\n\t\t\t \t\t// so we need SSL communication BUT we don't need to worry about it being valid, likley\r\n\t\t\t \t\t// because the caller is self-cert'ing or in early development ... we may need to do \r\n\t\t\t \t\t// more here mind you\r\n\t\t\t \t\t\r\n\t\t\t\t \t// the following code was based https://code.google.com/p/misc-utils/wiki/JavaHttpsUrl\r\n\t\t\t\t \t// if we were to look into mutual SSL and overall key handling, I probably want to\r\n\t\t\t\t \t// take a closer look\r\n\t\t\t\t \t\r\n\t\t\t\t \t// We need to create a trust manager that essentially doesn't except/fail checks\r\n\t\t\t\t\t final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\r\n\t\t\t\t\t \t// this was based on the code found here:\r\n\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void checkClientTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void checkServerTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic X509Certificate[] getAcceptedIssuers() {\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t } };\r\n\t\t\t\t\t \r\n\t\t\t\t\t // then we need to create an SSL context that uses lax trust manager \r\n\t\t\t\t\t SSLContext sslContext = SSLContext.getInstance( \"SSL\" );\r\n\t\t\t\t\t\tsslContext.init( null, trustAllCerts, new java.security.SecureRandom() );\r\n\t\r\n\t\t\t\t\t\t// and finally, create the SSL context that\r\n\t\t\t\t\t\tsslContextFactory = new SslContextFactory();\r\n\t\t\t\t\t\tsslContextFactory.setSslContext( sslContext );\r\n\t\t\t \t} else {\r\n\t\t\t \t\t// TODO: this needs to be tested against \r\n\t\t\t \t\t//\t\t a) real certs with real paths that aren't expired\r\n\t\t\t \t\t//\t\t b) real certs with real paths that are expired\r\n\t\t\t \t\tsslContextFactory = new SslContextFactory( );\r\n\t\t\t \t}\r\n\t\t\t\t\thttpClient = new HttpClient( sslContextFactory );\r\n\t\t\t } else {\r\n\t\t\t\t\thttpClient = new HttpClient( );\r\n\t\t\t }\r\n\t\t\t httpClient.setFollowRedirects( false ); // tales doesn't have redirects (at least not yet)\r\n\t\t\t httpClient.setStrictEventOrdering( true ); // this seems to fix an odd issue on back-to-back calls to the same service on \r\n\t\t\t\thttpClient.start( );\r\n\t\t\t displayClientConfiguration( httpClient );\r\n\t\t\t} catch (NoSuchAlgorithmException | KeyManagementException e) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to a problem setting up SSL\", e );\r\n\t\t\t} catch (Exception e ) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to the inability to start the HttpClient\", e );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thttpClient = theClient;\r\n\t\t}\r\n\t\thttpClient.setUserAgentField( new HttpField( HttpHeader.USER_AGENT, theUserAgent ) );\r\n\r\n\t\tif( theJsonFacility == null ) {\r\n\t\tjsonFacility = new JsonTranslationFacility( new DataContractTypeSource( ) );\r\n\t\t} else {\r\n\t\t\tjsonFacility = theJsonFacility;\r\n\t\t}\r\n\t\t\r\n\t\tjsonParser = new JsonParser( );\r\n\t\t\r\n\t\t// now that we have the json facility, let's \r\n\t\t// get the adapter for the result type\r\n\t\tJavaType type = new JavaType( ResourceResult.class );\r\n\t\tJsonTypeMap typeMap = jsonFacility.generateTypeMap( type ); // TODO: technically I can, if I have the type of the result, now do the full thing (need to have a field for it)\r\n\t\tresultTypeAdapter = new TypeFormatAdapter( \r\n\t\t\t\ttype,\r\n\t\t\t\ttypeMap.getReflectedType().getName(),\r\n \t\t\tnew JsonObjectToObjectTranslator( typeMap ),\r\n \t\t\tnew ObjectToJsonObjectTranslator( typeMap ) );\t\t\t\t\r\n\t}",
"ClientTransport clientTransport(TransportResources resources);",
"Client updateClient(Client client) throws BaseException;",
"private MyClientEndpoint(){\n // private to prevent anyone else from instantiating\n }",
"public interface Client extends Endpoint, Channel, Resetable {\n\n /**\n * reconnect.\n */\n void reconnect() throws RemotingException;\n\n\n}",
"@Override\n\t\tpublic Client getClient(int idClient) {\n\t\t\treturn null;\n\t\t}",
"@Override\n public Cassandra.Client getAPI() {\n return client;\n }",
"public Client(Client client) {\n\n }",
"protected AbstractClient(ClientContext context) {\n this(context, RetryUtils::defaultClientRetry);\n }",
"public interface Client {\n\n\t/**\n\t * Provides the ID of the current user. In case the application doesn't have\n\t * authentication, a static ID must be defined.\n\t * \n\t * @return the ID of the current user.\n\t */\n\tString getUserId();\n\n\t/**\n\t * Provides the username of the current user. In case the application\n\t * doesn't have authentication, a static ID must be defined.\n\t * \n\t * @return the username of the current user.\n\t */\n\tString getUserUsername();\n\n\t/**\n\t * Provides the password of the current user. In case the application\n\t * doesn't have authentication, a static password must be defined.\n\t * \n\t * @return the password of the current user.\n\t */\n\tString getUserPassword();\n\t\n\t/**\n\t * Provides the password hash of the current user.\n\t * \n\t * @return the password hash of the current user.\n\t */\n\tString getUserPasswordHash();\n\t\n\t/**\n\t * Sets the password hash of the current user\n\t * \n\t * @param passwordHash the password hash of the current user.\n\t */\n\tvoid setUserPasswordHash(String passwordHash);\n\n\t/**\n\t * Sets the username of the current user\n\t * \n\t * @param username the username of the current user.\n\t */\n\tvoid setUserUsername(String username);\n\n\t/**\n\t * Provides the ability to clear the user ID, username and user password.\n\t */\n\tvoid logout();\n\t\n\t/**\n\t * Provides the ability to track the current menu item.\n\t */\n\tvoid setMenuItem(MenuItem menuItem);\n\t\n\t/**\n\t * Provides the ability to track the current resource item.\n\t */\n\tvoid setResourceItem(BaseContentItem resourceItem);\n\t\n\t/**\n\t * Provides the ability to open a resource.\n\t */\n\tvoid openResource(String resourcePath);\n\t\n\t/**\n\t * Gets a value for a key on the native storage. Native storage is provided by the framework. It consists in a way to store key/value pairs. Like the HTML5 DB, this kind of storage is cleaned up automatically if the user removes the application. This storage should be used specially if you want to share data between the HTML content and native side of the application, otherwise we highly recommend use HTML5 DB. There are two ways of store data on the native storage, globally and content-specific.\n\t *\n\t * <p>\n\t * <strong>Globally</strong>\n\t * It's global on the application. The key can be retrieved from any content in any part of the system, as well as in any part of the native code. You must take care that the key can be used by other content developer. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.getValue(MFStoreType.GLOBAL, key, callback);</li>\n\t * </ul>\n\t * </p>\n\t * <p>\n\t * <strong>Content-specific</strong>\n\t * It's connected to the current resource/menu-item. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.getValue(MFStoreType.SPECIFIC, key, callback);</li>\n\t * </ul>\n\t * </p>\n\t * \n\t * @param type\t\tThe type of the native storage.\n\t * @param key\t\tThe key name.\n\t */\n\tString getValue(String type, String key);\n\t\n\t/**\n\t * Sets a value for a key on the native storage. Native storage is provided by the framework. It consists in a way to store key/value pairs. Like the HTML5 DB, this kind of storage is cleaned up automatically if the user removes the application. This storage should be used specially if you want to share data between the HTML content and native side of the application, otherwise we highly recommend use HTML5 DB. There are two ways of store data on the native storage, globally and content-specific.\n\t * <p>\n\t * <strong>Globally</strong>\n\t * It's global on the application. The key can be retrieved from any content in any part of the system, as well as in any part of the native code. You must take care that the key can be used by other content developer. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.setValue(MFStoreType.GLOBAL, key, value, callback);</li>\n\t * </ul>\n\t * </p>\n\t * <p>\n\t * <strong>Content-specific</strong>\n\t * It's connected to the current resource/menu-item. Below you can find the API calls to store and retrieve key/value pairs.\n\t * <ul>\n\t * <li>clientPlugin.setValue(MFStoreType.SPECIFIC, key, value, callback);</li>\n\t * </ul>\n\t * </p>\n\t * \n\t * @param type\t\tThe type of the native storage.\n\t * @param key\t\tThe key name.\n\t * @param value\t\tThe value.\n\t */\n\tboolean setValue(String type, String key, String value);\n\n\t/**\n\t * Forces a sync. This method should be only used when user has set\n\t * {@link SyncType} to MANUAL.\n\t * \n\t */\n\tvoid sync();\n\n\t/**\n\t * Tracks the access to the current object. The time spent on this object is\n\t * calculated between calls to this method.\n\t * \n\t * @param sender\t\t\tThe sender. This will be 'mf' for internal mobile framework calls. It's a string value.\n\t * @param additionalInfo \tOptional additional information. This information must be used by content developers to track internal pages.\n\t */\n\tvoid track(String sender, String additionalInfo);\n\t\n\t/**\n\t * Tracks some information.\n\t * \n\t * @param sender\t\t\tThe sender. This will be 'mf' for internal mobile framework calls. It's a string value.\n\t * @param objectId\t\t\tObjectId.\n\t * @param additionalInfo \tOptional additional information. This information must be used by content developers to track internal pages.\n\t */\n\tvoid track(String sender, String objectId, String additionalInfo);\n\n\t/**\n\t * Provides the list of all available packages, installed or not.\n\t * \n\t * @param callback\n\t * the list of all available packages.\n\t */\n\tvoid getPackageCatalogue(PackageCatalogueRetrieved callback);\n\t\n\t/**\n\t * Retrieves the local path root for a particular course.\n\t * \n\t * @param courseId\t\t\tThe course id.\n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function. \n\t */\n\tvoid getCourseLocalPathRoot(String courseId, String phoneGapCallback, GetCourseLocalPathRootCompleted callback);\n\t\n\t/**\n\t * Retrieves the local path root for the currently opened course.\n\t * \n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function. \n\t */\n\tvoid getCurrentCourseLocalPathRoot(String phoneGapCallback, GetCourseLocalPathRootCompleted callback);\n\t\n\t/**\n\t * Initialises a temporary folder for the currently opened course.\n\t * If the folder already exists, the folder will be cleared. If it does not exist, it will be created.\n\t * \n\t * Callback will return a JSON object with the following key and value pairs:\n\t * \ttempFolderPath\tThe full local path to the temporary folder in the course directory. E.g. /mnt/sdcard/.../{uniqueCourseFolderId}/temp\n\t * \n\t * Error callback will return a JSON object with the following key and value pairs:\n\t * error\t\t\tAn error string to determine why the native method call failed.\n\t * \n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function. \n\t */\n\tvoid initialiseCurrentCourseLocalTempFolder(String phoneGapCallback, InitialiseCurrentCourseLocalTempFolderCompleted callback);\n\t\n\t/**\n\t * Clears the temporary folder for the currently opened course.\n\t * If the folder exists, the folder will be cleared and removed. If the folder does not exist, an error will occur.\n\t * \n\t * Callback will not return a value and will be invoked when the operation has finished.\n\t * \n\t * Error callback will return a JSON object with the following key and value pairs:\n\t * error\t\t\tAn error string to determine why the native method call failed.\n\t * \n\t * @param phoneGapCallback\tThe PhoneGap callback.\n\t * @param callback\t\t\tThe callback function.\n\t */\n\tvoid clearCurrentCourseLocalTempFolder(String phoneGapCallback, PhoneGapOperationNoResultCompleted callback);\n}",
"interface myClient {\n}",
"protected HeavyClient getClient() {\n\t\treturn client;\n\t}",
"@Bean(destroyMethod = \"close\")\n public RestHighLevelClient client() {\n final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(esUser, esPassword));\n\n RestClientBuilder builder = RestClient.builder(new HttpHost(esHost, esPort, \"https\"))\n .setHttpClientConfigCallback(httpClientBuilder -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider));\n\n return new RestHighLevelClient(builder);\n }",
"public ArkFolioClientFactory(HttpClient client) {\n\t\tthis.client = client;\n\t}",
"public interface ClientService {\r\n\r\n String fpkj(String wsdlUrl);\r\n}",
"public TestServiceClient(final ApiClient apiClient) {\n super(apiClient);\n }",
"public interface IXoClientHost {\n\n public ScheduledExecutorService getBackgroundExecutor();\n public ScheduledExecutorService getIncomingBackgroundExecutor();\n public IXoClientDatabaseBackend getDatabaseBackend();\n public KeyStore getKeyStore();\n public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();\n public InputStream openInputStreamForUrl(String url) throws IOException;\n\n public String getClientName();\n public String getClientLanguage();\n public String getClientVersionName();\n public int getClientVersionCode();\n public String getClientBuildVariant();\n public Date getClientTime();\n\n public String getDeviceModel();\n\n public String getSystemName();\n public String getSystemLanguage();\n public String getSystemVersion();\n}",
"public RemoteFacadeServiceLocator() {\r\n }",
"private SOSCommunicationHandler getClient() {\r\n\t\treturn client;\r\n\t}",
"public ClientRepositoryFactory() {\n this(new ClientAdapterFactory());\n }",
"@Override\n\tprotected void extend(AbstractClientConnector target) {\n\t\tsuper.extend(target);\n\t}",
"@Override\n\tpublic SACliente generarSACliente() {\n\t\treturn new SAClienteImp();\n\t}",
"@Override\r\n\tpublic void updateclient(Client client) {\n\t\t\r\n\t}",
"@Override\n\tpublic void setClient(Client client) {\n\t\tlog.warn(\"setClient is not implemented\");\n\t}",
"protected NuxeoClient getClient() {\n if (client == null) {\n initClient();\n }\n return client;\n }",
"public interface RemoteClientService extends Remote {\n\n /**\n * Returns a ClientDTO object with the given id.\n * @param sessionId session id to gain access\n * @param id database id of the client\n * @return a client dto with the given id\n * @throws RemoteException mandatory\n * @throws UserNotLoggedInException is thrown if the sessionId is invalid\n */\n ClientDTO getById(String sessionId, int id) throws RemoteException, UserNotLoggedInException;\n\n /**\n * Returns all clients.\n * @param sessionId session id to gain access\n * @return list with all clients\n * @throws RemoteException mandatory\n * @throws UserNotLoggedInException is thrown if the sessionId is invalid\n */\n List<ClientDTO> getList(String sessionId) throws RemoteException, UserNotLoggedInException;\n}",
"public interface RestClientService {\n\n\tCollection<Resource<MeasurementDto>> getCatalogueMeasurements(String uri, String metricName, String resourceName);\n\tResource<MeasurementDto> getMonitorMeasurement(String uri, UserCredentials user);\n\tCollection<Resource<SystemResourceDto>> getSystemResources(String uri);\n\tCollection<Resource<ComplexTypeDto>> getAvailableComplexTypes(String uri);\n\tResource<ComplexMeasurementDto> getComplexDetails(String uri);\n\tvoid addMeasurement(String uri, ComplexMeasurementOutDto measurement, UserCredentials user);\n\tvoid deleteMeasurement(String uri, UserCredentials user);\n}",
"public void createClient() {\n FarmersBaseClient client = new FarmBeatsClientBuilder()\n .endpoint(\"https://<farmbeats resource name>.farmbeats-dogfood.azure.net\")\n .credential(new DefaultAzureCredentialBuilder().build())\n .buildFarmersBaseClient();\n }",
"@Override\n public Client createClient(Client client)\n throws RemoteException {\n client=clientManager.create(client);\n \n return client;\n }",
"public T caseClientInterface(ClientInterface object)\n {\n return null;\n }",
"public ShoppingSessionClient() {\n\t\t/* TODO: instantiate the proxy using the EJBProxyFactory (see the other client classes) */\n\t}",
"Client addClient(Client client) throws BaseException;",
"public AbstractClient(Properties options) {\n\t\tthis.options = options;\n\t}",
"Client updateClient(Client client) throws ClientNotFoundException;",
"public interface ClientsInterface {\r\n\t/**\r\n\t * Gibt die Anzahl an Kunden in der Warteschlange an.\r\n\t * @return\tAnzahl an Kunden in der Warteschlange\r\n\t */\r\n\tint count();\r\n\r\n\t/**\r\n\t * Legt fest, dass ein bestimmter Kunde für den Weitertransport freigegeben werden soll.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t */\r\n\tvoid release(final int index);\r\n\r\n\t/**\r\n\t * Liefert den Namen eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tName des Kunden\r\n\t */\r\n\tString clientTypeName(final int index);\r\n\r\n\t/**\r\n\t * Liefert die ID der Station, an der der aktuelle Kunde erzeugt wurde oder an der ihm sein aktueller Typ zugewiesen wurde.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return\tID der Station\r\n\t */\r\n\tint clientSourceStationID(final int index);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Daten-Element eines Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tdouble clientData(final int index, final int data);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Daten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param data\tIndex des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientData(final int index, final int data, final double value);\r\n\r\n\t/**\r\n\t * Liefert ein Client-Textdaten-Element eins Kunden\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @return\tDaten-Element des Kunden\r\n\t */\r\n\tString clientTextData(final int index, final String key);\r\n\r\n\t/**\r\n\t * Stellt ein Client-Textdaten-Element eines Kunden ein\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param key\tSchlüssel des Datenelements\r\n\t * @param value\tNeuer Wert\r\n\t */\r\n\tvoid clientTextData(final int index, final String key, final String value);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingTime(int)\r\n\t */\r\n\tdouble clientWaitingSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Wartezeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Wartezeit des Kunden\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tString clientWaitingTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Wartezeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tWartezeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientWaitingSeconds(int)\r\n\t */\r\n\tvoid clientWaitingSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferTime(int)\r\n\t */\r\n\tdouble clientTransferSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Transferzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Transferzeit des Kunden\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tString clientTransferTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Transferzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tTransferzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientTransferSeconds(int)\r\n\t */\r\n\tvoid clientTransferSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessTime(int)\r\n\t */\r\n\tdouble clientProcessSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Bedienzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Bedienzeit des Kunden\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tString clientProcessTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Bedienzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tBedienzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientProcessSeconds(int)\r\n\t */\r\n\tvoid clientProcessSecondsSet(final int index, final double time);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in Sekunden als Zahlenwert\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceTime(int)\r\n\t */\r\n\tdouble clientResidenceSeconds(final int index);\r\n\r\n\t/**\r\n\t * Liefert die bisherige Verweilzeit eines Kunden in formatierter Form als Zeichenkette\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @return Bisherige Verweilzeit des Kunden\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tString clientResidenceTime(final int index);\r\n\r\n\t/**\r\n\t * Stellt die Verweilzeit des Kunden ein.\r\n\t * @param index\t0-basierender Index des Kunden\r\n\t * @param time\tVerweilzeit des Kunden (in Sekunden)\r\n\t * @see ClientsInterface#clientResidenceSeconds(int)\r\n\t */\r\n\tvoid clientResidenceSecondsSet(final int index, final double time);\r\n}",
"private ServerModelFacade(IServerProxy theProxy) {\n setServerProxy(theProxy);\n }",
"public interface Client {\n\n\t/**\n\t * @throws Http2Exception\n\t */\n\tvoid init() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean start() throws Http2Exception;\n\n\t/**\n\t * @param request\n\t * @return\n\t * @throws Http2Exception\n\t */\n\t Http2Response request(Http2Request request) throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean isRuning() throws Http2Exception;\n\n\t/**\n\t * @return\n\t * @throws Http2Exception\n\t */\n\tboolean shutdown() throws Http2Exception;\n\n}",
"public ClientRegistryStub(org.apache.axis2.context.ConfigurationContext configurationContext,\r\n java.lang.String targetEndpoint, boolean useSeparateListener)\r\n throws org.apache.axis2.AxisFault {\r\n //To populate AxisService\r\n populateAxisService();\r\n populateFaults();\r\n\r\n _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service);\r\n \r\n\t\r\n _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(\r\n targetEndpoint));\r\n _serviceClient.getOptions().setUseSeparateListener(useSeparateListener);\r\n \r\n //Set the soap version\r\n _serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);\r\n \r\n \r\n }",
"public PerfilCliente(Facade facade, String nome) {\n initComponents();\n this.facade = facade;\n LinkedList list = facade.buscarCliente(nome);\n Iterator it = list.iterator();\n c = (Cliente) it.next();\n iniciar();\n }",
"Client createNewClient(Client client);",
"public ClientI getClient() {\n\t\treturn client;\n\t}",
"@Override\n\tpublic Client getClientById(int id) {\n\t\treturn null;\n\t}",
"public Client getClient() {\n return client;\n }",
"public Client getClient() {\n return client;\n }",
"interface ClientName {\n\t\tString getName();\n\t}",
"private CorrelationClient() { }",
"public RecordedXmlTransportFactory(XmlRpcClient pClient) {\n super(pClient);\n }",
"public static void setClient(DucktalesClient clientInstance) {\n \tclient = clientInstance;\n }",
"public SpigetClient() {\n\t\tthis.userAgent = \"SpigetJavaClient/2.0\";\n\t}",
"public Cliente() {\n\t\tsuper();\n\t}",
"public TTransportFactory wrapTransportFactoryInClientUGI(TTransportFactory transFactory) {\n return new TUGIAssumingTransportFactory(transFactory, clientValidationUGI);\n }",
"public ApplicationHostService(HttpContext httpContext, NewRelicClient client)\n {\n super(httpContext, client);\n }",
"public Class<? extends ClientService> getObjectType() {\n\t\treturn ClientService.class;\r\n\t}",
"public BaseHttpXCapClient()\n {\n ServiceReference guiVerifyReference\n = SipActivator.getBundleContext().getServiceReference(\n CertificateService.class.getName());\n\n if(guiVerifyReference != null)\n certificateVerification\n = (CertificateService)SipActivator.getBundleContext()\n .getService(guiVerifyReference);\n }",
"public EO_ClientsImpl() {\n }",
"public interface DataStreamClient {\n\n Logger LOG = LoggerFactory.getLogger(DataStreamClient.class);\n\n /** Return Client id. */\n ClientId getId();\n\n /** Return Streamer Api instance. */\n DataStreamApi getDataStreamApi();\n\n /**\n * send to server via streaming.\n * Return a completable future.\n */\n\n /** To build {@link DataStreamClient} objects */\n class Builder {\n private ClientId clientId;\n private DataStreamClientRpc dataStreamClientRpc;\n private RaftProperties properties;\n private Parameters parameters;\n\n private Builder() {}\n\n public DataStreamClientImpl build(){\n if (clientId == null) {\n clientId = ClientId.randomId();\n }\n if (properties != null) {\n if (dataStreamClientRpc == null) {\n final SupportedDataStreamType type = RaftConfigKeys.DataStream.type(properties, LOG::info);\n dataStreamClientRpc = DataStreamClientFactory.cast(type.newFactory(parameters))\n .newDataStreamClientRpc(clientId, properties);\n }\n }\n return new DataStreamClientImpl(clientId, properties, dataStreamClientRpc);\n }\n\n public Builder setClientId(ClientId clientId) {\n this.clientId = clientId;\n return this;\n }\n\n public Builder setParameters(Parameters parameters) {\n this.parameters = parameters;\n return this;\n }\n\n public Builder setDataStreamClientRpc(DataStreamClientRpc dataStreamClientRpc){\n this.dataStreamClientRpc = dataStreamClientRpc;\n return this;\n }\n\n public Builder setProperties(RaftProperties properties) {\n this.properties = properties;\n return this;\n }\n }\n\n}",
"public static AuthenticatedClient getAuthenticatedClient() {\n\t\treturn getAuthenticatedClient(false);\n\t}",
"public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}",
"@FunctionalInterface\npublic interface ClientFactory {\n\n /**\n * Builds new client.\n * @param configuration Configuration.\n * @return Client.\n */\n DatabaseClient constructClient(Configuration configuration);\n}",
"interface Client {\n\n /**\n * Returns an ID string for this client.\n * The returned string should be unique among all clients in the system.\n *\n * @return An unique ID string for this client.\n */\n @Nonnull\n String getId();\n\n /**\n * Called when resources have been reserved for this client.\n *\n * @param resources The resources reserved.\n * @return <code>true</code> if, and only if, this client accepts the resources allocated. A\n * return value of <code>false</code> indicates this client does not need the given resources\n * (any more), freeing them implicitly.\n */\n boolean allocationSuccessful(@Nonnull Set<TCSResource<?>> resources);\n\n /**\n * Called if it was impossible to allocate a requested set of resources for this client.\n *\n * @param resources The resources which could not be reserved.\n */\n void allocationFailed(@Nonnull Set<TCSResource<?>> resources);\n }",
"public interface ClientService {\n Client save(Client client);\n Client getClientById(Long id);\n Client updateClient(Client client);\n Client deleteClient(Long id);\n}",
"private <T> T proxy(Class<T> serviceClass, String serviceUrl, Client client) {\n\n final WebTarget target = client.target(serviceUrl);\n return ((ResteasyWebTarget) target).proxy(serviceClass);\n }",
"public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }",
"protected HttpJsonServicesStub(ServicesStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new HttpJsonServicesCallableFactory());\n }",
"protected GrpcFeaturestoreServiceStub(\n FeaturestoreServiceStubSettings settings, ClientContext clientContext) throws IOException {\n this(settings, clientContext, new GrpcFeaturestoreServiceCallableFactory());\n }",
"@Test\n\tpublic void getClientTest() {\n\t\tClientDTO client = service.getClient(\"[email protected]\");\n\n\t\tassertEquals(\"Alin\", client.getFirstname());\n\t\tassertEquals(\"Neagu\", client.getLastname());\n\t\tassertEquals(\"[email protected]\", client.getEmail());\n\t}",
"@Override\r\n\tpublic void addclient(Client client) {\n\t\t\r\n\t}",
"public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }",
"protected EndpointAdminServiceClient getEndpointAdminServiceClient() throws AxisFault {\n return new EndpointAdminServiceClient();\n }",
"public interface Client extends ClientBase {\n\n\t/**\n\t * Adds a new listener for the client.<br>\n\t * <b>Note</b> that listeners should be added immediately when receiving the incoming notification.\n\t */\n\tpublic Client addListener(ClientListener listener);\n\n}"
] |
[
"0.71170264",
"0.678831",
"0.64196956",
"0.6343478",
"0.6121023",
"0.6089879",
"0.59696364",
"0.59603894",
"0.5945908",
"0.5929407",
"0.5919692",
"0.59185034",
"0.58813655",
"0.5879173",
"0.5876463",
"0.58048934",
"0.57640964",
"0.5759474",
"0.5728585",
"0.57248706",
"0.5709588",
"0.57093245",
"0.5696281",
"0.56932",
"0.56710917",
"0.56667846",
"0.5656194",
"0.5648455",
"0.5641495",
"0.5636856",
"0.5634741",
"0.5609756",
"0.5607586",
"0.560405",
"0.5588195",
"0.5584954",
"0.55841964",
"0.557817",
"0.5577297",
"0.55605257",
"0.55564827",
"0.5550847",
"0.55433434",
"0.5537028",
"0.5535282",
"0.5528069",
"0.55204415",
"0.55070996",
"0.5506319",
"0.5497937",
"0.54944444",
"0.5490713",
"0.5485959",
"0.54744583",
"0.5470366",
"0.544931",
"0.5438395",
"0.54362816",
"0.54246664",
"0.5424304",
"0.5415843",
"0.5401277",
"0.5397068",
"0.5392405",
"0.5391092",
"0.5390762",
"0.5389173",
"0.5388016",
"0.53810567",
"0.5379017",
"0.53726274",
"0.5371289",
"0.536924",
"0.536924",
"0.5366273",
"0.5364492",
"0.53599864",
"0.535522",
"0.5354126",
"0.5353437",
"0.53482884",
"0.534673",
"0.53442305",
"0.5328582",
"0.5321955",
"0.53196186",
"0.5311278",
"0.5307079",
"0.5305246",
"0.53051597",
"0.53044283",
"0.5296694",
"0.52901536",
"0.52882344",
"0.52877766",
"0.5282467",
"0.52811974",
"0.5278424",
"0.52772695",
"0.5275364"
] |
0.6820828
|
1
|
Override to provide a specialized version of ServerFacade
|
protected ServerFacade createServerFacade(IFlushable flushable, IProtocolLogger logger) {
return new ServerFacade(flushable, logger);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static ServerModelFacade getInstance() {\n if(m_theFacade == null)\n m_theFacade = new ServerModelFacade(new ServerProxy(new HttpCommunicator()));\n return m_theFacade;\n }",
"private ServerModelFacade(IServerProxy theProxy) {\n setServerProxy(theProxy);\n }",
"public interface Server {\n void register(String serverName, Class impl) throws Exception;\n\n void start() throws IOException;\n\n\n}",
"public interface ServerAdapter\nextends ClusterEventAdapter\n{\n\n\tpublic abstract ClusterMessageSender getClusterMessageSender();\n\n\t/**\n\t * @return the globalNamingServer\n\t */\n\tpublic abstract GlobalNamingServer getGlobalNamingServer();\n\tpublic abstract void setGlobalNamingServer(GlobalNamingServer globalNamingServer);\n\n\tpublic ServerAuthentication getServerAuthentication();\n\tpublic void setServerAuthentication(ServerAuthentication serverAuthentication);\n\t\n\t/**\n\t * @see gov.va.med.server.tomcat.ServerLifecycleListener#addLifecycleListener(gov.va.med.server.ServerLifecycleListener)\n\t */\n\tpublic abstract void addServerLifecycleListener(ServerLifecycleListener listener);\n\n\t/**\n\t * @see gov.va.med.server.tomcat.ServerLifecycleListener#removeLifecycleListener(gov.va.med.server.ServerLifecycleListener)\n\t */\n\tpublic abstract void removeServerLifecycleListener(ServerLifecycleListener listener);\n\n\t/**\n\t * \n\t * @param applicationEvent\n\t */\n\tpublic abstract void serverLifecycleEvent(ServerLifecycleEvent applicationEvent);\n\t\n}",
"IMember getServerStub();",
"public interface Server extends Endpoint, Resetable {\n\n /**\n * is bound.\n *\n * @return bound\n */\n boolean isBound();\n\n /**\n * get channels.\n *\n * @return channels\n */\n Collection<Channel> getChannels();\n\n /**\n * get channel.\n *\n * @param remoteAddress\n * @return channel\n */\n Channel getChannel(InetSocketAddress remoteAddress);\n\n}",
"ServerEntry getServer();",
"protected static AuoServer getServer() {\n return server;\n }",
"public RMIServerSocketFactory getServerSocketFactory() {\n/* 140 */ return ((TCPEndpoint)this.ep).getServerSocketFactory();\n/* */ }",
"@Override\n protected void extend(ServerConnector target) {\n\n }",
"public RMIServerInvokerInf getServerStub()\n {\n return this.server;\n }",
"public static @NonNull ServerChannelFactory<? extends ServerChannel> serverChannelFactory() {\n return CURR_NETTY_TRANSPORT.serverChannelFactory();\n }",
"S getServer();",
"ServerTransport serverTransport(TransportResources resources);",
"public static HttpServer startServer() {\n // create a resource config that scans for JAX-RS resources and providers\n // in com.example.rest package\n final ResourceConfig rc = new ResourceConfig().packages(\"com.assignment.backend\");\n rc.register(org.glassfish.jersey.moxy.json.MoxyJsonFeature.class);\n rc.register(getAbstractBinder());\n rc.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);\n rc.property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n }",
"public interface OServerAware {\n\n void init(OServer server);\n\n void coordinatedRequest(\n OClientConnection connection, int requestType, int clientTxId, OChannelBinary channel)\n throws IOException;\n\n ODistributedServerManager getDistributedManager();\n}",
"public InversorDosFacade() {\r\n super(InversorDos.class);\r\n }",
"public static server getServer(){\n return thisServer;\n }",
"public RentRPCServer() {\n\t\tsuper(null, null);\n\t\t// mocking purpose\n\t}",
"public interface ServerRegisterListener {\r\n \r\n /**\r\n * Register server listener.\r\n *\r\n * @param server the server\r\n */\r\n public void registerServerListener(Server server);\r\n \r\n}",
"public T caseServerInterface(ServerInterface object)\n {\n return null;\n }",
"public IStatus prepareForServingDirectly(IPath baseDir, TomcatServer server, String tomcatVersion);",
"public RemoteFacadeServiceLocator() {\r\n }",
"public Server getServer() {\n\t\treturn null;\r\n\t}",
"public LocalServer getServer() {\n return server;\n }",
"public void registerWithServer();",
"public IServerService getService() {\n return ServerService.this;\n }",
"public ServerSocketFactory getServerSocketFactory(){\n return factory;\n }",
"public interface VespaZooKeeperServer {\n\n}",
"public String getServerName();",
"public interface ServerSocketFactory {\n\n\t\tpublic ServerSocket create() throws IOException;\n\n\t}",
"protected RemoteServer(RemoteRef ref) {\n super(ref);\n }",
"public final SSLServerSocketFactory getServerSocketFactory() {\n return spiImpl.engineGetServerSocketFactory();\n }",
"public interface IRestServer {\n\n void start();\n\n void stop();\n}",
"public interface ServerComponent extends Service {\r\n\r\n\t/**\r\n\t * Set a configuration for this component\r\n\t * \r\n\t * @param conf\r\n\t */\r\n\tpublic void injectConfiguration(ComponentConfiguration conf);\r\n\r\n\t/**\r\n\t * Set a server context for this component\r\n\t * \r\n\t * @param context\r\n\t */\r\n\tpublic void injectContext(ComponentContext context);\r\n\r\n\t/**\r\n\t * Retrive the current configuration for this component\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic ComponentConfiguration getConfiguration();\r\n}",
"public interface CallServerSocketFactory {\n /**\n * @param pServerAddress Server identifier (DNS, IP, URL, etc.), can null\n */\n ServerSocket createSocket(\n String pServerAddress, \n int pPort)\n throws \n IOException;\n}",
"public String getServerBase() {\n HttpServletRequest request = FxJsfUtils.getRequest().getRequest();\n return \"http\" + (request.isSecure() ? \"s://\" : \"://\") + FxRequestUtils.getExternalServerName(request);\n }",
"private void setImpl() {\n Object obj = getConfigManager().getObject(\"SERVER_IMPL\");\n if (null == obj) {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"setImpl()\"\n , \"Could not instantiate SERVER_IMPL.\", \"Make sure loyalty.cfg contains SERVER_IMPL\"\n , LoggingServices.MAJOR);\n }\n LoyaltyServices.setCurrent((LoyaltyServices)obj);\n }",
"private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}",
"private LdapServerBean getLdapServerBean()\n {\n return getLdapServerBean( getDirectoryServiceBean() );\n }",
"public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }",
"public ServerDef() {}",
"public interface ISocketEchoServer extends ISocketServer\r\n{\r\n\r\n}",
"@Override\n protected ServerBuilder<?> getServerBuilder() {\n try {\n ServerCredentials serverCreds = TlsServerCredentials.create(\n TlsTesting.loadCert(\"server1.pem\"), TlsTesting.loadCert(\"server1.key\"));\n NettyServerBuilder builder = NettyServerBuilder.forPort(0, serverCreds)\n .flowControlWindow(AbstractInteropTest.TEST_FLOW_CONTROL_WINDOW)\n .maxInboundMessageSize(AbstractInteropTest.MAX_MESSAGE_SIZE);\n // Disable the default census stats tracer, use testing tracer instead.\n InternalNettyServerBuilder.setStatsEnabled(builder, false);\n return builder.addStreamTracerFactory(createCustomCensusTracerFactory());\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }",
"@Override\n default IServerPrx ice_locator(com.zeroc.Ice.LocatorPrx locator)\n {\n return (IServerPrx)_ice_locator(locator);\n }",
"public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}",
"public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }",
"public interface WebApiServer {\n\t\n\t/**\n\t * <p>Starts the server on the specified port.\n\t * \n\t * @param port The port at which the server is to be started.\n\t */\n\tpublic void start(int port);\n\t\n\t/**\n\t * <p>Stops the server and releases the port.\n\t */\n\tpublic void stop();\n\t\n}",
"public ServerInstance getServerInstance() {\n return serverInstance;\n }",
"public interface Server {\n\n /**\n * Start server.\n */\n void start();\n\n /**\n * Stop server.\n */\n void stop();\n\n /**\n * Is the server running?\n *\n * @return return true, not return false.\n */\n boolean isRunning();\n\n interface Listener {\n\n /**\n * The server is started.\n */\n void onStarted();\n\n /**\n * The server is stopped.\n */\n void onStopped();\n\n /**\n * An error occurred.\n *\n * @param e error.\n */\n void onError(Exception e);\n\n }\n}",
"private Server() {\r\n\r\n\t\t// Make sure that all exceptions are written to the log\r\n\t\tThread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler());\r\n\r\n\t\tnew Thread() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Find all controllers and initialize them\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tReflections reflections = new Reflections(\"net.yourhome.server\");\r\n\t\t\t\tSet<Class<? extends IController>> controllerClasses = reflections.getSubTypesOf(IController.class);\r\n\r\n\t\t\t\tfor (final Class<? extends IController> controllerClass : controllerClasses) {\r\n\t\t\t\t\tif (!Modifier.isAbstract(controllerClass.getModifiers())) {\r\n\t\t\t\t\t\tnew Thread() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tMethod factoryMethod;\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tfactoryMethod = controllerClass.getDeclaredMethod(\"getInstance\");\r\n\t\t\t\t\t\t\t\t\tIController controllerObject = (IController) factoryMethod.invoke(null, null);\r\n\t\t\t\t\t\t\t\t\tServer.this.controllers.put(controllerObject.getIdentifier(), controllerObject);\r\n\t\t\t\t\t\t\t\t\tSettingsManager.readSettings(controllerObject);\r\n\t\t\t\t\t\t\t\t\tcontrollerObject.init();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\tServer.log.error(\"Could not instantiate \" + controllerClass.getName() + \" because getInstance is missing\", e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}.start();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\r\n\t}",
"@Override\n protected HotRodServer createHotRodServer() {\n HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();\n serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler());\n\n return HotRodClientTestingUtil.startHotRodServer(cacheManager, serverBuilder);\n }",
"@Override\n default IServerPrx ice_router(com.zeroc.Ice.RouterPrx router)\n {\n return (IServerPrx)_ice_router(router);\n }",
"public static void main(String[] args) throws Exception {\n\n List<RequestHandle> requestHandleList = new ArrayList<RequestHandle>();\n requestHandleList.add(new LsfRequestServerHandle());\n\n final Server server = new Server(new DefaultServerRoute(),new ServerHandler(requestHandleList), GlobalManager.serverPort);\n Thread t= new Thread(new Runnable() {\n public void run() {\n //start server\n try {\n server.run();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n ServerConfig serverBean = new ServerConfig();\n serverBean.setAlias(\"test\");\n serverBean.setInterfaceId(IService.class.getCanonicalName());\n serverBean.setImpl(new IServerImpl());\n server.registerServer(serverBean);\n\n\n }",
"protected abstract String getBaseEndpoint();",
"public Server getServer() {\n return server;\n }",
"@Override\n\t\tpublic String getServerName() {\n\t\t\treturn null;\n\t\t}",
"private IFileServer fileServerStub(String hostname) {\n\t\tIFileServer stub = null;\n\n\t\ttry {\n\t\t\tRegistry registry = LocateRegistry.getRegistry(hostname);\n\t\t\tstub = (IFileServer) registry.lookup(\"server\");\n\t\t} catch (NotBoundException e) {\n\t\t\tSystem.out.println(\"Erreur: Le nom '\" + e.getMessage()\n\t\t\t\t\t+ \"' n'est pas défini dans le registre.\");\n\t\t} catch (AccessException e) {\n\t\t\tSystem.out.println(\"Erreur: \" + e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tSystem.out.println(\"Erreur: \" + e.getMessage());\n\t\t}\n\n\t\treturn stub;\n\t}",
"public interface ServerDriver {\n void start() throws Exception;\n\n void stop() throws Exception;\n\n void stopAtShutdown();\n\n void assertArrivedRequestMatching(Matcher<RequestSnapshot>... matchers) throws InterruptedException;\n\n String baseUrl();\n\n void respondAs(String content);\n}",
"@ImplementedBy(ServerPropertiesClasspath.class)\npublic interface ServerProperties\n{\n /**\n * Gets an integer property with a default\n * @param key The name of the property to retrieve\n * @param def The default value of the property\n * @return The int value of the property\n */\n int getInt( String key, int def);\n\n /**\n * Gets a string property, returning a default if undefined\n * @param key The name of the property to retrieve\n * @param def The default value of the property\n * @return The retrieved property value\n */\n String getString( String key, String def);\n\n /**\n * Gets the port on which the server should run\n */\n default int getPort()\n {\n return getInt(\"port\", 80);\n }\n\n /**\n * Gets the host on which the server is running\n */\n default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }\n\n /**\n * Gets the version of the current application\n */\n default String getVersion()\n {\n return getString( \"version\", \"Unknown Version\");\n }\n}",
"@Override\n\tpublic String getServerName() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getServerName() {\n\t\treturn null;\n\t}",
"public String getServerName() {\n if (server == null) {\n final String version = OpenEjbVersion.get().getVersion();\n final String os = System.getProperty(\"os.name\") + \"/\" + System.getProperty(\"os.version\") + \" (\" + System.getProperty(\"os.arch\") + \")\";\n server = \"OpenEJB/\" + version + \" \" + os;\n }\n return server;\n }",
"public interface Server {\n\n /**\n * start server\n */\n public void start();\n}",
"private Main startJndiServer() throws Exception {\n\t\tNamingServer namingServer = new NamingServer();\n\t\tNamingContext.setLocal(namingServer);\n\t\tMain namingMain = new Main();\n\t\tnamingMain.setInstallGlobalService(true);\n\t\tnamingMain.setPort( -1 );\n\t\tnamingMain.start();\n\t\treturn namingMain;\n\t}",
"protected Server() {\n super(\"Ublu Server\");\n }",
"public interface ServerSocketFactory {\n\n\n // --------------------------------------------------------- Public Methods\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, and is bound to a the specified port. The socket is\n * configured with the socket options (such as accept timeout)\n * given to this factory.\n *\n * @param port the port to listen to\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses all network interfaces on\n * the host, is bound to a the specified port, and uses the\n * specified connection backlog. The socket is configured with\n * the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n /**\n * Returns a server socket which uses only the specified network\n * interface on the local host, is bound to a the specified port,\n * and uses the specified connection backlog. The socket is configured\n * with the socket options (such as accept timeout) given to this factory.\n *\n * @param port the port to listen to\n * @param backlog how many connections are queued\n * @param ifAddress the network interface address to use\n *\n * @exception IOException input/output or network error\n * @exception KeyStoreException error instantiating the\n * KeyStore from file (SSL only)\n * @exception NoSuchAlgorithmException KeyStore algorithm unsupported\n * by current provider (SSL only)\n * @exception CertificateException general certificate error (SSL only)\n * @exception UnrecoverableKeyException internal KeyStore problem with\n * the certificate (SSL only)\n * @exception KeyManagementException problem in the key management\n * layer (SSL only)\n */\n public ServerSocket createSocket (int port, int backlog,\n InetAddress ifAddress)\n throws IOException, KeyStoreException, NoSuchAlgorithmException,\n CertificateException, UnrecoverableKeyException,\n KeyManagementException;\n\n\n}",
"public void setServer(Server server) {\n\t\t\r\n\t}",
"public GENServer getServer() {\n return server;\n }",
"public interface Server {\n\n public void start();\n\n public void stop();\n\n}",
"public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}",
"private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }",
"public interface IServer extends Remote {\n /**\n * @param auction\n * @throws RemoteException\n */\n void placeAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void register(IClient client) throws RemoteException, InterruptedException;\n\n void disconnect(IClient client) throws RemoteException;\n\n /**\n * @param client\n * @param newBid\n * @throws RemoteException\n */\n void raiseBid(IClient client, int newBid) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void timeElapsed(IClient client) throws RemoteException, InterruptedException;\n\n\tvoid registerCredentials(String username, String password) throws RemoteException, InterruptedException;\n\n\tboolean verifyCredentials(String username, String password) throws RemoteException, InterruptedException;\n\t\n}",
"public interface IUserService {\r\n\r\n ServerResponse<User> userlogin(String username, String password);\r\n\r\n ServerResponse<String> register(User user, Integer role);\r\n\r\n ServerResponse<String> checkValid(String value, String type);\r\n\r\n ServerResponse<User> updateUserInfo(User user, User currentUser);\r\n\r\n ServerResponse<String> selectVerifyType(String username, String type);\r\n\r\n ServerResponse<String> checkCode(String username, String verificationCode, String type);\r\n\r\n ServerResponse<String> forgetResetPassword(String username, String passwordNew, String forgetToken);\r\n\r\n ServerResponse<String> resetPassword(String username, String passwordOld, String passwordNew);\r\n\r\n ServerResponse<String> deliverResume(User user, Integer employmentId);\r\n\r\n ServerResponse getUserCollectionStatus(Integer type, Integer collectionId, User user);\r\n}",
"public AdminFacade() {\n super();\n }",
"public ServerHelper(Server server, Socket clientsoc) { //server obj is used to to call getlist method and use it\n this.server = server;\n this.clientsoc = clientsoc;\n }",
"public interface IRequestHandler<P extends IServerRequest> {\n\n /**\n * This function will be executed on the edex server and should expect a\n * certain request type\n * \n * @param request\n * the server request to process\n * @return An object which the caller of the handler will be expecting\n * @throws Exception\n * all exceptions will be caught by the server and the message\n * will be returned to the client\n */\n public Object handleRequest(P request) throws Exception;\n\n /**\n * Uses reflection to get the concrete type of P (see above\n * IRequestHandler<P extends IServerRequest). This is a convenience method\n * to allow automatic detection of the IServerRequest that should be tied to\n * this instance of the IRequestHandler. This is not safe if P is an\n * interface, an abstract class, or there are multiple handleRequest(P)\n * methods in a single class due to inheritance. If necessary, you can\n * implement this method to return P.class.\n * \n * @return the concrete class of the IServerRequest P, or null if it cannot\n * be determined\n * @author bsteffen\n */\n public default Class<?> getRequestType() {\n Class<?> clazz = this.getClass();\n /* Simple case that this class directly implements the interface */\n for (Type interfaze : clazz.getGenericInterfaces()) {\n if (interfaze instanceof ParameterizedType) {\n ParameterizedType parameterizedInterface = (ParameterizedType) interfaze;\n if (parameterizedInterface.getRawType()\n .equals(IRequestHandler.class)) {\n Type actualParameterType = parameterizedInterface\n .getActualTypeArguments()[0];\n if (actualParameterType instanceof Class) {\n return (Class<?>) actualParameterType;\n }\n return null;\n\n }\n }\n }\n Type superType = clazz.getGenericSuperclass();\n if (!(superType instanceof ParameterizedType)) {\n /*\n * The type of request must be a generic parameter on the super\n * type. Which means that the type of request to handle is not\n * inherited, it must be declared directly on this class.\n */\n return null;\n }\n\n Class<?> superClass = clazz.getSuperclass();\n Type[] actualTypeArguments = ((ParameterizedType) superType)\n .getActualTypeArguments();\n TypeVariable<?>[] typeParameters = superClass.getTypeParameters();\n\n Map<Type, Type> resolvedTypes = new HashMap<>();\n for (int i = 0; i < actualTypeArguments.length; i++) {\n resolvedTypes.put(typeParameters[i], actualTypeArguments[i]);\n }\n /*\n * Loop over the super types, matching generic parameters on the class\n * to generic parameters on the superclass. The loop terminates if no\n * generic parameters can be matched.\n */\n while (!resolvedTypes.isEmpty()) {\n for (Type interfaze : superClass.getGenericInterfaces()) {\n if (interfaze instanceof ParameterizedType) {\n ParameterizedType parameterizedInterface = (ParameterizedType) interfaze;\n if (parameterizedInterface.getRawType()\n .equals(IRequestHandler.class)) {\n Type actualParameterType = parameterizedInterface\n .getActualTypeArguments()[0];\n actualParameterType = resolvedTypes\n .get(actualParameterType);\n if (actualParameterType instanceof Class) {\n return (Class<?>) actualParameterType;\n }\n return null;\n }\n }\n }\n superType = clazz.getGenericSuperclass();\n if (!(superType instanceof ParameterizedType)) {\n return null;\n }\n superClass = superClass.getSuperclass();\n actualTypeArguments = ((ParameterizedType) superType)\n .getActualTypeArguments();\n typeParameters = superClass.getTypeParameters();\n /*\n * Match generic parameters on this superclass back to the\n * parameters on the original class.\n */\n Map<Type, Type> deepResolvedTypes = new HashMap<>();\n for (int i = 0; i < actualTypeArguments.length; i++) {\n Type resolvedType = resolvedTypes.get(actualTypeArguments[i]);\n if (resolvedType != null) {\n deepResolvedTypes.put(typeParameters[i], resolvedType);\n }\n }\n resolvedTypes = deepResolvedTypes;\n }\n return null;\n }\n}",
"public interface RemotingServer<T> {\n Set<RemotingClient<T>> getRemotingClients();\n\n Set<RemotingSupervisor<T>> getSupervisors();\n\n Set<SharingSession<T>> getSessions();\n\n void addRemotingClient(RemotingClient<T> client);\n\n void addSuprevisor(RemotingSupervisor<T> supervisor);\n}",
"@Bean(initMethod = \"start\", destroyMethod = \"stop\")\n public WireMockServer wireMockServer() {\n return new WireMockServer(9561);\n }",
"public ServerInfo clientInterface()\n {\n return client_stub;\n }",
"protected MBeanServer getMBeanServer() throws Exception {\n \t\tif (mbeanServer == null) {\n \t\t\tmbeanServer = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);\n \t\t}\n \t\treturn mbeanServer;\n \t}",
"public interface VSphereApi extends Closeable {\n @Delegate\n ClusterProfileManager getClusterProfileManagerApi();\n @Delegate\n AlarmManager getAlarmManagerApi();\n @Delegate\n AuthorizationManager getAuthorizationManagerApi();\n @Delegate\n CustomFieldsManager getCustomFieldsManagerApi();\n @Delegate\n CustomizationSpecManager getCustomizationSpecManagerApi();\n @Delegate\n EventManager getEventManagerApi();\n @Delegate\n DiagnosticManager getDiagnosticManagerApi();\n @Delegate\n DistributedVirtualSwitchManager getDistributedVirtualSwitchManagerApi();\n @Delegate\n ExtensionManager getExtensionManagerApi();\n @Delegate\n FileManager getFileManagerApi();\n @Delegate\n GuestOperationsManager getGuestOperationsManagerApi();\n @Delegate\n HostLocalAccountManager getAccountManagerApi();\n @Delegate\n LicenseManager getLicenseManagerApi();\n @Delegate\n LocalizationManager getLocalizationManagerApi();\n @Delegate\n PerformanceManager getPerformanceManagerApi();\n @Delegate\n ProfileComplianceManager getProfileComplianceManagerApi();\n @Delegate\n ScheduledTaskManager getScheduledTaskManagerApi();\n @Delegate\n SessionManager getSessionManagerApi();\n @Delegate\n HostProfileManager getHostProfileManagerApi();\n @Delegate\n IpPoolManager getIpPoolManagerApi();\n @Delegate\n TaskManager getTaskManagerApi();\n @Delegate\n ViewManager getViewManagerApi();\n @Delegate\n VirtualDiskManager getVirtualDiskManagerApi();\n @Delegate\n OptionManager getOptionManagerApi();\n @Delegate\n Folder getRootFolder();\n @Delegate\n ServerConnection getServerConnection();\n\n}",
"public static interface ServerCommon\n\t{\n\t\t/**\n\t\t * Return player list.\n\t\t * @return Set<Player> currently connected players.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException If server is not in GameCreation state.\n\t\t */\n\t\tMap<String, IPlayerConfig> getPlayerList() throws RpcException, StateMachineNotExpectedEventException;\n\t\t\n\t\t/**\n\t\t * Return the current game config.\n\t\t * @return GameConfig current game config.\n\t\t * @throws RpcException On connection error.\n\t\t * @throws StateMachineNotExpectedEventException.\n\t\t */\n\t\tIGameConfig getGameConfig() throws RpcException, StateMachineNotExpectedEventException;\t\t\t\t\t\t\t\t\n\t}",
"public Srv() {\n super(Epc.NAMESPACE, \"srv\");\n }",
"private void initialize() throws IOException, ServletException, URISyntaxException {\n\n LOG.info(\"Initializing the internal Server\");\n Log.setLog(new Slf4jLog(Server.class.getName()));\n\n /*\n * Create and configure the server\n */\n this.server = new Server();\n this.serverConnector = new ServerConnector(server);\n this.serverConnector.setReuseAddress(Boolean.TRUE);\n\n LOG.info(\"Server configure ip = \" + DEFAULT_IP);\n LOG.info(\"Server configure port = \" + DEFAULT_PORT);\n\n this.serverConnector.setHost(DEFAULT_IP);\n this.serverConnector.setPort(DEFAULT_PORT);\n this.server.addConnector(serverConnector);\n\n /*\n * Setup the basic application \"context\" for this application at \"/iop-node\"\n */\n this.servletContextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);\n this.servletContextHandler.setContextPath(JettyEmbeddedAppServer.DEFAULT_CONTEXT_PATH);\n this.server.setHandler(servletContextHandler);\n\n /*\n * Initialize webapp layer\n */\n WebAppContext webAppContext = new WebAppContext();\n webAppContext.setContextPath(JettyEmbeddedAppServer.DEFAULT_CONTEXT_PATH);\n\n URL webPath = JettyEmbeddedAppServer.class.getClassLoader().getResource(\"web\");\n LOG.info(\"webPath = \" + webPath.getPath());\n\n webAppContext.setResourceBase(webPath.toString());\n webAppContext.setContextPath(JettyEmbeddedAppServer.DEFAULT_CONTEXT_PATH+\"/web\");\n webAppContext.addBean(new ServletContainerInitializersStarter(webAppContext), true);\n webAppContext.setWelcomeFiles(new String[]{\"index.html\"});\n webAppContext.addFilter(AdminRestApiSecurityFilter.class, \"/rest/api/v1/admin/*\", EnumSet.of(DispatcherType.REQUEST));\n webAppContext.setInitParameter(\"org.eclipse.jetty.servlet.Default.dirAllowed\", \"false\");\n servletContextHandler.setHandler(webAppContext);\n server.setHandler(webAppContext);\n\n /*\n * Initialize restful service layer\n */\n ServletHolder restfulServiceServletHolder = new ServletHolder(new HttpServlet30Dispatcher());\n restfulServiceServletHolder.setInitParameter(\"javax.ws.rs.Application\", JaxRsActivator.class.getName());\n restfulServiceServletHolder.setInitParameter(\"resteasy.use.builtin.providers\", \"true\");\n restfulServiceServletHolder.setAsyncSupported(Boolean.TRUE);\n webAppContext.addServlet(restfulServiceServletHolder, \"/rest/api/v1/*\");\n\n this.server.dump(System.err);\n\n }",
"public abstract T addService(ServerServiceDefinition service);",
"@ArchTypeComponent(\n patterns = {@Pattern(name=\"testLayered\", kind = \"Layered\", role=\"Layer{1}\")}\n )\npublic interface ServerConnector { \n \n /** Send the on-the-wire string to the server side. \n * \n * @param onTheWireFormat the observation in the adopted \n * on-the-wire format. \n * @return a future that will eventually tell the status \n * of the transmission. \n */ \n public FutureResult sendToServer(String onTheWireFormat) throws IOException; \n \n /** Send a query for a set of observations to the server. \n * \n * @param query the query for observations. Use one of \n * those defined in the forwarder.query sub package as \n * these are the ONLY ones the server understands. \n * @param reponseType define the type of the \n * returned observations, either as a list of \n * StandardTeleObserations or as PHMR documents. \n * @return a future with the query result as one big \n * string that needs deserializing before it can \n * by understood. \n * @throws IOException \n * @throws Net4CareException \n * @throws UnknownCPRException \n */ \n\tpublic FutureResultWithAnswer queryToServer(Query query) throws IOException, Net4CareException; \n\t \n }",
"private TransportBean getLdapServerTransportBean()\n {\n return getLdapTransportBean( TRANSPORT_ID_LDAP );\n }",
"protected StandardizerServer()\r\n\t{\r\n\t}",
"@Override\n public MBeanServer getMBeanServer() {\n return mBeanServer;\n }",
"public interface FSInterface extends Remote\n{\n\tpublic String browseDirs(String dir) throws RemoteException;\n\tpublic String browseFiles(String dir) throws RemoteException;\n\tpublic String search(String file, String startDir) throws RemoteException;\n\tpublic boolean createFile(String file) throws RemoteException;\n\tpublic boolean createDir(String dir) throws RemoteException;\n\tpublic boolean delete(String file) throws RemoteException;\n\tpublic boolean rename(String oldName, String newName) throws RemoteException;\n\tpublic String getOSName()throws RemoteException;\n\tpublic String getHostName() throws RemoteException;\n\tpublic String getHostAddress() throws RemoteException;\n\tpublic void sendClientAddress(String clientAddress) throws RemoteException;\n\tpublic String getClientAddress() throws RemoteException;\n\tpublic Path [] getFileList() throws RemoteException;\n\t//public String sendClientName(String clientName) throws RemoteException; //ToDo\n\t//public String sendClientOS(String clientOS) throws RemoteException; //ToDo\n}",
"ServerInfo stub()\n {\n return new ServerInfo(NAMING_IP, REGISTRATION_PORT);\n }",
"private PSStartServerFactory() {\n if(instance == null)\n instance = new PSStartServerFactory();\n }",
"public Builder server(URI endpoint) {\n if (endpoint != null) {\n this.servers = Collections.singletonList(endpoint);\n }\n return this;\n }",
"public static FacadeMiniBank getInstance(){\r\n\r\n\t\tif(singleton==null){\r\n\t\t\ttry {\r\n\t\t\t\t//premier essai : implementation locale\r\n\t\t\t\tsingleton=(FacadeMiniBank) Class.forName(implFacadePackage + \".\" + localeFacadeClassName).newInstance();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.err.println(e.getMessage() + \" not found or not created\");\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t}\r\n\t\tif(singleton==null){\r\n\t\t\t//deuxieme essai : business delegate \r\n\t\t singleton=getRemoteInstance();\r\n\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\treturn singleton;\r\n\t}",
"public static void main(String[] args) {\n\n try {\n\n Registry registry = LocateRegistry.createRegistry( 1888);\n registry.rebind(\"YStudentServerImpl\", new YStudentServerImpl());\n\n\n }\n catch (Exception ex){\n System.err.println(\"YStudentServerImpl exeption\");\n ex.printStackTrace();\n }\n\n\n }",
"public SftpServer() {\n this(new SftpEndpointConfiguration());\n }",
"public interface IServerRouter {\n\t Optional<IServerAction> get(IServerExchange e);\n\n}",
"protected ClassServer(int aPort) throws IOException{\n this(aPort, null);\n }",
"public void updateServer(Identity identity, ServerInvokerMetadata invokers[]);"
] |
[
"0.6329637",
"0.6169065",
"0.61477524",
"0.6144207",
"0.6109628",
"0.6097399",
"0.5777637",
"0.5732078",
"0.5711644",
"0.5698164",
"0.561135",
"0.5582962",
"0.55454016",
"0.5535009",
"0.5509988",
"0.5505631",
"0.5505295",
"0.55024064",
"0.54832226",
"0.54668295",
"0.54606605",
"0.54562026",
"0.54442745",
"0.54350895",
"0.5428537",
"0.5427128",
"0.54238546",
"0.5412037",
"0.540753",
"0.5398869",
"0.5381196",
"0.5380447",
"0.5379336",
"0.53537637",
"0.53490525",
"0.5348067",
"0.53375334",
"0.53374994",
"0.5332812",
"0.53318584",
"0.5324104",
"0.5316768",
"0.5316612",
"0.5307528",
"0.5291583",
"0.5290987",
"0.5288916",
"0.5276872",
"0.527217",
"0.52668047",
"0.5252326",
"0.52500093",
"0.5243387",
"0.52377254",
"0.5233409",
"0.52278596",
"0.52242386",
"0.52240026",
"0.5219618",
"0.5206999",
"0.52060336",
"0.52060336",
"0.5204706",
"0.52023375",
"0.5199648",
"0.51938075",
"0.51905453",
"0.5182514",
"0.5172833",
"0.51639473",
"0.516378",
"0.51633376",
"0.5154418",
"0.51518476",
"0.5149711",
"0.5136806",
"0.51314265",
"0.51275355",
"0.5124446",
"0.5118285",
"0.5116856",
"0.5111332",
"0.5108859",
"0.5105909",
"0.50977004",
"0.50951195",
"0.5093834",
"0.5092612",
"0.5090558",
"0.5080297",
"0.50743496",
"0.50716496",
"0.5069492",
"0.50655454",
"0.5061989",
"0.50593674",
"0.50522923",
"0.50350493",
"0.5034613",
"0.5029551"
] |
0.70046383
|
0
|
TODO Autogenerated method stub
|
@Override
public void keyTyped(KeyEvent e) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void keyReleased(KeyEvent e) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\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
|
Testing whole process creation and modification.
|
@Test
public void testRun1() {
RingSum s = new RingSum(3);
for( int i = 0; i < 120; ++i )
{
s.push(0);
s.push(1);
s.push(0);
assertTrue(s.get() == 1);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\r\n\tpublic void testProcessInstanceExec()\r\n\t{\r\n\t\tthis.processDefinition = this.jbpmService.parseXMLResource(PROCESS_FILE);\r\n\r\n\t\tthis.jbpmService.deployProcessDefinition(this.processDefinition);\r\n\r\n\t\t// Create the instance based on the latest definition\r\n\t\tProcessInstance processInstance = this.jbpmService.createProcessInstance(this.processDefinition.getName());\r\n\r\n\t\t// Make sure instance was created\r\n\t\tassertNotNull(\"Error: jbpmService failed to create process instance for process definition \\\"\"\r\n\t\t\t\t\t\t\t\t\t+ this.processDefinition.getName() + \"\\\".\", processInstance);\r\n\r\n\t\t// Should be at start node initially\r\n\t\tassertEquals(START_NODE_NAME, processInstance.getRootToken().getNode().getName());\r\n\r\n\t\t// Let's start the process execution\r\n\t\tthis.jbpmService.signalProcessInstance(processInstance.getId());\r\n\r\n\t\t// Now the process should be in the middle state.\r\n\t\t// Reload the instance through the service so root token gets updated\r\n\t\tprocessInstance = this.jbpmService.getProcessInstance(processInstance.getId());\r\n\t\tassertEquals(MIDDLE_NODE_NAME, processInstance.getRootToken().getNode().getName());\r\n\r\n\t\t// Leave middle node and transition to the end node.\r\n\t\tthis.jbpmService.signalProcessInstance(processInstance.getId());\r\n\r\n\t\t// After signal, should be at end-state of simple process\r\n\t\tassertTrue(this.jbpmService.hasProcessInstanceEnded(processInstance.getId()));\r\n\r\n\r\n\t\t// Verify we can retrieve state from database\r\n\t\t// Again, reload the instance through the service so root token is updated\r\n\t\tprocessInstance = this.jbpmService.getProcessInstance(processInstance.getId());\r\n\t\tassertEquals(END_NODE_NAME, processInstance.getRootToken().getNode().getName());\r\n\t}",
"@Test\n void setPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }",
"@Test\n public void testSave() throws Exception {\n ProcessResource processResource = new ProcessResource();\n processResource.setPath(\"practice/testProcess.process\");\n\n resourceManager.save(processResource, new ProcessDefinition());\n }",
"Process createProcess();",
"@Test\n public void testSetPermissions() {\n System.out.println(\"setPermissions\");\n ArrayList<File> files = new ArrayList<File>();\n Docker instance = new Docker(\"ubuntu\", \"git\", files, \"sh6791\", \"matrix\", \"v1\", \"saqhuss\", \"dockersh6791\", \"[email protected]\");\n instance.setPermissions();\n Process p;\n String line = null;\n StringBuilder sb = new StringBuilder();\n try {\n p = Runtime.getRuntime().exec(new String[]{\"docker\", \"ps\"});\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n line = reader.readLine();\n } catch (Exception e) {\n\n }\n assertEquals(line.split(\" \")[0].trim(), \"CONTAINER\");\n }",
"@Test\n public void deleteProcessInstanceAndNotArchivedProcessIntances() throws Exception {\n final String userTaskName = \"step1\";\n final ProcessDefinition processDefinition = deployAndEnableSimpleProcess(\"myProcess\", userTaskName);\n processDefinitions.add(processDefinition); // To clean in the end\n\n // start a process non completed process\n final ProcessInstance processInstance = getProcessAPI().startProcess(processDefinition.getId());\n waitForUserTask(processInstance, userTaskName);\n\n // delete the process instance\n getProcessAPI().deleteProcessInstance(processInstance.getId());\n\n // check that all archived process instance related to this process were deleted\n final List<ArchivedProcessInstance> archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(processInstance.getId(), 0, 10);\n assertEquals(1, archivedProcessInstanceList.size());\n }",
"@Test\n @Deployment(resources = {\"BPMN/utility-counter.bpmn\"})\n public void shouldExecuteProcess() {\n ProcessInstance processInstance = runtimeService().startProcessInstanceByKey(\"utility-counter\");\n // Then it should be active\n assertThat(processInstance).isActive();\n // And it should be the only instance\n assertThat(processInstanceQuery().count()).isEqualTo(1);\n // And there should exist just a single task within that process instance\n assertThat(task(processInstance)).hasName(\"Wait\\nfor\\nPicture\");\n\n // When we complete that task\n complete(task(processInstance));\n // Then the process instance should be ended\n assertThat(processInstance).isEnded();\n }",
"@Before\r\n\tpublic void setUp() {\r\n\t\tprocessFile = new ProcessFile();\r\n\t}",
"@Test \n public void testSubprocess() {\n ExecutableWorkflow workflow = new ExecutableWorkflow()\n .activity(\"start\", new StartEvent()\n .transitionTo(\"sub\"))\n .activity(\"sub\", new EmbeddedSubprocess()\n .activity(\"w1\", new ReceiveTask())\n .activity(\"w2\", new ReceiveTask())\n .transitionTo(\"end\"))\n .activity(\"end\", new EndEvent());\n \n deploy(workflow);\n\n WorkflowInstance workflowInstance = start(workflow);\n assertOpen(workflowInstance, \"sub\", \"w1\", \"w2\");\n \n workflowInstance = endTask(workflowInstance, \"w1\");\n assertOpen(workflowInstance, \"sub\", \"w2\");\n\n workflowInstance = endTask(workflowInstance, \"w2\");\n assertTrue(workflowInstance.isEnded());\n }",
"ProcessRunner waitFor();",
"@Test\n void getPid() {\n assertEquals(3, new Process() {{\n setPid(3);\n }}.getPid());\n }",
"@Test(expected = DeletionException.class)\n public void deleteJustProcessDefinition() throws Exception {\n final String userTaskName = \"step1\";\n final ProcessDefinition processDefinition = deployAndEnableSimpleProcess(\"myProcess\", userTaskName);\n processDefinitions.add(processDefinition); // To clean in the end\n\n // start a process and execute it until end\n final ProcessInstance processInstanceToArchive = getProcessAPI().startProcess(processDefinition.getId());\n waitForUserTaskAndExecuteIt(processInstanceToArchive, userTaskName, user);\n waitForProcessToFinish(processInstanceToArchive);\n\n // start a process non completed process\n final ProcessInstance activeProcessInstance = getProcessAPI().startProcess(processDefinition.getId());\n waitForUserTask(activeProcessInstance, userTaskName);\n\n // check number of process instances and archived process instances\n List<ProcessInstance> processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.DEFAULT);\n final List<ArchivedProcessInstance> archivedProcessInstances = getProcessAPI().getArchivedProcessInstances(0, 10, ProcessInstanceCriterion.DEFAULT);\n assertEquals(1, processInstances.size());\n assertEquals(1, archivedProcessInstances.size());\n\n // delete definition\n try {\n getProcessAPI().disableAndDeleteProcessDefinition(processDefinition.getId());\n } finally {\n // check number of process instances and archived process instances\n processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.DEFAULT);\n assertFalse(processInstances.isEmpty());\n\n List<ArchivedProcessInstance> archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(processInstanceToArchive.getId(), 0, 10);\n assertFalse(archivedProcessInstanceList.isEmpty());\n\n archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(activeProcessInstance.getId(), 0, 10);\n assertFalse(archivedProcessInstanceList.isEmpty());\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Test\r\n\tpublic void testDeployAndFindProcessDefinition()\r\n\t{\r\n\t\tthis.processDefinition = this.jbpmService.parseXMLResource(PROCESS_FILE);\r\n\r\n\t\tthis.jbpmService.deployProcessDefinition(this.processDefinition);\r\n\r\n\t\tProcessDefinition processDefFromDb = this.jbpmService.findLatestProcessDefinition(this.processDefinition.getName());\r\n\t\t\r\n\t\t// All nodes equal?\r\n\t\tList<Node> origNodes = this.processDefinition.getNodes();\r\n\t\tList<Node> rndTripNodes = processDefFromDb.getNodes();\r\n\t\tassertTrue(origNodes.size() == rndTripNodes.size());\r\n\t\tint idx = 0;\r\n\t\tfor (Object origObjNode : origNodes)\r\n\t\t{\r\n\t\t\tNode origNode = (Node) origObjNode;\r\n\t\t\tNode rndTripNode = (Node) (rndTripNodes.get(idx++));\r\n\t\t\tassertTrue(origNode.getName().equals(rndTripNode.getName()));\r\n\t\t\tassertTrue(origNode.getId() == rndTripNode.getId());\r\n\t\t\tassertTrue(origNode.getParent().getName().equals(rndTripNode.getParent().getName()));\r\n\t\t}\r\n\t}",
"@Test\n public void deleteProcessInstanceAlsoDeleteChildrenProcesses() throws Exception {\n final String simpleStepName = \"simpleStep\";\n final ProcessDefinition simpleProcess = deployAndEnableSimpleProcess(\"simpleProcess\", simpleStepName);\n processDefinitions.add(simpleProcess); // To clean in the end\n\n // deploy a process P2 containing a call activity calling P1\n final String intermediateStepName = \"intermediateStep1\";\n final String intermediateCallActivityName = \"intermediateCall\";\n final ProcessDefinition intermediateProcess = deployAndEnableProcessWithCallActivity(\"intermediateProcess\", simpleProcess.getName(),\n intermediateStepName, intermediateCallActivityName);\n processDefinitions.add(intermediateProcess); // To clean in the end\n\n // deploy a process P3 containing a call activity calling P2\n final String rootStepName = \"rootStep1\";\n final String rootCallActivityName = \"rootCall\";\n final ProcessDefinition rootProcess = deployAndEnableProcessWithCallActivity(\"rootProcess\", intermediateProcess.getName(), rootStepName,\n rootCallActivityName);\n processDefinitions.add(rootProcess); // To clean in the end\n\n // start P3, the call activities will start instances of P2 a and P1\n final ProcessInstance rootProcessInstance = getProcessAPI().startProcess(rootProcess.getId());\n waitForUserTask(rootProcessInstance, simpleStepName);\n\n // check that the instances of p1, p2 and p3 were created\n List<ProcessInstance> processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(3, processInstances.size());\n\n // check that archived flow nodes\n List<ArchivedActivityInstance> taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 100,\n ActivityInstanceCriterion.DEFAULT);\n assertTrue(taskInstances.size() > 0);\n\n // delete the root process instance\n getProcessAPI().deleteProcessInstance(rootProcessInstance.getId());\n\n // check that the instances of p1 and p2 were deleted\n processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(0, processInstances.size());\n\n // check that archived flow nodes were not deleted.\n taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 100, ActivityInstanceCriterion.DEFAULT);\n assertEquals(0, taskInstances.size());\n }",
"@Test\n\tpublic void Processes_29838_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// TODO: VOOD-580\n\t\t// Navigate to Admin -> Roles Management -> Customer Support Administrator -> Set access = Disable for Accounts module and Click on save.\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\taccountAccessACL = new VoodooControl(\"td\", \"id\", \"ACLEditView_Access_Accounts_access\");\n\t\taccountAccessACL.click();\n\t\tVoodooUtils.waitForReady();\n\t\taccountAccessSelect = new VoodooControl(\"select\", \"css\", \"#ACLEditView_Access_Accounts_access select\");\n\t\taccountAccessSelect.set(customData.get(\"accessTypeSet\"));\n\t\taccountAccessSaveBtn = new VoodooControl(\"input\", \"id\", \"ACLROLE_SAVE_BUTTON\");\n\t\taccountAccessSaveBtn.click();\n\t\tVoodooUtils.waitForReady(30000);\n\t\tVoodooUtils.focusDefault();\n\t\t\n\t\t// Log out from Admin and Login as QAuser(User1)\n\t\tsugar().logout();\n\t\tsugar().login(sugar().users.getQAUser());\n\t\t\n\t\t// Navigate to all processDefinitions modules\n\t\tsugar().processDefinitions.navToListView();\n\t\tsugar().processDefinitions.listView.create();\n\t\t\n\t\t// Verify that the disabled module is not displayed in the Target module list for processDefinitions modules.\n\t\tsugar().processDefinitions.createDrawer.getEditField(\"targetModule\").assertContains(customData.get(\"verifyText\"), false);\n\t\t\n\t\t// Navigate to all processDefinitions modules\n\t\tsugar().processBusinessRules.navToListView();\n\t\tsugar().processBusinessRules.listView.create();\n\t\t\n\t\t// Verify that the disabled module is not displayed in the Target module list for processBusinessRules modules.\n\t\tsugar().processBusinessRules.createDrawer.getEditField(\"targetModule\").assertContains(customData.get(\"verifyText\"), false);\n\t\t\n\t\t// Navigate to all processDefinitions modules\n\t\tsugar().processEmailTemplates.navToListView();\n\t\tsugar().processEmailTemplates.listView.create();\n\t\t\n\t\t// Verify that the disabled module is not displayed in the Target module list for processEmailTemplates modules.\n\t\tsugar().processEmailTemplates.createDrawer.getEditField(\"targetModule\").assertContains(customData.get(\"verifyText\"), false);\n\t\t\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}",
"@Test\r\n public void test() {\n assertEquals(JShell.getWorkingDir().toString(), \"MASTER\");\r\n\r\n // Test setWorkingDir\r\n ArrayList<String> testMKDIR = new ArrayList<String>();\r\n // Directories made for testCase1 \"a\"\r\n String[] testCasesMKDIR1 = {\"mkdir\", \"a\"};\r\n testMKDIR.addAll(Arrays.asList(testCasesMKDIR1));\r\n MKDIR.execute(testMKDIR);\r\n // CD changes sets the working directory to \"a\"\r\n ArrayList<String> testCD2 = new ArrayList<String>();\r\n String[] testCasesCD2 = {\"cd\", \"a\"};\r\n testCD2.addAll(Arrays.asList(testCasesCD2));\r\n CD.execute(testCD2);\r\n // See if the directory has been changed\r\n assertEquals(JShell.getWorkingDir().toString(), \"a\");\r\n\r\n // Test getInputs and setInputs is shown in HISTORYTest - redundant code\r\n // Test getDirHistory and setDirHistory is shown in POPDTest and PUSHDTest -\r\n // redundant code\r\n }",
"@Test\n public void deleteArchivedProcessInstanceAndChildrenProcesses() throws Exception {\n final String simpleStepName = \"simpleStep\";\n final ProcessDefinition simpleProcess = deployAndEnableSimpleProcess(\"simpleProcess\", simpleStepName);\n processDefinitions.add(simpleProcess); // To clean in the end\n\n // deploy a process P2 containing a call activity calling P1\n final String rootStepName = \"rootStep1\";\n final String rootCallActivityName = \"rootCall\";\n final ProcessDefinition rootProcess = deployAndEnableProcessWithCallActivity(\"rootProcess\", simpleProcess.getName(), rootStepName,\n rootCallActivityName);\n processDefinitions.add(rootProcess); // To clean in the end\n\n // start P2, the call activities will start an instance of P1\n final ProcessInstance rootProcessInstance = getProcessAPI().startProcess(rootProcess.getId());\n final ActivityInstance simpleTask = waitForUserTaskAndAssignIt(rootProcessInstance, simpleStepName, user);\n final ProcessInstance simpleProcessInstance = getProcessAPI().getProcessInstance(simpleTask.getParentProcessInstanceId());\n getProcessAPI().executeFlowNode(simpleTask.getId());\n\n waitForUserTask(rootProcessInstance, rootStepName);\n waitForProcessToFinish(simpleProcessInstance);\n\n // check that only one instance (p2) is in the journal: p1 is supposed to be archived\n List<ProcessInstance> processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(1, processInstances.size());\n\n // check that there are archived instances of p1\n List<ArchivedProcessInstance> archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(simpleProcessInstance.getId(), 0, 10);\n assertTrue(archivedProcessInstanceList.size() > 0);\n\n // delete archived root process instances\n getProcessAPI().deleteArchivedProcessInstances(rootProcess.getId(), 0, 30);\n\n // check that the instance of p2 was not deleted\n processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(1, processInstances.size());\n\n // check that the archived instances of p1 were deleted\n archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(simpleProcessInstance.getId(), 0, 1000);\n assertEquals(0, archivedProcessInstanceList.size());\n\n // check that archived flow node were deleted.\n final List<ArchivedActivityInstance> taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 10,\n ActivityInstanceCriterion.DEFAULT);\n assertEquals(0, taskInstances.size());\n }",
"@Test\n public void testGetPidWaitList() {\n }",
"@Test\n public void testProcess() throws Exception {\n }",
"@Test\n public void testProcess() { // not using mock\n System.out.println(\"process\");\n\n GameData gameData = new GameData();\n gameData.getKeys().setKey(GameKeys.UP, true);\n gameData.setDelta(1);\n gameData.setDisplayWidth(800);\n gameData.setDisplayHeight(600);\n\n World world = new World();\n PlayerPlugin playerPlugin = new PlayerPlugin();\n playerPlugin.start(gameData, world);\n\n Entity player = world.getEntities(Player.class).get(0);\n PositionPart pos = player.getPart(PositionPart.class);\n\n float startX = pos.getX();\n float startY = pos.getY();\n\n PlayerControlSystem instance = new PlayerControlSystem();\n instance.process(gameData, world);\n\n float endX = pos.getX();\n float endY = pos.getY();\n\n assertEquals((int) startX, (int) endX);\n assertNotEquals((int) startY, (int) endY);\n }",
"public void test_execute() throws Throwable {\r\n\t\t\r\n\t\tCLIService service = null;\r\n\t\t\r\n\t\t// Ping\r\n\t\ttry {\r\n\t\t\tservice = CLIServiceWrapper.getService();\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PING + \" \" + TEST_PING_ARG0);\r\n\t\t\tif ( CLIServiceTools.isResponseOkAndComplete(response) ) {\r\n\t\t\t\tPASS(TEST_PING);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PING, \"Response not ok. response=\" + response);\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PING,\"ping failed to exception:\" + e.getMessage());\r\n\t\t}\r\n\r\n\t\t// Process list - log and cli\r\n\t\ttry {\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PROCESSLIST);\r\n\t\t\tif ( (CLIServiceTools.isResponseOkAndComplete(response)) && (response.indexOf(TEST_PROCESSLIST_VALIDATION1) >= 0) &&\r\n\t\t\t\t (response.indexOf(TEST_PROCESSLIST_VALIDATION2) >= 0) && (response.indexOf(TEST_PROCESSLIST_VALIDATION3) >= 0) ) {\r\n\t\t\t\tPASS(TEST_PROCESSLIST);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PROCESSLIST, \"Response not ok. See log for response.\");\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PROCESSLIST,\"process list failed to exception:\" + e.getMessage());\r\n\t\t}\t\r\n\t\t\r\n\t\t// Process list - log only - the CLI output should not contain any validations, just the OK.\r\n\t\ttry {\r\n\t\t\tString response = service.tender(CLIServiceConstants.COMMAND_PROCESSLIST + \" =\" + CLIServiceConstants.COMMAND_PROCESSLIST_LOG_VALUE);\r\n\t\t\tif ( (CLIServiceTools.isResponseOkAndComplete(response)) && (response.indexOf(TEST_PROCESSLIST_VALIDATION1) < 0) &&\r\n\t\t\t (response.indexOf(TEST_PROCESSLIST_VALIDATION2) < 0) && (response.indexOf(TEST_PROCESSLIST_VALIDATION3) < 0) ) {\r\n\t\t\t\tPASS(TEST_PROCESSLIST_LOG);\r\n\t\t\t} else {\r\n\t\t\t\tFAIL(TEST_PROCESSLIST_LOG, \"Response not ok. See log for response.\");\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tABORT(TEST_PROCESSLIST_LOG,\"process list (log only) failed to exception:\" + e.getMessage());\r\n\t\t}\t\r\n\r\n\t}",
"@Test\n public void testStartProcessing() {\n simpleProcessingStarterUnderTest.startProcessing();\n\n // Verify the results\n }",
"@Test\n public void testModuleOperations()\n throws Exception\n {\n // instance exists (auto-created)\n ModuleInfo info = moduleManager.getModuleInfo(MarketDataCoreModuleFactory.INSTANCE_URN);\n assertNotNull(info);\n assertNotNull(info.getCreated());\n assertNotNull(info.getStarted());\n // instance started (auto-started)\n assertEquals(ModuleState.STARTED,\n info.getState());\n new ExpectedFailure<ModuleStateException>(Messages.MODULE_NOT_STARTED_STATE_INCORRECT) {\n @Override\n protected void run()\n throws Exception\n {\n moduleManager.start(MarketDataCoreModuleFactory.INSTANCE_URN);\n }\n };\n new ExpectedFailure<ModuleException>(Messages.CANNOT_DELETE_SINGLETON) {\n @Override\n protected void run()\n throws Exception\n {\n moduleManager.deleteModule(MarketDataCoreModuleFactory.INSTANCE_URN);\n }\n };\n new ExpectedFailure<ModuleException>(Messages.CANNOT_CREATE_SINGLETON) {\n @Override\n protected void run()\n throws Exception\n {\n moduleManager.createModule(MarketDataCoreModuleFactory.PROVIDER_URN);\n }\n };\n moduleManager.stop(MarketDataCoreModuleFactory.INSTANCE_URN);\n info = moduleManager.getModuleInfo(MarketDataCoreModuleFactory.INSTANCE_URN);\n assertEquals(ModuleState.STOPPED,\n info.getState());\n moduleManager.start(MarketDataCoreModuleFactory.INSTANCE_URN);\n info = moduleManager.getModuleInfo(MarketDataCoreModuleFactory.INSTANCE_URN);\n assertEquals(ModuleState.STARTED,\n info.getState());\n }",
"@Test\n public void deleteProcessInstanceAlsoDeleteArchivedChildrenProcesses() throws Exception {\n final String simpleStepName = \"simpleStep\";\n final ProcessDefinition simpleProcess = deployAndEnableSimpleProcess(\"simpleProcess\", simpleStepName);\n processDefinitions.add(simpleProcess); // To clean in the end\n\n // deploy a process P2 containing a call activity calling P1\n final String rootStepName = \"rootStep1\";\n final String rootCallActivityName = \"rootCall\";\n final ProcessDefinition rootProcess = deployAndEnableProcessWithCallActivity(\"rootProcess\", simpleProcess.getName(), rootStepName,\n rootCallActivityName);\n processDefinitions.add(rootProcess); // To clean in the end\n\n // start P2, the call activities will start an instance of P1\n final ProcessInstance rootProcessInstance = getProcessAPI().startProcess(rootProcess.getId());\n final ActivityInstance simpleTask = waitForUserTaskAndGetIt(rootProcessInstance, simpleStepName);\n final ProcessInstance simpleProcessInstance = getProcessAPI().getProcessInstance(simpleTask.getParentProcessInstanceId());\n assignAndExecuteStep(simpleTask, user.getId());\n waitForProcessToFinish(simpleProcessInstance);\n waitForUserTask(rootProcessInstance, rootStepName);\n\n // check that only one instance (p2) is in the journal: p1 is supposed to be archived\n List<ProcessInstance> processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(1, processInstances.size());\n\n // check that there are archived instances of p1\n List<ArchivedProcessInstance> archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(simpleProcessInstance.getId(), 0, 10);\n assertTrue(archivedProcessInstanceList.size() > 0);\n\n // delete the root process instance\n getProcessAPI().deleteProcessInstance(rootProcessInstance.getId());\n\n // check that the instance of p2 was deleted\n processInstances = getProcessAPI().getProcessInstances(0, 10, ProcessInstanceCriterion.NAME_ASC);\n assertEquals(0, processInstances.size());\n\n // check that the archived instances of p1 were not deleted\n archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(simpleProcessInstance.getId(), 0, 10);\n assertEquals(0, archivedProcessInstanceList.size());\n\n // check that archived flow node were not deleted.\n final List<ArchivedActivityInstance> taskInstances = getProcessAPI().getArchivedActivityInstances(rootProcessInstance.getId(), 0, 10,\n ActivityInstanceCriterion.DEFAULT);\n assertEquals(0, taskInstances.size());\n }",
"public interface ProcessTest {\n void process();\n}",
"private static SimpleProcessExecutor newSimpleProcessExecutor() {\n return new SimpleProcessExecutor(new TestProcessManagerFactory().newProcessManager());\n }",
"@Test\n public void deleteProcessInstanceAndComments() throws Exception {\n final String userTaskName = \"etapa1\";\n final ProcessDefinition processDefinition = deployAndEnableSimpleProcess(\"ArchivedCommentsDeletion\", userTaskName);\n processDefinitions.add(processDefinition); // To clean in the end\n final ProcessInstance processInstance = getProcessAPI().startProcess(processDefinition.getId());\n final long userTaskId = waitForUserTask(processInstance, userTaskName);\n\n // add a comment\n getProcessAPI().addProcessComment(processInstance.getId(), \"just do it.\");\n assignAndExecuteStep(userTaskId, user);\n waitForProcessToFinish(processInstance);\n\n SearchResult<ArchivedComment> searchResult = getProcessAPI().searchArchivedComments(new SearchOptionsBuilder(0, 10).done());\n assertTrue(searchResult.getCount() > 0);\n\n getProcessAPI().deleteProcessInstances(processDefinition.getId(), 0, 10);\n\n // check all archived comments were deleted along with process instance:\n searchResult = getProcessAPI().searchArchivedComments(new SearchOptionsBuilder(0, 10).done());\n assertEquals(2, searchResult.getCount()); // \"just do it.\" && technical comment\n }",
"public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}",
"@Test\n public void testTransientProcessInstanceDeclaringProcessInterfaceStandardImpl() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_PROCESS_INTERFACE, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_MODEL_REF.times(1),\n SELECT_PREFERENCE.times(7));\n }",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunchThenKill() throws Throwable {\n\t}",
"@Test\n public void testExec2() throws Exception {\n mv.exec(new String[]{\"mv\", \"dir1\", \"newPath\"}, io);\n assertEquals(\"create\", ((MockFileSystem) fs).getFileRecord());\n }",
"interface RespawnPolicy {\n\n /**\n * Respawn a process.\n *\n * @param process\n */\n void respawn(int count, ManagedProcess process);\n\n RespawnPolicy NONE = new RespawnPolicy() {\n\n @Override\n public void respawn(final int count, final ManagedProcess process) {\n ProcessLogger.SERVER_LOGGER.tracef(\"not trying to respawn process %s.\", process.getProcessName());\n }\n\n };\n\n RespawnPolicy RESPAWN = new RespawnPolicy() {\n\n private static final int MAX_WAIT = 60;\n private static final int MAX_RESTARTS = 10;\n\n @Override\n public void respawn(final int count, final ManagedProcess process) {\n if(count <= MAX_RESTARTS) {\n try {\n final int waitPeriod = Math.min((count * count), MAX_WAIT);\n ProcessLogger.SERVER_LOGGER.waitingToRestart(waitPeriod, process.getProcessName());\n TimeUnit.SECONDS.sleep(waitPeriod);\n } catch (InterruptedException e) {\n return;\n }\n process.respawn();\n }\n }\n };\n\n\n}",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunchShowsInProcessContainer() throws Throwable {\n\t}",
"@Test\n public void testExec5() throws Exception {\n mv.exec(new String[]{\"mv\", \"reg1\", \"newPath\"}, io);\n assertEquals(\"create\", ((MockFileSystem) fs).getFileRecord());\n }",
"@Test\n public void deleteArchivedProcessInstances() throws Exception {\n final String userTaskName = \"step1\";\n final ProcessDefinition processDefinition = deployAndEnableSimpleProcess(\"myProcess\", userTaskName);\n processDefinitions.add(processDefinition); // To clean in the end\n\n // start a process non completed process\n final ProcessInstance processInstance = getProcessAPI().startProcess(processDefinition.getId());\n waitForUserTask(processInstance, userTaskName);\n\n // delete archived process instances\n getProcessAPI().deleteArchivedProcessInstances(processDefinition.getId(), 0, 1000);\n\n // check that all archived process instance related to this process were deleted\n final List<ArchivedProcessInstance> archivedProcessInstanceList = getProcessAPI().getArchivedProcessInstances(processInstance.getId(), 0, 10);\n assertEquals(0, archivedProcessInstanceList.size());\n }",
"@Test\n public void testGetChildProcesses() {\n // Testing child processes is tricky because we don't really know a priori what\n // processes might have children, and if we do test the full list vs. individual\n // processes, we run into a race condition where child processes can start or\n // stop before we measure a second time. So we can't really test for one-to-one\n // correspondence of child process lists.\n //\n // We can expect code logic failures to occur all/most of the time for\n // categories of processes, however, and allow occasional differences due to\n // race conditions. So we will test three categories of processes: Those with 0\n // children, those with exactly 1 child process, and those with multiple child\n // processes. On the second poll, we expect at least half of processes in those\n // categories to still be in the same category.\n //\n Platform si = new Platform();\n OperatingSystem os = si.getOperatingSystem();\n List<OSProcess> processes = os.getProcesses(0, null);\n Set<Integer> zeroChildSet = new HashSet<>();\n Set<Integer> oneChildSet = new HashSet<>();\n Set<Integer> manyChildSet = new HashSet<>();\n // Initialize all processes with no children\n for (OSProcess p : processes) {\n zeroChildSet.add(p.getProcessID());\n }\n // Move parents with 1 or more children to other set\n for (OSProcess p : processes) {\n if (zeroChildSet.contains(p.getParentProcessID())) {\n // Zero to One\n zeroChildSet.remove(p.getParentProcessID());\n oneChildSet.add(p.getParentProcessID());\n } else if (oneChildSet.contains(p.getParentProcessID())) {\n // One to many\n oneChildSet.remove(p.getParentProcessID());\n manyChildSet.add(p.getParentProcessID());\n }\n }\n // Now test that majority of each set is in same category\n int matched = 0;\n int total = 0;\n for (Integer i : zeroChildSet) {\n if (os.getChildProcesses(i, 0, null).isEmpty()) {\n matched++;\n }\n // Quit if enough to test\n if (++total > 9) {\n break;\n }\n }\n if (total > 4) {\n assertTrue(\"Most processes with no children should not suddenly have them.\", matched > total / 2);\n }\n matched = 0;\n total = 0;\n for (Integer i : oneChildSet) {\n if (os.getChildProcesses(i, 0, null).size() == 1) {\n matched++;\n }\n // Quit if enough to test\n if (++total > 9) {\n break;\n }\n }\n if (total > 4) {\n assertTrue(\"Most processes with one child should not suddenly have zero or more than one.\",\n matched > total / 2);\n }\n matched = 0;\n total = 0;\n for (Integer i : manyChildSet) {\n if (os.getChildProcesses(i, 0, null).size() > 1) {\n matched++;\n }\n // Quit if enough to test\n if (++total > 9) {\n break;\n }\n }\n if (total > 4) {\n assertTrue(\"Most processes with more than one child should not suddenly have one or less.\",\n matched > total / 2);\n }\n }",
"public abstract void runProcess();",
"@Test void checkRecycle_Process_Spawn() {\n\t\tvar alg = (PointTrackerKltPyramid<GrayF32, GrayF32>)createTracker();\n\n\t\talg.process(image);\n\t\talg.spawnTracks();\n\n\t\tint total = alg.active.size();\n\n\t\tassertTrue(total > 0);\n\t\tassertEquals(0, alg.dropped.size());\n\n\t\t// drastically change the image causing tracks to be dropped\n\t\tGImageMiscOps.fill(image, 0);\n\t\talg.process(image);\n\n\t\tint difference = total - alg.active.size();\n\t\tassertEquals(difference, alg.dropped.size());\n\t\tassertEquals(difference, alg.unused.size());\n\t}",
"Subprocess createSubprocess();",
"@Test\n public void testTransientProcessInstanceWithoutForkOnTraversal()\n {\n sf.getWorkflowService().startProcess(PROCESS_DEF_ID_NON_FORKED, null, true);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1));\n }",
"@Test\n public void testTransientProcessInstanceWithSubProcessHavingSubProcessWithSplits() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_SUB_SUB_PROCESS, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_PREFERENCE.times(7));\n }",
"public void testNewTaskManager() throws Exception {\n System.out.println(\"newTaskManager\");\n \n TaskManagerFactory instance = TaskManagerFactory.getInstance();\n \n \n TaskManager result = instance.getTaskManager();\n assertNotNull(\"TaskManager should not be null\", result);\n \n }",
"@Test\n public void testExec4() throws Exception {\n mv.exec(new String[]{\"mv\", \"reg1\", \"reg2\"}, io);\n assertEquals(\"overwrite\", ((MockFileSystem) fs).getFileRecord());\n }",
"@Test public void testVerifyProcessing() throws Exception {\n Data data = new Data(new Long(1l), \"test\");\n gigaSpace.write(data);\n\n // create a template of the processed data (processed)\n Data template = new Data();\n template.setType(new Long(1l));\n template.setProcessed(Boolean.TRUE);\n\n // wait for the result\n Data result = (Data)gigaSpace.take(template, 500);\n // verify it\n assertNotNull(\"No data object was processed\", result);\n assertEquals(\"Processed Flag is false, data was not processed\", Boolean.TRUE, result.isProcessed());\n assertEquals(\"Processed text mismatch\", \"PROCESSED : \" + data.getRawData(), result.getData());\n }",
"@Test\n public void lifecycleStatusTest() {\n // TODO: test lifecycleStatus\n }",
"public void test_prepare() throws Throwable {\r\n\t\tSET_LONG_NAME(\"system.cli.simple\");\r\n\t DECLARE(TEST_PING);\r\n\t DECLARE(TEST_PROCESSLIST);\r\n\t DECLARE(TEST_PROCESSLIST_LOG);\r\n\t}",
"@Test\n public void deleteArchivedProcessInstanceAndComments() throws Exception {\n final String userTaskName = \"etapa1\";\n final ProcessDefinition processDefinition = deployAndEnableSimpleProcess(\"ArchivedCommentsDeletion\", userTaskName);\n processDefinitions.add(processDefinition); // To clean in the end\n final ProcessInstance processInstance = getProcessAPI().startProcess(processDefinition.getId());\n final long userTaskId = waitForUserTask(processInstance, userTaskName);\n\n // add a comment\n getProcessAPI().addProcessComment(processInstance.getId(), \"just do it2.\");\n assignAndExecuteStep(userTaskId, user);\n waitForProcessToFinish(processInstance);\n\n SearchResult<ArchivedComment> searchResult = getProcessAPI().searchArchivedComments(new SearchOptionsBuilder(0, 10).done());\n assertTrue(searchResult.getCount() > 0);\n\n getProcessAPI().deleteArchivedProcessInstances(processDefinition.getId(), 0, 10);\n\n // check all archived comments were deleted along with process instance:\n searchResult = getProcessAPI().searchArchivedComments(new SearchOptionsBuilder(0, 10).done());\n assertEquals(0, searchResult.getCount());\n }",
"@Test\n public void testNewJobHistoryProcessing()\n {\n Job job = jobFakery.makeFakeJob();\n JobHistory newJobHistory = jobHistoryTx.newJobHistoryProcessing(job, START_TIME);\n\n verify(mockJobHistoryDAO).persist(newJobHistory);\n assertEquals(newJobHistory.getStatus(), JobStatus.PROCESSING);\n assertNull(newJobHistory.getEndTime());\n }",
"public void testCmdUpdate() {\n\t\ttestCmdUpdate_taskID_field();\n\t\ttestCmdUpdate_taskName_field();\n\t\ttestCmdUpdate_time_field();\n\t\ttestCmdUpdate_priority_field();\n\t}",
"@Test\n public void restartSystemTest() {\n //Setup\n launcher.launch();\n Game game = launcher.getGame();\n game.start();\n game.stop();\n assertThat(game.isInProgress()).isFalse();\n\n //Execute\n game.start();\n\n //Assert\n assertThat(game.isInProgress()).isTrue();\n }",
"@Test(groups = {\"rest-commands\"})\n public void createStandaloneInstanceTest() {\n GlassFishServer server = glassFishServer();\n Command command = new CommandCreateInstance(STANDALONE_INSTANCE, null,\n TestDomainV4Constants.NODE_NAME);\n try {\n Future<ResultString> future =\n ServerAdmin.<ResultString>exec(server, command);\n try {\n ResultString result = future.get();\n //assertNotNull(result.getValue());\n assertEquals(result.state, TaskState.COMPLETED);\n } catch ( InterruptedException | ExecutionException ie) {\n fail(\"CommandCreateInstance command execution failed: \" + ie.getMessage());\n }\n } catch (GlassFishIdeException gfie) {\n fail(\"CommandCreateInstance command execution failed: \" + gfie.getMessage());\n }\n }",
"@Test\n @Deployment(resources = \"ex3a.bpmn\")\n public void testHappyPath() {\n Map<String, Object> variables = new HashMap<>();\n variables.put(\"approved\", true);\n // Start process with Java API and variables\n ProcessInstance processInstance = runtimeService().startProcessInstanceByKey(\"TwitterQAProcessEx3a\", variables);\n // Make assertions on the process instance\n assertThat(processInstance).isEnded();\n }",
"@Test\n public void deleteProcessInstanceAlsoDeleteComments() throws Exception {\n final String userTaskName = \"step1\";\n final ProcessDefinition processDefinition = deployAndEnableSimpleProcess(\"myProcess\", userTaskName);\n processDefinitions.add(processDefinition); // To clean in the end\n final ProcessInstance processInstance = getProcessAPI().startProcess(processDefinition.getId());\n waitForUserTask(processInstance, userTaskName);\n\n // add a comment\n getProcessAPI().addProcessComment(processInstance.getId(), \"just do it.\");\n\n SearchResult<Comment> searchResult = getProcessAPI().searchComments(new SearchOptionsBuilder(0, 10).done());\n assertTrue(searchResult.getCount() > 0);\n\n // delete process instance\n getProcessAPI().deleteProcessInstance(processInstance.getId());\n\n // check all comments were deleted\n searchResult = getProcessAPI().searchComments(new SearchOptionsBuilder(0, 10).done());\n assertEquals(0, searchResult.getCount());\n }",
"@Test\n public void doExecuteSimpleSequence() throws Exception {\n Executable executable1 = new TestParallelActivity(\"activity1\");\n Executable executable2 = new TestParallelActivity(\"activity2\");\n Executable executable3 = new TestParallelActivity(\"activity3\");\n\n // create one sequance\n Sequence sequence = new Sequence(\"sequence1\");\n // add the executables to the sequence\n sequence.addExecutable(executable1);\n sequence.addExecutable(executable2);\n sequence.addExecutable(executable3);\n\n // create a context for the sequence\n Context context = new Context();\n\n // create a new WorkflowVariables for the sequence\n WorkflowVariables<String, Object> workflowVariables = new ExtensibleWorkflowVariables<String, Object>(Arrays.asList(\"activity1-thread-id\", \"activity2-thread-id\", \"activity3-thread-id\"));\n\n // when\n\n // execute the sequence\n ExecutionStatus status = sequence.doExecute(\"\",context, workflowVariables);\n\n // then\n\n // the execution status should be completed\n assertEquals(true, status.isComplete());\n\n // execution status should have three children, one for each child executable of the sequence\n assertEquals(3, status.getChildren().size());\n\n\n // each child execution status should have the id of its executable\n assertEquals(\"activity1\", status.getChildren().get(0).getExecutableId());\n assertEquals(\"activity2\", status.getChildren().get(1).getExecutableId());\n assertEquals(\"activity3\", status.getChildren().get(2).getExecutableId());\n\n // each child execution status should also be completed\n assertEquals(true, status.getChildren().get(0).isComplete());\n assertEquals(true, status.getChildren().get(1).isComplete());\n assertEquals(true, status.getChildren().get(2).isComplete());\n\n }",
"@Test\n public void testTransientProcessInstanceWithForkOnTraversal() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_FORKED, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_PREFERENCE.times(7));\n }",
"public boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx);",
"public abstract void runProcess(String[] args) throws Exception;",
"public interface Process extends Remote {\n\t\n\t/**\n\t * This method tells if the process is alive and can participate in leader election.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean isAlive() throws RemoteException;\n\t\n\t/**\n\t * This method tells if the process in a leader in distributed environment.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean isLeader() throws RemoteException;\n\t\n\t/**\n\t * This method gets the logical clock value (random) for this process.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic int getLogicalClock() throws RemoteException;\n\t\n\t/**\n\t * This method gets the process name, given during initialization.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic String getProcessName() throws RemoteException;\n\t\n\t/**\n\t * This method gets called in election to compare the logical clock values.\n\t * @param message\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean inquiry(Message message) throws RemoteException;\n\t\n\t/**\n\t * This method is called to announce victory after the election.\n\t * @param message\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean victory(Message message) throws RemoteException;\n\n}",
"@Test\n public void testBuildContainer() throws Exception {\n System.out.println(\"buildContainer\");\n JTextArea ta = new JTextArea();\n //Create temp host file\n try {\n //\"False\" in file writer for no append\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"hosts\", false)));\n out.println(\"[email protected]\");\n out.flush();\n } catch (Exception e) {\n\n }\n ArrayList<File> files = new ArrayList<File>();\n Docker instance = new Docker(\"ubuntu\", \"git\", files, \"sh6791\", \"matrix\", \"v1\", \"saqhuss\", \"dockersh6791\", \"[email protected]\");\n instance.buildDockerfile();\n instance.buildContainer(ta);\n Process p;\n String line = null;\n StringBuilder sb = new StringBuilder();\n try {\n p = Runtime.getRuntime().exec(new String[]{\"docker\", \"images\"});\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } catch (Exception e) {\n\n }\n assertEquals(sb.toString().split(\"\\n\")[1].split(\" \")[0].trim(), \"saqhuss/matrix\");\n Files.delete(Paths.get(\"Dockerfile\"));\n Files.delete(Paths.get(\"hosts\"));\n Files.delete(Paths.get(\"id_rsa\"));\n Files.delete(Paths.get(\"id_rsa.pub\"));\n Files.delete(Paths.get(\"authorized_keys\"));\n }",
"public void execute() {\n TestOrchestratorContext context = factory.createContext(this);\n\n PipelinesManager pipelinesManager = context.getPipelinesManager();\n ReportsManager reportsManager = context.getReportsManager();\n TestDetectionOrchestrator testDetectionOrchestrator = context.getTestDetectionOrchestrator();\n TestPipelineSplitOrchestrator pipelineSplitOrchestrator = context.getPipelineSplitOrchestrator();\n\n pipelinesManager.initialize(testTask.getPipelineConfigs());\n reportsManager.start(testTask.getReportConfigs(), testTask.getTestFramework());\n pipelineSplitOrchestrator.start(pipelinesManager);\n\n testDetectionOrchestrator.startDetection();\n testDetectionOrchestrator.waitForDetectionEnd();\n LOGGER.debug(\"test - detection - ended\");\n\n pipelineSplitOrchestrator.waitForPipelineSplittingEnded();\n pipelinesManager.pipelineSplittingEnded();\n LOGGER.debug(\"test - pipeline splitting - ended\");\n\n pipelinesManager.waitForExecutionEnd();\n reportsManager.waitForReportEnd();\n\n LOGGER.debug(\"test - execution - ended\");\n }",
"public static Process createEntity() {\n Process process = new Process()\n .name(DEFAULT_NAME)\n .isRunning(DEFAULT_IS_RUNNING)\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT);\n return process;\n }",
"@Test\n public void testExec3() throws Exception {\n mv.exec(new String[]{\"mv\", \"reg1\", \"dir1\"}, io);\n assertEquals(\"move\", ((MockFileSystem) fs).getFileRecord());\n }",
"@Test\n public void testCreationTimestamp() {\n Product newProduct = TestUtil.createProduct();\n productCurator.create(newProduct);\n Pool pool = createPoolAndSub(owner, newProduct, 1L,\n TestUtil.createDate(2011, 3, 30),\n TestUtil.createDate(2022, 11, 29));\n poolCurator.create(pool);\n \n assertNotNull(pool.getCreated());\n }",
"public void shouldCreate() {\n }",
"@Ignore\n @Test\n public void withDestroyAndCreateServer() throws CAException, InterruptedException, TimeoutException, BrokenBarrierException, java.util.concurrent.TimeoutException {\n MemoryProcessVariable pv = new MemoryProcessVariable(\"test\", null, DBR_Int.TYPE, new int[]{2});\n server.registerProcessVaribale(pv);\n\n //Create a client context\n Context clientContext = jca.createContext(JCALibrary.CHANNEL_ACCESS_JAVA);\n\n //Create a channel\n Channel ch = clientContext.createChannel(\"test\", new ConnectionListener() {\n @Override\n public void connectionChanged(ConnectionEvent ev) {\n LOG.info(\"State change to: \" + ev.isConnected());\n try {\n barrier.await();\n } catch (InterruptedException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n } catch (BrokenBarrierException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n });\n\n //wait at most 5 seconds for channel to change state (hopefully to CONNECTED)\n barrier.await(5, TimeUnit.SECONDS);\n //check that channel is connected\n assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());\n //check that value can be read\n DBR dbr = ch.get();\n clientContext.pendIO(0);\n assertEquals(2, ((int[]) dbr.getValue())[0]);\n\n //unregister process variable and destroy it\n server.unregisterProcessVaribale(\"test\");\n pv.destroy();\n\n //destroy the server and start it up again\n tearDownServer();\n setupServer();\n\n\n //wait at most 5 seconds for channel to change state (hopefully to DISCONNECTED)\n barrier.await(5, TimeUnit.SECONDS);\n //check that channel is not connected\n assertNotSame(Channel.ConnectionState.CONNECTED, ch.getConnectionState());\n\n //create new process variable and register it with server\n pv = new MemoryProcessVariable(\"test\", null, DBR_Int.TYPE, new int[]{1});\n server.registerProcessVaribale(pv);\n\n //wait at most 5 seconds for channel to change state (hopefully to CONNECTED)\n barrier.await(5, TimeUnit.SECONDS);\n //check that channel is connected\n assertEquals(Channel.ConnectionState.CONNECTED, ch.getConnectionState());\n //check that value can be read, and it is the new value\n dbr = ch.get();\n clientContext.pendIO(0);\n assertEquals(1, ((int[]) dbr.getValue())[0]);\n\n }",
"@Test\n\tpublic void addTaskOutput(){\n\t}",
"@Test(groups = {\"rest-commands\"}, dependsOnMethods = {\"createStandaloneInstanceTest\"})\n public void startInstanceTest() {\n GlassFishServer server = glassFishServer();\n Command command = new CommandStartInstance(STANDALONE_INSTANCE);\n try {\n Future<ResultString> future =\n ServerAdmin.<ResultString>exec(server, command);\n try {\n ResultString result = future.get();\n //assertNotNull(result.getValue());\n assertEquals(result.state, TaskState.COMPLETED);\n } catch ( InterruptedException | ExecutionException ie) {\n fail(\"CommandStartInstance command execution failed: \" + ie.getMessage());\n }\n } catch (GlassFishIdeException gfie) {\n fail(\"CommandStartInstance command execution failed: \" + gfie.getMessage());\n }\n }",
"@Test\n public void processUpdates_Test() throws Exception {\n try {\n System.out.println(\"processUpdates_Test\");\n\n\n persistManager_Server.registerPersistenceEventListener(PersistenceEventType.Server_Event_ProcessedChunk,\n new PersistentMatricesManager_EventListener() {\n\n public void eventOccurred(PersistentMatricesManager persistenceMatrixManager, PersistenceEventType eventType, Object... eventParams)\n throws Exception_PersistenceEventHandler {\n try {\n serverEvent_ProcessedChunk((Integer)eventParams[0], (File)eventParams[1], (Long)eventParams[2]);\n } catch(Exception e) {\n throw new Exception_PersistenceEventHandler(\"Had ERROR!\", e);\n }\n }\n }\n );\n\n persistManager_Server.registerPersistenceEventListener(PersistenceEventType.Server_Event_ShutDownRequestCompleted,\n new PersistentMatricesManager_EventListener() {\n\n public void eventOccurred(PersistentMatricesManager persistenceMatrixManager, PersistenceEventType eventType, Object... eventParams)\n throws Exception_PersistenceEventHandler {\n try {\n serverEvent_ShutdownRequestCompleted();\n } catch(Exception e) {\n throw new Exception_PersistenceEventHandler(\"Had ERROR!\", e);\n }\n }\n }\n );\n\n super.register_PersistenceMatrixGeneration_ServerEvents();\n\n\n // Wait until all the chunks have been processed\n synchronized(testThread_LockObject) {\n testThread_LockObject.wait();\n }\n System.out.println(\"Waiting for server to terminate inbox monitor thread...\");\n persistManager_Server.awaitTermination();\n // sleep for a couple of secs, in case multiThreaded_AssertEquals() has had an assert failure,\n // is stopping the server, and doing any last operations.\n Thread.sleep(3000);\n\n System.out.println(\"...Test stopped.\");\n\n\n } catch (Exception e) {\n stopPersistenceServer();\n throw e;\n }\n\n }",
"public abstract Process getProcess();",
"Process getProcess();",
"@Test\n public void testGameProcess() {\n // set test player data\n mTournament.setPlayerCollection(getTestPlayersData());\n\n int roundNumber = mTournament.calculateRoundsNumber(mTournament.getPlayersCount());\n for (int i = 0; i < roundNumber; ++i) {\n Round round = mTournament.createNewRound();\n assertTrue(\"State of new round must be CREATED\", round.getState() == State.CREATED);\n\n // tests can't create new round because not all rounds are completed\n Round falseRound = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, falseRound);\n\n round.startRound();\n assertTrue(\"State of starting round must be RUNNING\", round.getState() == State.RUNNING);\n\n randomiseResults(round.getMatches());\n round.endRound();\n assertTrue(\"State of ending round must be COMPLETED\", round.getState() == State.COMPLETED);\n\n // tests that ended round can't be started again\n round.startRound();\n assertTrue(\"State of ended round must be COMPLETED\", round.getState() == State.COMPLETED);\n }\n // tests can't create one more round because game is over at this point\n Round round = mTournament.createNewRound();\n assertEquals(\"Instance must be null\", null, round);\n\n }",
"@Override\n public int execute(Parameters parameters) {\n\n final List<String> command = new ArrayList<>();\n final String b = binary.get();\n if (b == null) {\n throw new IllegalStateException(\"No binary found\");\n }\n command.add(binary.get());\n final ProcessBuilder pb = new ProcessBuilder(command);\n if (workdir != null) {\n pb.directory(workdir);\n }\n final Process p;\n try {\n if (commonArgs != null) {\n command.addAll(commonArgs.stream().map(Supplier::get).toList());\n }\n Collections.addAll(command, parameters.args);\n logger.info(toString(command));\n p = pb.start();\n parameters.onProcessCreation.accept(p);\n\n final ProcessTimeoutHandle handle;\n if (processTimeout != null) {\n handle = startProcessTimeoutMonitor(p, String.valueOf(command), processTimeout);\n } else {\n handle = null;\n }\n final Copier inputCopier = parameters.in != null ?\n copyThread(\n \"input -> process input copier\",\n parameters.in,\n p.getOutputStream(),\n (c) -> closeSilently(p.getOutputStream()),\n (e) -> {},\n p\n ) : null;\n\n final Copier copier;\n if (parameters.out != null) {\n InputStream commandOutput;\n if (useFileCache) {\n commandOutput = FileCachingInputStream\n .builder()\n .input(p.getInputStream())\n .noProgressLogging()\n .build();\n } else {\n commandOutput = p.getInputStream();\n }\n copier = copyThread(\"process output parameters out copier\",\n commandOutput,\n parameters.out,\n (c) -> closeSilently(commandOutput),\n (e) -> {\n Process process = p.destroyForcibly();\n logger.info(\"Killed {} because {}: {}\", process, e.getClass(), e.getMessage());\n }, p);\n } else {\n copier = null;\n }\n\n final Copier errorCopier = copyThread(\n \"error copier\",\n p.getErrorStream(),\n parameters.errors,\n (c) -> closeSilently(p.getErrorStream()),\n (e) -> {},\n p\n );\n if (inputCopier != null) {\n if (needsClose(p.getInputStream())) {\n inputCopier.waitForAndClose();\n } else {\n inputCopier.waitFor();\n }\n }\n\n p.waitFor();\n\n if (copier != null) {\n copier.waitForAndClose();\n }\n errorCopier.waitForAndClose();\n int result = p.exitValue();\n logger.log(exitCodeLogLevel.apply(result), \"Exit code {} for calling {}\", result, commandToString(command));\n\n if (parameters.out != null) {\n parameters.out.flush();\n }\n parameters.errors.flush();\n if (handle != null) {\n handle.cancel();\n }\n return result;\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n throw new RuntimeException(e);\n } catch (IOException e) {\n if (isBrokenPipe(e)) {\n logger.debug(e.getMessage());\n throw new BrokenPipe(e);\n } else {\n logger.error(e.getClass().getName() + \":\" + e.getMessage(), e);\n throw new RuntimeException(e);\n\n }\n } finally {\n this.logger.debug(\"Ready\");\n }\n }",
"public abstract void initializeProcess();",
"@Test\n public void testTransientProcessInstanceDeclaringProcessInterfaceAlternativeImpl() throws Exception\n {\n final int modelOid = setUpAlternativePrimaryImplementation();\n\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_PROCESS_INTERFACE, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_MODEL_REF.times(1));\n\n tearDownAlternativePrimaryImplementation(modelOid);\n }",
"@Test\n public void launchesEventhandlerUpdatelastmodificationTest() {\n // TODO: test launchesEventhandlerUpdatelastmodification\n }",
"@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t}",
"@Test\n public void testExec1() throws Exception {\n mv.exec(new String[]{\"mv\", \"dir1\", \"dir2\"}, io);\n assertEquals(\"move\", ((MockFileSystem) fs).getFileRecord());\n }",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunchThenDetach() throws Throwable {\n\t}",
"@Test\r\n\tpublic void mainTest() throws ExceptionMP, InterruptedException {\n\t\tBot bot = new Bot();\r\n\t\tThread t = new Thread(bot);\r\n\t\tt.start();\r\n\t\tThread.sleep(10000);\r\n\r\n\t\t// check if the file has been created\r\n\t\tboolean fileCreated = false;\r\n\t\tFile file = new File(Config.getFilepathSystem() + \"/output/\");\r\n\t\tFile[] files = file.listFiles();\r\n\t\tfor (File f : files) {\r\n\t\t\tif (f.getPath().contains(\"portrait_of_finnish_bands\")) {\r\n\t\t\t\tfileCreated = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tassertTrue(fileCreated);\r\n\t}",
"public VersionManagementTest(String testName) throws IOException {\n \n super(testName);\n Logging.start(SetupUtils.DEBUG_LEVEL, SetupUtils.DEBUG_CATEGORIES);\n \n osdCfg = SetupUtils.createOSD1Config();\n capSecret = osdCfg.getCapabilitySecret();\n \n \n }",
"private static void performProcessBuilder() throws IOException, InterruptedException {\n\t final File batchFile = new File(\"C:\\\\Users\\\\prabhun\\\\Desktop\\\\test2.bat\");\r\n\r\n\t // The output file. All activity is written to this file\r\n\t final File outputFile = new File(String.format(\"C:\\\\Users\\\\prabhun\\\\Desktop\\\\output_%tY%<tm%<td_%<tH%<tM%<tS.txt\",\r\n\t System.currentTimeMillis()));\r\n\r\n\t // The argument to the batch file. \r\n\t final String argument = \"Prabhu Narayan Jaiswal\";\r\n\r\n\t // Create the process\r\n\t final ProcessBuilder processBuilder = new ProcessBuilder(batchFile.getAbsolutePath(), argument);\r\n\t // Redirect any output (including error) to a file. This avoids deadlocks\r\n\t // when the buffers get full. \r\n\t processBuilder.redirectErrorStream(true);\r\n\t //processBuilder.redirectOutput(outputFile);\r\n\r\n\t // Add a new environment variable\r\n\t //processBuilder.environment().put(\"message\", \"Example of process builder\");\r\n\r\n\t // Set the working directory. The batch file will run as if you are in this\r\n\t // directory.\r\n\t //processBuilder.directory(new File(\"C:\\\\Users\\\\prabhun\\\\Desktop\"));\r\n\r\n\t // Start the process and wait for it to finish. \r\n\t final Process process = processBuilder.start();\r\n\t final int exitStatus = process.waitFor();\r\n\t System.out.println(\"Processed finished with status: \" + exitStatus);\r\n}",
"@Test\n public void deleteProcessInstanceAlsoDeleteDocuments() throws Exception {\n final String userTaskName = \"step1\";\n final String url = \"http://intranet.bonitasoft.com/private/docStorage/anyValue\";\n final ProcessDefinition processDefinition = deployAndEnableProcessWithDocument(\"myProcess\", userTaskName, \"Doc\", url);\n processDefinitions.add(processDefinition); // To clean in the end\n final ProcessInstance processInstance = getProcessAPI().startProcess(processDefinition.getId());\n waitForUserTask(processInstance, userTaskName);\n\n // check the number of data and documents\n SearchResult<Document> documentsSearchResult = getProcessAPI().searchDocuments(new SearchOptionsBuilder(0, 10).done());\n assertEquals(1, documentsSearchResult.getCount());\n\n // delete process instance\n getProcessAPI().deleteProcessInstance(processInstance.getId());\n\n // check the number of data and documents\n documentsSearchResult = getProcessAPI().searchDocuments(new SearchOptionsBuilder(0, 10).done());\n assertEquals(0, documentsSearchResult.getCount());\n }",
"@Test\n public void testTransientProcessInstanceWithBigData() throws Exception\n {\n final ProcessInstance pi = sf.getWorkflowService().startProcess(PROCESS_DEF_ID_BIG_DATA_ACCESS, null, true);\n ProcessInstanceStateBarrier.instance().await(pi.getOID(), ProcessInstanceState.Completed);\n\n DatabaseOperationMonitoring.instance().assertExactly(SELECT_WFUSER_REALM.times(1),\n SELECT_WORKFLOWUSER.times(1),\n SELECT_USER_PARTICIPANT.times(1),\n SELECT_PREFERENCE.times(7));\n }",
"public void testGetExecutable_2()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\n\t\tString result = fixture.getExecutable();\n\n\t\t\n\t\tassertEquals(\"\", result);\n\t}",
"@Test\n public void testCommitLifecycle() throws Exception {\n describe(\"Full test of the expected lifecycle:\\n\" +\n \" start job, task, write, commit task, commit job.\\n\" +\n \"Verify:\\n\" +\n \"* no files are visible after task commit\\n\" +\n \"* the expected file is visible after job commit\\n\");\n JobData jobData = startJob(false);\n JobContext jContext = jobData.jContext;\n TaskAttemptContext tContext = jobData.tContext;\n ManifestCommitter committer = jobData.committer;\n assertCommitterFactoryIsManifestCommitter(tContext,\n tContext.getWorkingDirectory());\n validateTaskAttemptWorkingDirectory(committer, tContext);\n\n // write output\n describe(\"1. Writing output\");\n final Path textOutputPath = writeTextOutput(tContext);\n describe(\"Output written to %s\", textOutputPath);\n\n describe(\"2. Committing task\");\n Assertions.assertThat(committer.needsTaskCommit(tContext))\n .as(\"No files to commit were found by \" + committer)\n .isTrue();\n commitTask(committer, tContext);\n final TaskManifest taskManifest = requireNonNull(\n committer.getTaskAttemptCommittedManifest(), \"committerTaskManifest\");\n final String manifestJSON = taskManifest.toJson();\n LOG.info(\"Task manifest {}\", manifestJSON);\n int filesCreated = 1;\n Assertions.assertThat(taskManifest.getFilesToCommit())\n .describedAs(\"Files to commit in task manifest %s\", manifestJSON)\n .hasSize(filesCreated);\n Assertions.assertThat(taskManifest.getDestDirectories())\n .describedAs(\"Directories to create in task manifest %s\",\n manifestJSON)\n .isEmpty();\n\n // this is only task commit; there MUST be no part- files in the dest dir\n try {\n RemoteIterators.foreach(getFileSystem().listFiles(outputDir, false),\n (status) ->\n Assertions.assertThat(status.getPath().toString())\n .as(\"task committed file to dest :\" + status)\n .contains(\"part\"));\n } catch (FileNotFoundException ignored) {\n log().info(\"Outdir {} is not created by task commit phase \",\n outputDir);\n }\n\n describe(\"3. Committing job\");\n\n commitJob(committer, jContext);\n\n // validate output\n describe(\"4. Validating content\");\n String jobUniqueId = jobData.jobId();\n ManifestSuccessData successData = validateContent(outputDir,\n true,\n jobUniqueId);\n // look in the SUMMARY\n Assertions.assertThat(successData.getDiagnostics())\n .describedAs(\"Stage entry in SUCCESS\")\n .containsEntry(STAGE, OP_STAGE_JOB_COMMIT);\n IOStatisticsSnapshot jobStats = successData.getIOStatistics();\n // manifest\n verifyStatisticCounterValue(jobStats,\n OP_LOAD_MANIFEST, 1);\n FileStatus st = getFileSystem().getFileStatus(getPart0000(outputDir));\n verifyStatisticCounterValue(jobStats,\n COMMITTER_FILES_COMMITTED_COUNT, filesCreated);\n verifyStatisticCounterValue(jobStats,\n COMMITTER_BYTES_COMMITTED_COUNT, st.getLen());\n\n // now load and examine the job report.\n // this MUST contain all the stats of the summary, plus timings on\n // job commit itself\n\n ManifestSuccessData report = loadReport(jobUniqueId, true);\n Map<String, String> diag = report.getDiagnostics();\n Assertions.assertThat(diag)\n .describedAs(\"Stage entry in report\")\n .containsEntry(STAGE, OP_STAGE_JOB_COMMIT);\n IOStatisticsSnapshot reportStats = report.getIOStatistics();\n verifyStatisticCounterValue(reportStats,\n OP_LOAD_MANIFEST, 1);\n verifyStatisticCounterValue(reportStats,\n OP_STAGE_JOB_COMMIT, 1);\n verifyStatisticCounterValue(reportStats,\n COMMITTER_FILES_COMMITTED_COUNT, filesCreated);\n verifyStatisticCounterValue(reportStats,\n COMMITTER_BYTES_COMMITTED_COUNT, st.getLen());\n\n }",
"public VMProcess() {\n\t\tsuper();\n\t}",
"protected void TestProcess() {\n\t\tchangeCPUWDStatus(false);\n\t\twhile (testIsNotDoneStatus) {\n\t\t\tresetParams();\n\t\t\ttry {\n\t\t\t\tif (!startTrafficAndSample()) {\n\t\t\t\t\ttestIsNotDoneStatus = false;\n\t\t\t\t\tresetTestBol = false;\n\t\t\t\t\texceptionThrown = true;\n\t\t\t\t\tGeneralUtils.stopAllLevels();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\treport.report(\"Stopping Parallel Commands From Java Exception\" + e.getMessage());\t\t\t\t\n\t\t\t\ttestIsNotDoneStatus = false;\n\t\t\t\tresetTestBol = false;\n\t\t\t\texceptionThrown = true;\n\t\t\t\treason = \"network connection Error\";\n\t\t\t\treport.report(e.getMessage() + \" caused Test to stop\", Reporter.FAIL);\n\t\t\t\te.printStackTrace();\n\t\t\t\tGeneralUtils.stopAllLevels();\n\t\t\t}\n\t\t\tif (resetTestBol) {\n\t\t\t\tnumberOfResets++;\n\t\t\t\tif (syncCommands != null) {\n\t\t\t\t\treport.report(\"Stopping Parallel Commands\");\n\t\t\t\t\tsyncCommands.stopCommands();\n\t\t\t\t}\n\t\t\t\tmakeThreadObjectFinish();\n\t\t\t\tif (syncCommands != null) {\n\t\t\t\t\treport.report(\"Commands File Path: \" + syncCommands.getFile());\n\t\t\t\t}\n\t\t\t\ttestIsNotDoneStatus = true;\n\t\t\t\t// stop level\n\t\t\t\ttry {\n\t\t\t\t\tif (syncCommands != null) {\n\t\t\t\t\t\tsyncCommands.moveFileToReporterAndAddLink();\n\t\t\t\t\t}\n\t\t\t\t\treport.report(\"Stopping Traffic\");\n\t\t\t\t\ttrafficSTC.stopTraffic();\n\t\t\t\t\ttrafficSTC.addResultFilesToReport(String.valueOf(numberOfResets));\n\t\t\t\t\treport.report(\"Resetting test\", Reporter.WARNING);\n\t\t\t\t\treason = \"reset Test because of stream halt\";\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (numberOfResets >= 3) {\n\t\t\t// using this flag in order to NOT print results.\n\t\t\ttestIsNotDoneStatus = false;\n\t\t\tprintResultsForTest = false;\n\t\t\treport.report(\"Test Was Reseted Too many times because of more then \" + PRECENT_OF_UE_RESET + \"%\"\n\t\t\t\t\t+ \" Of the Streams are in Halt - check Setup\", Reporter.FAIL);\n\t\t\treason = \"Test Was Restarted Too many Times due to Traffic halt\";\n\t\t}\n\t\ttry {\n\t\t\tif (syncCommands != null) {\n\t\t\t\tsyncCommands.stopCommands();\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tmakeThreadObjectFinish();\n\t\ttry {\n\t\t\tif (syncCommands != null) {\n\t\t\t\tsyncCommands.moveFileToReporterAndAddLink();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\treport.report(\"Exception in ReporterHelper.copyFileToReporterAndAddLink could not attach Command File\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tchangeCPUWDStatus(true);\n\t}",
"@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }",
"@Override\n protected void processRun() {\n try {\n if (helpOnly) helpOnly();\n else {\n if (hasPipedInput()) pipeVersion();\n else stdinVersion();\n }\n } catch (IOException e) {\n return; // Killed process\n }\n }",
"public void markProcessPidCreate() throws JNCException {\n markLeafCreate(\"processPid\");\n }",
"public void testModifyFile() throws Exception {\n System.out.print(\".. Testing file modification ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Current] (\" + userName + \")\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(workingDirectory + File.separator + \"Work\" + File.separator + \"A_File.java\"));\n writer.write(\"/** This is testing A_File.java file.\\n */\\n public class Testing_File {\\n int i;\\n }\\n\");\n writer.flush();\n writer.close();\n new OpenAction().perform(A_FileNode);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(A_FileNode);\n Thread.sleep(5000);\n A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n System.out.println(\". done !\");\n }",
"public static void main(String[] args) {\n\t\t\n\t\tRegistry aRegistry;\n\t\t\n\t\ttry {\n\t\t\tString RMIPortNum=args[0];\n\t\t\tint processID = Integer.parseInt(args[1]);\n\t\t\tint processCount = Integer.parseInt(args[2]);\n\t\t\tProcess exportedProcess = new Process(processID,processCount,RMIPortNum);\n\t\t\taRegistry = LocateRegistry.createRegistry(Integer.parseInt(RMIPortNum));\n\t\t\t\taRegistry.rebind(\"server\", exportedProcess);\n\t\t\tSystem.out.println(\"Process is Up and Running...\");\n\t\t\t//exportedProcess.moneyReceiveExecuter();\n\n\t\t\texportedProcess.snapShotTerminator();\n\t\t\tSystem.out.println(\"Press Enter when all Process are running\");\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tsc.nextLine();\n\t\t\t//exportedProcess.markerExecuter();\t\t\t\n\t\t\tif(processID==1)\n\t\t\t\texportedProcess.snapShotexecuter();\n\t\t\tif(processID!=1)\n\t\t\t\texportedProcess.snapShotExecuterpassive();\n\n\t\t\t//exportedProcess.snapShotTerminator();\n\t\t\texportedProcess.transactionExecuter();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"@Test\n public void createNewComputerBuildSuccess() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n LoginRequest loginRequest = new LoginRequest(ANOTHER_USER_NAME_TO_CREATE_NEW_USER, USER_PASSWORD);\n\n loginAndCreateBuild(computerBuild, loginRequest, SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_BUDGET_COMPUTER_BUILD_DESCRIPTION);\n }",
"public Process() {\n PC.MakeProcess();\n\n }",
"@Override\n\tpublic int updateProcess(Project project) {\n\t\treturn pm.updateProcess(project);\n\t}",
"SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);",
"@Test\n public void testDestroy_testGetSteps() {\n mgr.getSteps().add(stepa);\n mgr.getSteps().add(stepb);\n\n mgr.destroy();\n\n verify(stepa).cancel();\n verify(stepb).cancel();\n\n // if superclass destroy() was invoked, then freeLock() should have been submitted\n // to the executor\n verify(executor).execute(any());\n }",
"@Override\n protected void runTest() throws Throwable {\n TestHelper.annotationMockSupportSetup(getClass(), getName(), mockSupport);\n\n // The deployment of processes denoted by @Deployment should\n // be done after the setup(). After all, the mockups must be\n // configured in the engine before the actual deployment happens\n deploymentId = TestHelper.annotationDeploymentSetUp(processEngine, getClass(), getName());\n\n super.runTest();\n\n // Remove deployment\n TestHelper.annotationDeploymentTearDown(processEngine, deploymentId, getClass(), getName());\n\n // Reset mocks\n TestHelper.annotationMockSupportTeardown(mockSupport);\n }",
"@Test\r\n\t@Deployment(resources={\"MyProcess03.bpmn\" })\r\n\tpublic void starter() {\r\n\t\tactivitiSpringRule.getIdentityService().setAuthenticatedUserId(\"claudio\");\r\n\t\t\r\n\t\tRuntimeService runtimeService = activitiSpringRule.getRuntimeService();\t\t\r\n\t\tProcessInstance processInstance = runtimeService.startProcessInstanceByKey(\"MyProcess03\");\r\n\t\t\r\n\t\tassertEquals(\"claudio\",runtimeService.getVariable(processInstance.getId(), \"myStarter\"));\r\n\t}",
"@Test\n public void testSingleEvent() throws Exception {\n String processId = \"test\";\n deploy(new ProcessDefinition(processId, Arrays.<AbstractElement>asList(\n new StartEvent(\"start\"),\n new SequenceFlow(\"f1\", \"start\", \"gw1\"),\n new InclusiveGateway(\"gw1\"),\n new SequenceFlow(\"f2\", \"gw1\", \"ev\"),\n new IntermediateCatchEvent(\"ev\", \"ev\"),\n new SequenceFlow(\"f3\", \"ev\", \"gw2\"),\n new InclusiveGateway(\"gw2\"),\n new SequenceFlow(\"f4\", \"gw2\", \"end\"),\n new EndEvent(\"end\")\n )));\n\n // ---\n\n String key = UUID.randomUUID().toString();\n getEngine().start(key, processId, null);\n\n // ---\n\n getEngine().resume(key, \"ev\", null);\n\n // ---\n\n assertActivations(key, processId,\n \"start\",\n \"f1\",\n \"gw1\",\n \"f2\",\n \"ev\",\n \"f3\",\n \"gw2\",\n \"f4\",\n \"end\");\n assertNoMoreActivations();\n }",
"@Test\n public void testBasic() throws InterruptedException {\n createGroup(2);\n\n ReplicatedEnvironment menv = repEnvInfo[0].getEnv();\n assertEquals(menv.getState(), State.MASTER);\n repEnvInfo[1].closeEnv();\n\n final int nRecords = 1000;\n populateDB(menv, nRecords);\n\n ReplicatedEnvironmentStats stats =\n menv.getRepStats(StatsConfig.CLEAR);\n assertEquals(0, stats.getNProtocolMessagesBatched());\n\n /* Open replica and catch up. */\n repEnvInfo[1].openEnv();\n\n /* Wait for catchup. */\n VLSN vlsn = RepTestUtils.syncGroup(repEnvInfo);\n /*\n * All the messages must have been sent in batches as part of the sync\n * operation.\n */\n stats = menv.getRepStats(null);\n\n assertTrue(stats.getNProtocolMessagesBatched() >= nRecords);\n\n /* Verify contents. */\n RepTestUtils.checkNodeEquality(vlsn, false, repEnvInfo);\n }"
] |
[
"0.65745646",
"0.64540803",
"0.6396411",
"0.6341715",
"0.6332315",
"0.6177422",
"0.6105554",
"0.61019504",
"0.60780185",
"0.60754704",
"0.6054187",
"0.59786844",
"0.59776235",
"0.59736204",
"0.58951193",
"0.588462",
"0.58508736",
"0.5842756",
"0.58371085",
"0.58295774",
"0.58227515",
"0.5808694",
"0.580675",
"0.57764983",
"0.57591146",
"0.5694287",
"0.5658407",
"0.5656364",
"0.5613131",
"0.5609879",
"0.5601556",
"0.558763",
"0.55848867",
"0.5574369",
"0.557062",
"0.5537522",
"0.55344164",
"0.5532392",
"0.55217826",
"0.5512639",
"0.5507507",
"0.5504976",
"0.5480388",
"0.54677737",
"0.54639435",
"0.54563093",
"0.5445917",
"0.5429325",
"0.541698",
"0.539058",
"0.53794795",
"0.537179",
"0.5371038",
"0.53690463",
"0.53622985",
"0.53433657",
"0.5338017",
"0.5327551",
"0.53114057",
"0.5300887",
"0.52983594",
"0.5289194",
"0.5281503",
"0.52739567",
"0.5271032",
"0.52706796",
"0.5247722",
"0.5241568",
"0.52403355",
"0.522351",
"0.5222515",
"0.5216649",
"0.5210683",
"0.5208573",
"0.5207048",
"0.5199743",
"0.5197245",
"0.51875055",
"0.51859325",
"0.51715887",
"0.5169448",
"0.51666594",
"0.51663697",
"0.51620317",
"0.514769",
"0.5145831",
"0.5145185",
"0.5133129",
"0.5133019",
"0.51327616",
"0.5126893",
"0.5118785",
"0.5117621",
"0.5115676",
"0.5113555",
"0.5113319",
"0.5108691",
"0.5099915",
"0.509763",
"0.50938624",
"0.509171"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public String parse(AssignmentInfo assignmentInfo) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public String parse(ValidationInfo validationInfo) {
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
Created with IntelliJ IDEA. User: marc Date: 21/01/13 Time: 14:02 To change this template use File | Settings | File Templates.
|
public interface ConnexionBDDInterface {
public String sendRequestFromNfcToBdd (String req) throws SQLException, ClassNotFoundException;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private stendhal() {\n\t}",
"private Solution() {\n /**.\n * { constructor }\n */\n }",
"public void mo38117a() {\n }",
"public static void generateCode()\n {\n \n }",
"public void mo21785J() {\n }",
"public void mo21792Q() {\n }",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void perish() {\n \n }",
"private static void oneUserExample()\t{\n\t}",
"public static void thisDemo() {\n\t}",
"public void mo21795T() {\n }",
"@Override\n public String getDescription() {\n return DESCRIPTION;\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void mo97908d() {\n }",
"public void mo21779D() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public void m23075a() {\n }",
"public void mo12930a() {\n }",
"public static void listing5_14() {\n }",
"public void mo21825b() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"@Override\n\tpublic void name() {\n\t\t\n\t}",
"@Override\n protected String getDescription() {\n return DESCRIPTION;\n }",
"public void mo23813b() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"public void mo21877s() {\n }",
"public void mo21878t() {\n }",
"private test5() {\r\n\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"public void mo21781F() {\n }",
"public final void mo91715d() {\n }",
"public void mo56167c() {\n }",
"public void mo1531a() {\n }",
"public void mo115188a() {\n }",
"private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void mo21782G() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public static void main() {\n \n }",
"private JacobUtils() {}",
"public static void main(String[] args) {\n throw new NotImplementedException();\n }",
"@Override\n protected void startUp() {\n }",
"private void m50366E() {\n }",
"@Override\n public void init() {\n\n }",
"public void mo2740a() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"public void mo5248a() {\n }",
"public void mo5382o() {\n }",
"private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}",
"private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public void mo21793R() {\n }",
"public void mo3376r() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo21791P() {\n }",
"public void mo44053a() {\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"public void mo115190b() {\n }",
"void pramitiTechTutorials() {\n\t\n}",
"public void mo6081a() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private SourcecodePackage() {}",
"private TMCourse() {\n\t}",
"public void mo6944a() {\n }",
"private void test() {\n\n\t}",
"public void mo2471e() {\n }",
"public void mo3749d() {\n }",
"default void projectOpenFailed() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void mo21787L() {\n }",
"@Override\n public void initialize() { \n }",
"@Override\n public String getDescription() {\n return description;\n }",
"public static void created() {\n\t\t// TODO\n\t}",
"public void mo9848a() {\n }",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n void init() {\n }",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}"
] |
[
"0.61270547",
"0.59473825",
"0.5888909",
"0.58581364",
"0.58432025",
"0.5793127",
"0.57671475",
"0.57567734",
"0.57563674",
"0.57406706",
"0.572643",
"0.57118845",
"0.57006377",
"0.56929165",
"0.56819147",
"0.56803125",
"0.5661535",
"0.5641486",
"0.56409067",
"0.56375414",
"0.5637266",
"0.56348777",
"0.56308603",
"0.56308603",
"0.5629138",
"0.56266284",
"0.56266284",
"0.56224495",
"0.56151164",
"0.5613626",
"0.5612042",
"0.56062424",
"0.5599583",
"0.55973077",
"0.55952257",
"0.55948234",
"0.55948234",
"0.55948234",
"0.55948234",
"0.55948234",
"0.55948234",
"0.5589024",
"0.5587605",
"0.5586213",
"0.5581526",
"0.55768436",
"0.5573412",
"0.55715936",
"0.55669737",
"0.55668724",
"0.5564441",
"0.5549826",
"0.55469847",
"0.5543251",
"0.5540038",
"0.5537907",
"0.5535611",
"0.55353487",
"0.5534972",
"0.55261964",
"0.552598",
"0.552323",
"0.5522884",
"0.55182207",
"0.5516009",
"0.5515515",
"0.5515515",
"0.550765",
"0.55036885",
"0.55031735",
"0.55009866",
"0.5499124",
"0.5499124",
"0.5496197",
"0.5488978",
"0.54856855",
"0.5485639",
"0.5485639",
"0.5485418",
"0.5484657",
"0.54832435",
"0.548109",
"0.5480244",
"0.547951",
"0.54794824",
"0.547679",
"0.5476028",
"0.5474607",
"0.5473881",
"0.5472839",
"0.5463854",
"0.5459943",
"0.5458772",
"0.54568523",
"0.5454537",
"0.54460675",
"0.5438958",
"0.54389507",
"0.5437613",
"0.54369676",
"0.54313934"
] |
0.0
|
-1
|
public static LinkedHashMap hashMap;
|
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.full_image);
dbHandler_card = new DBHandler_Card(this,null,null,1);
// hashMap = new LinkedHashMap<>();
Intent i = getIntent();
position = i.getExtras().getInt("id");
final String[] name = i.getStringArrayExtra("name");
rup = i.getIntArrayExtra("rupee");
count = i.getExtras().getInt("count");
add_to_cart_button = (Button) findViewById(R.id.cart_button);
//textView = (TextView) findViewById(R.id.text);
// textView.setText(name[position]);
ImageAdapter imageAdapter = new ImageAdapter(this);
ImageView imageView = (ImageView) findViewById(R.id.full_image_view);
imageView.setImageResource(imageAdapter.mThumbIds[position]);
textView = (TextView) findViewById(R.id.amount_text);
textView.setText("Rs. "+ rup[position]);
final Spinner spinner = (Spinner) findViewById(R.id.spinner);
final ArrayAdapter<CharSequence> arrayAdapter = ArrayAdapter.createFromResource(this,R.array.number,android.R.layout.simple_spinner_item);
arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(arrayAdapter);
spinner.setOnItemSelectedListener(this);
add_to_cart_button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// hashMap.put(name[position],textView.getText().toString());
food=name[position];
amount=textView.getText().toString();
quan= Integer.parseInt(spinner.getSelectedItem().toString());
Card_Data card_data = new Card_Data(food,amount,quan);
dbHandler_card.add_data(card_data);
Intent i =new Intent(getBaseContext(),Main_frame.class);
i.putExtra("count",count);
startActivity(i);
}
});
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public LinkedHashMap<String, SharedDataInfo> sharedData(){\n return new LinkedHashMap<String, SharedDataInfo>();\n }",
"public MyHashMap() {\n hashMap = new ArrayList<>();\n }",
"public MyHashMap() {\n map = new HashMap();\n }",
"public Q706DesignHashMap() {\n keys = new ArrayList<>();\n values = new ArrayList<>();\n\n }",
"public MyHashMap() {\n\n }",
"public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }",
"void setHashMap();",
"public MyHashMap() {\n\n }",
"@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }",
"public MyHashMap() {\r\n data = new Node[DEFAULT_CAPACITY];\r\n }",
"public OmaHashMap() {\n this.values = new OmaLista[32];\n this.numberOfValues = 0;\n }",
"public static <K, V> MapBuilder<LinkedHashMap<K, V>, K, V> linkedHashMap()\n {\n return new MapBuilder<LinkedHashMap<K, V>, K, V>(new LinkedHashMap<K, V>());\n }",
"public static void main(String[] args) {\n Map<String, Set<Integer>> ms = new HashMap<>(); \n Set<Integer> s1 = new HashSet<>(Arrays.asList(1,2,3));\n Set<Integer> s2 = new HashSet<>(Arrays.asList(4,5,6));\n Set<Integer> s3 = new HashSet<>(Arrays.asList(7,8,9));\n ms.put(\"one\", s1);\n ms.put(\"two\", s2);\n ms.put(\"three\", s3);\n System.out.println(ms); \n // ch07.collections.Ch0706InterfacesVsConcrete$1\n // {one=[1, 2, 3], two=[4, 5, 6], three=[7, 8, 9]}\n\n // this is how LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>>\n // can be initially initialized\n LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>> toc =\n new LinkedHashMap<>();\n System.out.println(toc); // just using toc to get rid of eclipse warning about not using it\n \n \n\n\n\n }",
"public MyHashMap() {\r\n\t\tloadFactor = DEFAULT_LOAD_FACTOR;\r\n\t\tcapacity = DEFAULT_CAPACITY;\r\n\t\thashMapArray = new LinkedList[capacity];\r\n\t}",
"@Test\n\tpublic void testLinkedHashMap() {\n\t\tLinkedHashMap lhm = new LinkedHashMap();\n\t\tlhm.put(\"evyaan\", 700);\n\t\tlhm.put(\"varun\", 100);\n\t\tlhm.put(\"dolly\", 300);\n\t\tlhm.put(\"vaishu\", 400);\n\t\tlhm.put(\"vaishu\", 300);\n\t\tlhm.put(null, 500);\n\t\tlhm.put(null, 600);\n\n\t\tassertEquals(\"{evyaan=700, varun=100, dolly=300, vaishu=300, null=600}\", lhm.toString());\n\t}",
"public HashGraph()\n {\n graph = new HashMap <>();\n }",
"public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }",
"private void linkedHashMap() {\n LinkedHashMap lhm = new LinkedHashMap();\n User e = new User(1, \"user\");\n\n lhm.put(e, \"Harshal\");\n lhm.put(new User(1, \"Employee\"), \"Harshal\");\n lhm.put(new User(1, \"user\"), \"Harshal\");\n lhm.put(e, \"Sumit\");\n\n System.out.println(lhm);\n lhm.putIfAbsent(new User(2,\"Harshal\"),\"Added new val\");\n lhm.putIfAbsent(new User(2,\"Harshal\"),\"Added new val\");\n\n lhm.keySet().removeIf(key->((User)key).equals(new User(2,\"Harshal\")));\n System.out.println(lhm);\n }",
"public HashMap() {\n this.capacity = 100;\n this.hashMap = new LinkedList[capacity];\n }",
"public static void main(String[] args) {\n\t\tMap hashmap = new HashMap();\r\n\t\tMap treemap = new TreeMap();\r\n\t\t// JDK 1.4+ only\r\n\t\tMap linkedMap = new LinkedHashMap();\r\n\t\tSet s;\r\n\t\tIterator i;\r\n\t\t\r\n\t\t/// HASHMAP\r\n\t\thashmap.put(\"Three\", \"Three\");\r\n\t\thashmap.put(\"Three\", \"Three\"); // This entry overwrites the previous\r\n\t\thashmap.put(\"One\", \"One\");\r\n\t\thashmap.put(\"Two\", \"Two\");\r\n\t\thashmap.put(\"Six\", \"Six\");\r\n\t\thashmap.put(\"Seven\", \"Seven\");\r\n\t\t// Order is NOT guaranteed to be consistent; no duplicate keys\r\n\t\tSystem.out.println(\"Unordered Contents of HashMap:\");\r\n\t\t\r\n\t\t/*\r\n\t\t * To iterate over items in a Map, you must first retrieve a Set of all \r\n\t\t * of its keys. Then, iterate over the keys and use each key to retrieve \r\n\t\t * the value object from the Map.\r\n\t\t */\r\n\t\ts = hashmap.keySet();\r\n\t\t// A Map does not have an iterator, but a Set DOES ... why?\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\t// Example of how to retreive and view the key\r\n\t\t\tObject key = i.next();\r\n\t\t\tSystem.out.println( key );\r\n//\t\t\tSystem.out.println( \"Key: \" + key );\r\n\t\t\t// Now retrieve and view the Map value using that key\r\n//\t\t\tString value = (String)hashmap.get(key);\r\n//\t\t\tSystem.out.println( \"Value: \" + value );\r\n\t\t}\r\n\t\t\r\n\t\t/// LINKEDHASHMAP\r\n\t\tlinkedMap.put(\"Three\", \"Three\");\r\n\t\tlinkedMap.put(\"Three\", \"Three\"); // This entry overwrites the previous\r\n\t\tlinkedMap.put(\"One\", \"One\");\r\n\t\tlinkedMap.put(\"Two\", \"Two\");\r\n\t\tlinkedMap.put(\"Six\", \"Six\");\r\n\t\tlinkedMap.put(\"Seven\", \"Seven\");\r\n\t\t// Order IS guaranteed to be consistent (LRU - Entry order)\r\n\t\tSystem.out.println(\"\\nOrdered (Entry Order) Contents of LinkedHashMap:\");\r\n\t\ts = linkedMap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\r\n\t\t/// TREEMAP\r\n\t\ttreemap.put(\"Three\", \"Three\");\r\n\t\ttreemap.put(\"Three\", \"Three\");\r\n\t\ttreemap.put(\"Two\", \"Two\");\r\n\t\ttreemap.put(\"Seven\", \"Seven\");\r\n\t\ttreemap.put(\"One\", \"One\");\r\n\t\ttreemap.put(\"Six\", \"Six\");\r\n\t\t// Keys guaranteed to be in sorted order, no duplicate keys\r\n\t\tSystem.out.println(\"\\nOrdered (Sorted) Contents of TreeMap:\");\r\n\t\ts = treemap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t\t\r\n\t\t// Integer Object values\r\n\t\thashmap = new HashMap();\r\n\t\thashmap.put( \"Three\", new Integer(3) );\r\n\t\thashmap.put( \"Three\", new Integer(3) );\r\n\t\thashmap.put( \"One\", new Integer(1) );\r\n\t\thashmap.put( \"Two\", new Integer(2) );\r\n\t\thashmap.put( \"Six\", new Integer(6) );\r\n\t\thashmap.put( \"Seven\", new Integer(7) );\r\n\t\t\r\n\t\tSystem.out.println(\"\\nContents of HashMap:\");\r\n\t\ts = hashmap.keySet();\r\n\t\ti = s.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t\t\r\n\t\t// Keys guaranteed to be in sorted order, no duplicate keys\r\n\t\ttreemap = new TreeMap();\r\n\t\ttreemap.put( \"Three\", new Integer(3) );\r\n\t\ttreemap.put( \"Three\", new Integer(3) );\r\n\t\ttreemap.put( \"Two\", new Integer(2) );\r\n\t\ttreemap.put( \"Seven\", new Integer(7) );\r\n\t\ttreemap.put( \"One\", new Integer(1) );\r\n\t\ttreemap.put( \"Six\", new Integer(6) );\r\n\t\t\r\n\t\tSystem.out.println(\"\\nContents of TreeMap:\");\r\n\t\ts = treemap.keySet();\r\n\t\ti = s.iterator();\r\n\t\t\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tSystem.out.println( i.next() );\r\n\t\t}\r\n\t}",
"private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }",
"public HashMap(){\n\t\tthis.numOfBins=10;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}",
"public MyHashMap() {\n array = new TreeNode[1024];\n\n }",
"public int hashCode()\n {\n return hash;\n }",
"public HashMapStack()\n {\n this.hashMap = new HashMap<>();\n }",
"public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }",
"public MyHashMap() {\n this.key_space = 2069;\n this.hash_table = new ArrayList<Bucket>();\n for (int i = 0; i < this.key_space; ++i) {\n this.hash_table.add(new Bucket());\n }\n }",
"public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}",
"public ArrayHashMap() {\n super();\n }",
"@Override\n public int hashCode()\n {\n return hashCode;\n }",
"public _No_706_DesignHashMap() {\n// Arrays.fill(arr, -1);\n }",
"public MyHashMap() {\n map = new ArrayList<>();\n for (int i = 0;i<255;i++)\n map.add(new Entry());\n }",
"public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}",
"public static <K, V> HashMap<K, V> initHashMap() {\n\t\treturn new HashMap<K, V>();\n\t}",
"public int sizeOfMap(){return size;}",
"interface HashMap<K, V> {\n public boolean containsKey(K key);\n public V get(K key);\n public V put(K key, V value);\n public V remove(K key);\n public int size();\n}",
"public ObservableHashMap()\n {\n super();\n }",
"public RBTMap() {\n RBT = new TreeMap<K,V>();\n \n }",
"public Dictionary () {\n list = new DoubleLinkedList<>();\n this.count = 0;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashMap()\r\n\t{\r\n\t\ttable = new MapEntry[7];\r\n\t\tcount = 0;\r\n\t\tmaxCount = table.length - table.length/3;\r\n\t\tDUMMY = new MapEntry<>(null, null);\r\n\t}",
"public IntObjectHashMap() {\n resetToDefault();\n }",
"@Override\n public int hashCode() {\n return 1;\n }",
"@Override \n int hashCode();",
"public interface Map<K, V>\n{\n // Adds the specified key-value pair to the map. Does nothing if the key already\n // exists in the map.\n void add(K key, V value);\n\n // Returns the value associated with the specified key, or null of that key doesn't\n // exist in the map\n V get(K key);\n\t\n // Removes the key-value pair with the specified key from the map. Does nothing if\n // the key doesn't exist in the map.\n void remove(K key);\n}",
"public static void main(String[] args) {\n\n\t LinkedHashMap<Integer, String> hm = new LinkedHashMap<Integer, String>(); \n\t \n // Inserting the Elements \n hm.put(3, \"Geeks\"); \n hm.put(2, \"For\"); \n hm.put(1, \"Geeks\"); \n \n for (Map.Entry<Integer, String> mapElement : hm.entrySet()) { \n \n Integer key = mapElement.getKey(); \n \n // Finding the value \n String value = mapElement.getValue(); \n \n // print the key : value pair \n System.out.println(key + \" : \" + value); \n\t}\n\n}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashTableMap() {\r\n\t\tK = new LinkedList[10];\r\n\t\tV = new LinkedList[10];\r\n\t}",
"void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);",
"IcedHM() { _m = new NonBlockingHashMap<>(); }",
"public Dictionary createDictionary(){\n Dictionary dict = new Dictionary(9973);\n return dict;\n }",
"@Override\n public int hashCode() {\n return hashCode;\n }",
"public DesignHashSet() {\n map=new HashMap<>();\n }",
"private THashIterator() {\n\t\t\t_expectedSize = TOrderedHashMap.this.size();\n\t\t\t_index = -1;\n\t\t}",
"public int hashCode()\n {\n return getMap().hashCode();\n }",
"@Override\n public int hashCode() {\n return hashcode;\n }",
"@Test\n\tpublic void testHashMap() {\n\n\t\t/*\n\t\t * Creates an empty HashMap object with default initial capacity 16 and default\n\t\t * fill ratio \"0.75\".\n\t\t */\n\t\tHashMap hm = new HashMap();\n\t\thm.put(\"evyaan\", 700);\n\t\thm.put(\"varun\", 100);\n\t\thm.put(\"dolly\", 300);\n\t\thm.put(\"vaishu\", 400);\n\t\thm.put(\"vaishu\", 300);\n\t\thm.put(null, 500);\n\t\thm.put(null, 600);\n\t\t// System.out.println(hm);\n\n\t\tCollection values = hm.values();\n//\t\tSystem.out.println(values);\n\n\t\tSet entrySet = hm.entrySet();\n\t\t// System.out.println(entrySet);\n\n\t\tIterator iterator = entrySet.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iterator.next();\n\t\t\t// System.out.println(entry.getKey()+\":\"+entry.getValue());\n\t\t}\n\n\t}",
"@Override\n public Map<String, Class> getDictionary() {\n synchronized (mapper) {\n LinkedHashMap<String, Class> dictionary = new LinkedHashMap<>();\n mapper.fillDictionary(null, dictionary);\n return dictionary;\n }\n }",
"public MyHashMap() {\n\t\tthis(INIT_CAPACITY);\n\t}",
"public static <K, V> MapBuilder<HashMap<K, V>, K, V> hashMap()\n {\n return new MapBuilder<HashMap<K, V>, K, V>(new HashMap<K, V>());\n }",
"protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}",
"@Override\n public int hashCode(\n ) {\n \tint h = hash;\n \tif (h == 0 && size > 0) {\n \t\th = 31 * parent.hashCode() + base.hashCode();\n \t\tif(! isPlaceHolder()) {\n \t\t\thash = h;\n \t\t}\n \t}\t\n return h;\n }",
"public MagicDictionary() {\n this.map = new HashMap<>();\n }",
"public HashMap<String, String> getHashMap() {\n\t\treturn this.hashMap;\n\t}",
"private IMapData<Integer, String> getLinkedHashMapData1() {\n List<IKeyValueNode<Integer, String>> creationData = new ArrayList<>();\n List<IKeyValueNode<Integer, String>> data = new ArrayList<>();\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }",
"@Override\n public int hashCode();",
"@Override\n public HashMap<String, String> get_hashMap() {\n HashMap<String, String> temp = super.get_hashMap();\n\n temp.put(TAG.TYPE, String.valueOf(this.type));\n temp.put(TAG.SIZE, String.valueOf(this.size));\n temp.put(TAG.TAG, this.tag);\n temp.put(TAG.SPEED_BURROW, String.valueOf(this.burrow_speed));\n temp.put(TAG.SPEED_CLIMBING, String.valueOf(this.climbing_speed));\n temp.put(TAG.SPEED_FLYING, String.valueOf(this.flying_speed));\n temp.put(TAG.SPEED_SWIMMING, String.valueOf(this.swimming_speed));\n\n temp.put(TAG.CHALLENGE_RATING, String.valueOf(this.challenge_rating));\n temp.put(TAG.SENSES_VECTOR, String.valueOf(this.senses));\n temp.put(TAG.EXPERIENCE_POINTS, String.valueOf(this.experience_points));\n\n return temp;\n }",
"public int hashCode() {\n return hash.hashCode();\n }",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"Map<String, String> mo14888a();",
"public IDictionary getDictionary(){\n \treturn dict;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic HashMap() {\r\n\t\tdata = (Node<MapEntry<K, V>>[])new Node[INITIAL_SIZE];\r\n\t\tfor(int i = 0; i < data.length; i++)\t\t\t\t\t\t\t//For every element in data...\r\n\t\t\tdata[i] = new Node<MapEntry<K,V>>(new MapEntry<K,V>(null));\t//Add a head node to it.\r\n\t\t\r\n\t\t//TODO: May have to just default as null and in the put method, if the slot is null, then put a head node in it. The post-ceding code after that is logically correct!\r\n\t\r\n\t\tsize = 0;\t//Redundant but helpful to see that the size is 0\r\n\t}",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"public Graph()\n\t{\n\t\tthis.map = new HashMap<Object, SinglyLinkedList>();\n\t}",
"public int hashCode() {\n return 37 * 17;\n }",
"public MyHashMap() {\n store = new int[1000001]; // Max number of key-value pairs allowed in the HashMap, cant exceed it.\n Arrays.fill(store, -1); // we have to anyways return -1 if key doesn't exists.\n }",
"public DesignHashmap() {\n\t\ttable = new boolean[buckets][];\n\t}",
"private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}",
"@Override\n public int hashCode() {\n return 0;\n }",
"@Override\n public int hashCode(){\n return 42;\n }",
"public void rehash() {\n\t\tArrayList<Node<MapPair<K, V>>> temp=buckets;\n\t\tbuckets=new ArrayList<>();\n\t\tfor(int i=0;i<2*temp.size();i++)\n\t\t{\n\t\t\tbuckets.add(null);\n\t\t}\n\t\tfor(Node<MapPair<K, V>> node:temp)\n\t\t{\n\t\t\tif(node!=null)\n\t\t\t{\n\t\t\t\twhile(node!=null)\n\t\t\t\t{\n\t\t\t\t\tput(node.data.key,node.data.value);\n\t\t\t\t\tnode=node.next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void EstaticCache(){\n LinkedHashMap<String, String> ParticionAux = new LinkedHashMap <String,String>();\n Cache.add(ParticionAux);\n for (int i = 0; i < Estatico.length; i++) {\n \n Cache.get(0).put(Estatico[i], ResEstatico[i]);\n // System.out.println(\"===== Particion de Cache N°\"+ParticionAux.values()+\" =====\");\n \n }\n //this.Cache.add(ParticionAux); // carga el hashMap en una particion del cache\n //System.out.println(\"===== Particion de Cache AQUIAQUI\"+Cache.get(0).values()+\" =====\");\n // ParticionAux.clear(); // limpia el Hashmap aux\n }",
"@Override\n public final int hashCode() {\n return super.hashCode();\n }",
"@Override\n int hashCode();",
"public MyHashMap() {\n keys = new MapNode[n];\n vals = new MapNode[n];\n for (int i=0; i < n ; ++i) {\n keys[i] = new MapNode();\n vals[i] = new MapNode();\n }\n }",
"@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }",
"LinkedHashMap<Long, City> getAllCitiesMap();",
"public HashTableMap() {\r\n this.capacity = 10; // with default capacity = 10\r\n this.size = 0;\r\n this.array = new LinkedList[capacity];\r\n\r\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"public abstract Map<K, V> a();",
"@Override\n public int hashCode() {\n return Objects.hash(JMBAG);\n }",
"public AbstractHashSet() {\n\t\tmap = new DelegateAbstractHashMap(this);\n\t}",
"MAP createMAP();",
"public boolean isHashMap();",
"public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }",
"public static Dictionary getDictionary() {\n return Dictionary.dictionary;\n }",
"@Override\n\t\tpublic int hashCode() {\n\t\t\treturn countMap.hashCode();\n\t\t}",
"protected SortedMap getSortedMap() {\n/* 65 */ return (SortedMap)this.map;\n/* */ }",
"public IntToIntMap getStaticMap() {\n return staticMap;\n }",
"public static void main(String[] args) {\n LinkedHashMap<Integer, Pracownik> mapa = new LinkedHashMap<>();\n Pracownik[] pracownicy = {\n new Pracownik(\"Agnieszka\"),\n new Pracownik(\"Aga\"),\n new Pracownik(\"Damian\"),\n new Pracownik(\"Michał\"),\n new Pracownik(\"Agnieszka\"),\n new Pracownik(\"Aga\"),\n new Pracownik(\"Damian\"),\n new Pracownik(\"Michał\"),\n new Pracownik(\"Agnieszka\"),\n new Pracownik(\"Aga\"),\n new Pracownik(\"Damian\"),\n new Pracownik(\"Michał\"),\n new Pracownik(\"Agnieszka\"),\n new Pracownik(\"Aga\"),\n new Pracownik(\"Damian\"),\n new Pracownik(\"Michał\"),\n new Pracownik(\"Agnieszka\"),\n new Pracownik(\"Aga\"),\n new Pracownik(\"Damian\"),\n new Pracownik(\"Michał\")\n };\n\n for(Pracownik pracownik: pracownicy){\n mapa.put(pracownik.getID(),pracownik);\n }\n System.out.println(mapa);\n\n mapa.remove(3);\n\n\n mapa.put(4,new Pracownik(\"Asia\"));\n mapa.put(3,new Pracownik(\"Patryk\"));\n\n\n\n mapa.entrySet();\n System.out.println(mapa);\n for(Map.Entry<Integer,Pracownik> wpis: mapa.entrySet() ){\n // System.out.println(\"ID \" + wpis.getKey()+ \" Imie: \" + wpis.getValue().getImie());\n\n\n\n\n System.out.println(\"ID Pracownika \"+ wpis.getKey());\n System.out.println(\"Imie \" + wpis.getValue().getImie());\n\n\n }\n System.out.println(\"---------------------------------------------------------------\");\n TreeMap<Integer,Pracownik> mapaPosotrowana = new TreeMap<Integer, Pracownik>(mapa);\n\n Map<Integer,Pracownik> subMapa = mapaPosotrowana.subMap(0,4);\n\n for(Map.Entry<Integer,Pracownik> wpis: subMapa.entrySet() ){\n // System.out.println(\"ID \" + wpis.getKey()+ \" Imie: \" + wpis.getValue().getImie());\n\n\n\n if(subMapa.isEmpty()){\n System.out.println(\"PUSTO\");\n }else{\n System.out.println(\"ID Pracownika \"+ wpis.getKey());\n System.out.println(\"Imie \" + wpis.getValue().getImie());\n }\n\n }\n\n Map<Date, Event> exampleMap;\n\n\n\n\n\n\n\n\n\n }",
"@Test\n public void hashCodeTest()\n {\n MapAdapter test1 = new MapAdapter();\n test1.put(1, \"test1\");\n\n MapAdapter test2 = new MapAdapter();\n test2.put(2, \"test2\");\n\n map.put(1, \"test1\");\n\n assertEquals(test1.hashCode(), map.hashCode());\n assertNotEquals(test2.hashCode(), map.hashCode());\n\n test1.put(1, 1);\n assertNotEquals(test1.hashCode(), map.hashCode());\n }",
"@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }",
"private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }"
] |
[
"0.69272906",
"0.6812829",
"0.662849",
"0.6531422",
"0.6491592",
"0.6474113",
"0.6434884",
"0.64177316",
"0.63937134",
"0.63754046",
"0.6335049",
"0.6276292",
"0.627207",
"0.62376",
"0.62362856",
"0.623023",
"0.6209403",
"0.6205691",
"0.618948",
"0.61704516",
"0.6166528",
"0.61420906",
"0.6096198",
"0.60829216",
"0.60618746",
"0.6019377",
"0.60163903",
"0.6014324",
"0.5988632",
"0.5976451",
"0.5972236",
"0.5971176",
"0.5969293",
"0.595561",
"0.59445333",
"0.5935064",
"0.5927077",
"0.59215266",
"0.5919604",
"0.5916443",
"0.5909506",
"0.5894129",
"0.5886282",
"0.58831704",
"0.58808017",
"0.5874833",
"0.58678764",
"0.58506125",
"0.5837422",
"0.58244735",
"0.5823761",
"0.582154",
"0.5802605",
"0.5797629",
"0.5791825",
"0.5784728",
"0.5780481",
"0.5775287",
"0.5773136",
"0.5771373",
"0.5768904",
"0.5768084",
"0.5764957",
"0.5754707",
"0.5743519",
"0.5742105",
"0.57360023",
"0.5735671",
"0.5729184",
"0.57270193",
"0.5721766",
"0.5718765",
"0.5701083",
"0.5696921",
"0.5692861",
"0.56923753",
"0.5690951",
"0.5689754",
"0.5688765",
"0.56866115",
"0.56765664",
"0.5676329",
"0.56741863",
"0.5668119",
"0.5661149",
"0.56473345",
"0.56240135",
"0.5617269",
"0.56150913",
"0.56110334",
"0.5609118",
"0.5607523",
"0.56042445",
"0.56007284",
"0.55971724",
"0.5586523",
"0.55842876",
"0.5581574",
"0.5579622",
"0.55794144",
"0.55710703"
] |
0.0
|
-1
|
MyActivity myActivity = new MyActivity();
|
public void add(){
dbHandler_card.getcount();
Intent i = new Intent(this,MyActivity.class);
startActivity(i);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Activity() {\n }",
"Activity activity();",
"void startNewActivity(Intent intent);",
"void onCreate(Intent intent);",
"private void openActivity() {\n }",
"public void create(MyActivity activity, Bundle bundle){\n super.create(activity, bundle);\n\n }",
"void doActivity();",
"public ChatActivity() {\n }",
"public void createActivity(Activity activity) {\n\t\t\n\t}",
"public OtherActivity () {\n super();\n location = \"nowhere\";\n }",
"private void startMainActivity() {\n Intent intent = new Intent(this, MyActivity.class);\n startActivity(intent);\n }",
"public MainActivity()\n {\n super();\n }",
"public interface ActivityInterface {\n public void initView();\n public void setUICallbacks();\n public int getLayout();\n public void updateUI();\n}",
"public interface ActivityInterface {\n\n int getLayout();\n\n void initView();\n}",
"@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}",
"public void onCreate();",
"public void onCreate();",
"void onActivityReady();",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}",
"public S(Activity activity){\n\t\tthis.activity = activity;\n\t\t\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) \n {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tm_Activity = this;\n\t\tm_Handler = new Handler();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\t_activity = this;\n\t\tLog.d(\"onCreateJava\" , \"++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t}",
"public interface MyBaseActivityImp {\n\n /**\n * 跳转Activity;\n *\n * @param paramClass Activity参数\n */\n void gotoActivity(Class<?> paramClass);\n\n /**\n * 跳转Activity,带有Bundle参数;\n *\n * @param paramClass Activity参数\n * @param bundle Bundle参数\n */\n void gotoActivity(Class<?> paramClass, Bundle bundle);\n\n /**\n * 跳转Activity,带有Bundle参数,并且该Activity不会压入栈中,返回后自动关闭;\n *\n * @param paramClass Activity参数\n * @param bundle Bundle参数\n */\n void gotoActivityNoHistory(Class<?> paramClass, Bundle bundle);\n\n /**\n * @param paramClass\n * @param bundle\n * @param paramInt\n */\n void gotoActivityForResult(Class<?> paramClass, Bundle bundle, int paramInt);\n\n /**\n * init View\n */\n void initView();\n\n /**\n *\n */\n void onEvent(Object o);\n}",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) \n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t\tm_Activity = this;\n\t\tm_Handler = new Handler();\n\t}",
"public abstract void onCreate();",
"public ScriptActivity() {\n }",
"public void goTestActivity()\n\t {\n\t }",
"public interface OmnomActivity {\n\tpublic static final int REQUEST_CODE_ENABLE_BLUETOOTH = 100;\n\tpublic static final int REQUEST_CODE_SCAN_QR = 101;\n\n\tvoid start(Intent intent, int animIn, int animOut, boolean finish);\n\n\tvoid startForResult(Intent intent, int animIn, int animOut, int code);\n\n\tvoid start(Class<?> cls);\n\n\tvoid start(Class<?> cls, boolean finish);\n\n\tvoid start(Intent intent, boolean finish);\n\n\tActivity getActivity();\n\n\tint getLayoutResource();\n\n\tvoid initUi();\n\n\tPreferenceProvider getPreferences();\n\n\tSubscription subscribe(final Observable observable, final Action1<? extends Object> onNext, final Action1<Throwable> onError);\n\n\tvoid unsubscribe(final Subscription subscription);\n\n}",
"void openActivity() {\n Intent intent = new Intent(\"myaction\");\n Bundle bundle = new Bundle();\n bundle.putString(\"name\", \"hui\");\n intent.putExtras(bundle);\n startActivityForResult(intent, 1);\n }",
"public MySOAPCallActivity()\n {\n }",
"public interface MainActivityView {\n\n}",
"public LigTvAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"public void onClick(View v) {\n\n\n\n startActivity(myIntent);\n }",
"public static MainActivity getInstance(){\n\t\treturn instance;\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n objCast();\n buttonClick();\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tview = View.inflate(this, R.layout.activity_wlecome, null);\r\n\t\tsetContentView(view);\r\n\t\tapp = (MyApplication) getApplication();\r\n\t\tapp.addActivity(this);\r\n\t\tinitView();\r\n\t\tinitData();\r\n\t}",
"public UserSettingsActivity(){\r\n\r\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) \n {\n //...\n }",
"@Override\n\tpublic void setActivity(Activity pAcitivity) {\n\n\t}",
"public interface MainView extends MvpView{\n void startAnekdotActivity(int type);\n}",
"public void onCreate() {\n }",
"public void onClickAbout (View v)\n{\n startActivity (new Intent(getApplicationContext(), AboutActivity.class));\n}",
"public FotomacAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"Intent createNewIntent(Class cls);",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState){\n\t\tmActivity=getActivity();\n\t\tsuper.onCreate(savedInstanceState);\n\t}",
"public JavaScriptInterface(TActivity activity) {\n mActivity = activity;\n }",
"public SporxAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"public interface IActivity {\n void bindData();\n\n void bindListener();\n}",
"Activity getActivity();",
"Activity getActivity();",
"public interface ActivityLauncher {\r\n\r\n\tpublic void launchActivity();\r\n\r\n\tpublic void finishCurrentActivity();\r\n\r\n}",
"public SabahAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n intent = getIntent();\n }",
"@Override\n public void onNewIntent(Activity activity, Intent data) {\n }",
"public AboutActivity() {\n\t\tsuper();\n\t}",
"@Override\n\tpublic void starctActivity(Context context) {\n\t\t\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\tMyThread myThread=new MyThread();\n\t myThread.start();\n\t}",
"public void activityCreated(Context ctx){\n //set Activity context - in this case there is only MainActivity\n mActivityContext = ctx;\n }",
"void intentPass(Activity activity, Class classname) {\n Intent i = new Intent(activity, classname);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n enterAnimation();\n }",
"public ProfileSetupActivity() {\n }",
"static public Godot.SingletonBase initialize(Activity activity)\n \t{\n \t\treturn new GodotAdMob(activity);\n \t}",
"public static MainActivity instance() {\n Log.d(TAG, \" instance(): called\");\n return inst;\n }",
"private void startPersonalActivity(String user_id) {\n }",
"@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n\n //Log.d(\"DEBUGAPP\", TAG + \" onAttach\");\n\n if (activity instanceof MainActivity) {\n mainActivity = (MainActivity) activity;\n }\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent=new Intent(MainActivity.this,MyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"public ImageLoader(Activity activity){\n this.main = activity;\n }",
"void inject(MainActivity activity);",
"public MainActivityUserTest() {\r\n super(MainActivity.class);\r\n }",
"protected abstract Intent createOne();",
"@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n }",
"public FiksturAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"private void link(MainActivity pActivity) {\n\n\t\t}",
"@Override\n\tpublic void starctActivity(Context context) {\n\n\t}",
"public CanliSkorAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"public MyApp() {\n sContext = this;\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n startActivity(getIntent());\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n configurePreviousMsg();\n reportBug();\n configureCreateProfile();\n ST = EditProfile.getST();\n TV2 = findViewById(R.id.textView22);\n\n ma = MainActivity.this; // allow static reference\n context = ContextGetter.getAppContext(); // context is stupid and everyone hates it\n\n if(ST.equals(\"NOTHING YET\")){\n }\n else{\n setStatus(ST);\n }\n Button theButton = findViewById(R.id.TheMoveButton);\n connection.start();\n\n theButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view){\n startActivity(new Intent(MainActivity.this, CreateAccount.class));\n }\n });\n }",
"@Override\r\n\tpublic void onAttach(Activity activity) {\n\t\tsuper.onAttach(activity);\r\n\t\tthis.mActivity = activity;\r\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tmActivityManager = (ActivityManager) (getSystemService(Context.ACTIVITY_SERVICE));\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}",
"public PuanDurumuAsyncTask(Activity activity) {\n this.activity = activity;\n context = activity;\n }",
"protected void onCreate() {\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n Button connectBtn = (Button) findViewById(R.id.connectBtn);\n connectBtn.setOnClickListener(new OnClickListener() {\n \tpublic void onClick(View v) {\n \t\tRequestThread thread = new RequestThread();\n \t\tthread.start();\n \t}\n });\n\n txtMsg = (TextView) findViewById(R.id.txtMsg);\n\n }",
"private void homemenu() \n\n{\nstartActivity (new Intent(getApplicationContext(), Home.class));\n\n\t\n}",
"public void setActivity(Activity activity) {\n if (activity != null) {\n service = (BleTrackerService) activity.getApplicationContext();\n }\n }",
"public static Activity getContext() {\n return instance;\n\n }",
"@Override\n public void onNewIntent(Intent intent) {\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n }",
"public BluetoothManager( Activity activity ) {\n\t\tmActivity = activity;\n\t\tmContext = activity;\n\t\tmPreferences = PreferenceManager.getDefaultSharedPreferences( mContext );\n\t\tmByteUtility = new ByteUtility();\n\t\tmDebugMsg = new DebugMsg();\n\t}",
"public void Call_My_Blog(View v) {\n Intent intent = new Intent(MainActivity.this, My_Blog.class);\n startActivity(intent);\n\n }",
"private void initiateActivity() {\r\n\t\tif (application == null) {\r\n\t\t\tthis.application = SmartApplication.REF_SMART_APPLICATION;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tif (application.attachedCrashHandler)\r\n\t\t\t\tCrashReportHandler.attach(this);\r\n\t\t} catch (Throwable e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tfinish();\r\n\t\t}\r\n\r\n\t\tif (setLayoutView() != null) {\r\n\t\t\tsetContentView(setLayoutView());\r\n\t\t} else {\r\n\t\t\tsetContentView(setLayoutId());\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n this.vsMain = (VsMainActivity) activity;\n }",
"public MainActivity getMainActivity() {\n return (MainActivity) getActivity();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_items_you_previously_bought);\n\n }",
"@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, ViewActivity.class));\n }",
"public void openNewActivity(){\n Intent intent = new Intent(this, InventoryDisplay.class);\n startActivity(intent);\n }",
"public static EasyFeedback getInstance(Activity activity){\n if (easyfeedback==null){\n easyfeedback = new EasyFeedback(activity);\n }\n return easyfeedback;\n }",
"private void mystartActivity(Class c){\n Intent intent = new Intent(this,c);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }",
"@Override\n protected void onCreate(Bundle arg0) {\n super.onCreate(arg0);\n setContentView(R.layout.activity_login);\n application= (MyApplication) this.getApplicationContext();\n initJson();\n init();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState){\n\t\tsuper.onCreate(savedInstanceState);\n\t\t/*LIST PAGES*/\n\t\taddTab(R.string.main,MainActivity.class);\n\t\t//addTab(R.string.menu,MenuActivity.class);\n\t\taddTab(R.string.menu,PagerCore.MenuActivity.class);\n\t\taddTab(R.string.murasyoulaw,LawViewerActivity.class);\n\n\t\t//for(Map.Entry<Integer,Class<? extends Activity>> i:dic.entrySet())helper.add(i);\n\t\tfor(Map.Entry<Integer,Class<? extends Activity>> i:helper)decorCache.put(dbg(i.getValue()),openActivity(i.getValue()));\n\t\tfor(Map.Entry<Class<? extends Activity>,View> i:decorCache.entrySet())helper2.add(i.getValue());\n\t\t\n\t\tif(sdkint>=21)getActionBar().setElevation(0);\n\t\tinstance=new WeakReference<PagerFlameActivity>(this);\n\t\tsetContentView(getLocalActivityManager().startActivity(\"core\",new Intent(this,PagerCore.class)).getDecorView());\n\t}"
] |
[
"0.7188873",
"0.7060302",
"0.67438173",
"0.6688835",
"0.65414",
"0.6518769",
"0.6376309",
"0.63584983",
"0.6354307",
"0.62808317",
"0.62780595",
"0.6254215",
"0.6247645",
"0.6195346",
"0.61635983",
"0.6128919",
"0.6128919",
"0.61134714",
"0.6112032",
"0.6105883",
"0.6071263",
"0.6017749",
"0.600182",
"0.59854585",
"0.59745",
"0.5958487",
"0.5951227",
"0.5934433",
"0.5924969",
"0.5918238",
"0.59122187",
"0.5904755",
"0.59037715",
"0.5903184",
"0.5894765",
"0.5893462",
"0.58870244",
"0.58719647",
"0.58694714",
"0.58534795",
"0.58405215",
"0.582099",
"0.58182824",
"0.5811825",
"0.5794889",
"0.5785726",
"0.57570356",
"0.5756145",
"0.5716122",
"0.57059926",
"0.57059926",
"0.57038146",
"0.56929415",
"0.5680256",
"0.5658939",
"0.56565785",
"0.5651036",
"0.5640888",
"0.56382364",
"0.56333554",
"0.5624937",
"0.56213105",
"0.56195086",
"0.56165713",
"0.56155187",
"0.56134593",
"0.56114286",
"0.56068194",
"0.56000596",
"0.5594265",
"0.55927527",
"0.5584026",
"0.5576083",
"0.55602545",
"0.5557946",
"0.55575234",
"0.555103",
"0.55500793",
"0.55443335",
"0.5542646",
"0.55402946",
"0.55374247",
"0.5530182",
"0.55239165",
"0.5520296",
"0.551902",
"0.55175406",
"0.55175406",
"0.55175406",
"0.551386",
"0.5513737",
"0.5509648",
"0.5501546",
"0.5491183",
"0.548885",
"0.5488597",
"0.5485159",
"0.5481859",
"0.5481487",
"0.5480207",
"0.547995"
] |
0.0
|
-1
|
function to check whether a number is positive or not
|
public boolean isPositive(int number) {
return number > 0;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean isPositiveNumber(int number) {\n return number >= 0;\n }",
"public boolean isPositive()\n {\n return Native.fpaIsNumeralPositive(getContext().nCtx(), getNativeObject());\n }",
"public static boolean isNumberPositive(Object val) throws BaseException\n{\n\tif(val instanceof Number && NumberUtil.toDouble(val) > 0 )\n\t{\n\t return true;\n\t}\n\treturn false;\n}",
"private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }",
"public boolean isNegative();",
"public abstract boolean isPositive();",
"boolean isZero();",
"public static boolean isNumberNegative(Object val) throws BaseException\n{\n\tif(val instanceof Number && NumberUtil.toDouble(val) < 0 )\n\t{\n\t return true;\n\t}\n\treturn false;\n}",
"private static boolean isPositiveInteger(String s){\n\t\ttry{\n\t\t\t//If the token is an integer less than 0 return false\n\t\t\tif(Integer.parseInt(s) < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//If an exception occurs return false\n\t\tcatch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t\t//otherwise return true\n\t\treturn true;\n\t}",
"public static int sign(int number) {\n return Integer.compare(number, 0);\n\n }",
"public double hasNegSign(double value) {\n if (value < 0) {\n return value * -1;\n } else {\n return value;\n }\n }",
"private void checkPositive(long number, String paramName) {\r\n if (number <= 0) {\r\n throw new IllegalArgumentException(\"The parameter '\" + paramName\r\n + \"' should not be less than or equal to 0.\");\r\n }\r\n }",
"boolean isNeg();",
"public static void determineIsPositiveFloat() {\n System.out.println(\"Enter a number:\");\r\n Scanner num = new Scanner(System.in);\r\n float i = Float.parseFloat(num.nextLine());\r\n float absI = Math.abs(i);\r\n if (i == 0)\r\n System.out.println(\"Number is zero\");\r\n else if ((i > 0) && (i < 1))\r\n System.out.println(\"Number is small positive\");\r\n else if ((i >= 1) && (i < 1000000))\r\n System.out.println(\"Number is positive\");\r\n else if (i >= 1000000)\r\n System.out.println(\"Number is large positive\");\r\n else if ((i < 0) && (absI < 1))\r\n System.out.println(\"Number is small negative\");\r\n else if ((absI >= 1) && (absI <= 1000000))\r\n System.out.println(\"Number is negative\");\r\n else\r\n System.out.println(\"Number is large negative\");\r\n }",
"private static void determineIsPositiveInt() {\n System.out.println(\"Enter a number:\");\r\n Scanner s = new Scanner(System.in);\r\n int i = Integer.parseInt(s.nextLine());\r\n if (i > 0)\r\n System.out.println(\"Positive i\");\r\n else if (i == 0)\r\n System.out.println(\"i=0\");\r\n else\r\n System.out.println(\"Negative i\");\r\n }",
"public static void main(String[] args){\n int num= 120;\n boolean positive = num>0;\n boolean negative = num <0;\n boolean zero = num ==0;\n\n\n System.out.println(num + \" is positive? \"+positive);\n System.out.println(num + \" is negative? \"+negative);\n System.out.println(num + \" is zero? \"+zero);\n\n\n\n }",
"public boolean checkNumberIsZero(int number){\n\t\tif(number==0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public static void isPositive(double userInput) {\n\t\tif (userInput <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter a positive number. Please try again:\");\n\t\t}\n\t}",
"public boolean isPositive()\n\t{\n\t\treturn _bIsPositive;\n\t}",
"boolean hasNumber();",
"public boolean almostZero(double a);",
"private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }",
"public boolean isValid(int number)",
"public static int sign(double x) {\n\t // A true signum could be implemented in C++ as below.\n\t // template <typename T> int sgn(T val) {\n\t // return (T(0) < val) - (val < T(0));\n //}\n if (x >= 0)\n return 1;\n return -1;\n }",
"public static void isPositive(int userInput) {\n\t\tif (userInput <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter a positive number. Please try again:\");\n\t\t}\n\t}",
"public static boolean isPositive(Vector<Double> k)\n\t{\n\t\tfor (int i=0;i<k.size();i++)\n\t\t\tif(k.get(i)<=0)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}",
"public boolean validateInput(double input){\n\t\tif(input >= -1 && input <= 1)\n\t\t return true;\n\t\treturn false;\t\n\t}",
"public static boolean isPositiveNumber(final BigDecimal amount) {\n\t\treturn (amount != null) && (amount.compareTo(BigDecimal.ZERO) > 0);\n\t}",
"public static int check() {\r\n\t\tint num = 0;\r\n\t\tboolean check = true;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tnum = input.nextInt();\r\n\t\t\t\tif (num < 0) {\r\n\t\t\t\t\tnum = Math.abs(num);\r\n\t\t\t\t}\r\n\t\t\t\tcheck = false;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t\t\t\t\t// hvatanje greske i ispis da je unos pogresan\r\n\t\t\t\tSystem.out.println(\"You know it's wrong input, try again mate:\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (check);\r\n\t\treturn num;\r\n\t}",
"boolean hasNum();",
"boolean hasNum();",
"boolean hasNum();",
"public boolean isNegative()\n {\n return Native.fpaIsNumeralNegative(getContext().nCtx(), getNativeObject());\n }",
"private static boolean isPositive(int ID) {\n return ID > 0;\n }",
"protected boolean isPositive(Instance i) {\n TreeNode leaf = traverseTree(i);\n return leaf != null && leaf.isPositiveLeaf();\n }",
"public static boolean bsign(double x) {\n if (x >= 0)\n return true;\n return false;\n }",
"private static boolean isValue(long x) {\n return x >= 0L; // 1\n }",
"public boolean checkNumber() {\n\t\treturn true;\n\t}",
"private boolean isPositive() {\n return this._isPositive;\n }",
"public boolean isZero() {\n Pattern pattern = Pattern.compile(\"0+\");\n Matcher matcher = pattern.matcher(numberString);\n return matcher.matches();\n }",
"private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean posNeg(int a, int b, boolean negative) {\n if (negative){\n return(a < 0 && b < 0);\n }\n\n return((a < 0 && b >= 0) || (a >= 0 && b < 0));\n}",
"protected static boolean hasPositiveValue(BigDecimal value) {\n return value != null && BigDecimal.ZERO.compareTo(value) < 0;\n }",
"@Test\n\tvoid testNegativeInteger() {\n\t\tint result = calculator.negativeInteger(-4,-3);\n\t\tassertEquals(-1,result);\n\t}",
"static boolean checkNumber(int number) {\r\n\t\t\r\n\t\tint lastDigit= number%10;\r\n\t\tnumber/=10;\r\n\t\tboolean flag= false;\r\n\t\t\r\n\t\twhile(number>0) {\r\n\t\t\tif(lastDigit<=number%10) {\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tlastDigit= number%10;\r\n\t\t\tnumber/=10;\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(flag) \r\n\t\t\treturn false;\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"private boolean isValidValue(double value) {\r\n\t\treturn (value > 0);\r\n\t}",
"public static void main(String[] args) {\n\t\tint n =9;\r\n\t\tif(n>=0)\r\n\t\t\tSystem.out.println(\"number is positive\");\r\n\r\n\t}",
"@org.junit.Test\r\n public void testNegativeScenario() {\n boolean result = Validation.validateSAPhoneNumber(\"071261219\");// function should return false\r\n assertEquals(false, result);\r\n\r\n }",
"public boolean isZero() {return false;}",
"public static boolean check(double arg) {\n if (!(Double.isInfinite(arg))) {\n return true;\n } else {\n System.out.println(\"Warring! You have entered a very large number!\");\n return false;\n }\n }",
"@Test\n public void testSignum() {\n System.out.println(Integer.signum(50));\n\n // returns -1 as int value is less than 0\n System.out.println(Integer.signum(-50));\n\n // returns 0 as int value is equal to 0\n System.out.println(Integer.signum(0));\n }",
"boolean hasIntValue();",
"public static boolean isValidFoodAmount(Integer test) {\n return test > 0;\n }",
"public boolean isNegative() {\n return (numberString.charAt(0) == '-');\n }",
"public final boolean isValidAmount(long amount) {\n return amount >= 0;\n }",
"private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}",
"public double abs(double value){return value < 0? value*-1: value;}",
"boolean hasInt();",
"public static final int sign(double x) {\n \t\treturn (x < 0d) ? -1 : 1;\n \t}",
"public boolean get_exponent_sign();",
"public static final int sign(int x) {\n \t\treturn (x < 0) ? -1 : 1;\n \t}",
"public boolean isNegative()\n\t{\n\t\t// TO DO\n\t\treturn isNeg;\n\t}",
"private boolean lineIsNumberAboveZero(final String line) {\n try {\n return Integer.parseInt(line) > 1;\n } catch(final NumberFormatException nfe) {\n return false;\n }\n }",
"protected static void verifyNonNegative(double number,\r\n\t\t\tString fieldName) throws MusicTunesException {\r\n\t\tif (number < 0) {\r\n\t\t\tthrow new MusicTunesException(fieldName\r\n\t\t\t\t\t+ \" must be non-negative\");\r\n\t\t}\r\n\t}",
"public static final int sign(float x) {\n \t\treturn (x < 0f) ? -1 : 1;\n \t}",
"public static Object isNaN(Context cx, Scriptable thisObj,\n Object[] args, Function funObj)\n {\n if (args.length < 1)\n return Boolean.TRUE;\n double d = ScriptRuntime.toNumber(args[0]);\n return (d != d) ? Boolean.TRUE : Boolean.FALSE;\n }",
"public static void main(String[] args)\r\n\t{\nSystem.out.print(\"enter any number: \");\r\nScanner s=new Scanner(System.in);\r\nint a=s.nextInt();\r\nif(a>0)\r\n\r\n{\r\n\tSystem.out.print(\"it is a positive number\");\r\n}\r\n\telse if(a<0)\r\n\t\r\n\t\t{\r\n\t\tSystem.out.println(\"it is a negative number\");\r\n\t\t}\r\n\t\r\n\telse \r\n\t{\r\n\t\tSystem.out.println(\"it is zero\");\r\n\t\t}\r\n\t\r\n}",
"public boolean check(int value);",
"public static <N extends Number> PropertyConstraint<N> positive() {\n return ConstraintFactory.fromPredicate(\n new Predicate<N>() {\n @Override\n public boolean test(N t) {\n return t.intValue() > 0;\n }\n },\n \"Should be positive\"\n );\n }",
"public static int sign(int num) {\n\t\treturn (num >> 31) & 1;\n\t}",
"private boolean isValidNumber(String number) {\n if (null == number) {\n return false;\n }\n\n int i = 0;\n for (i = 0; i < number.length(); ++i) {\n if (number.charAt(i) != '+' && number.charAt(i) != '-') {\n if (Character.isDigit(number.charAt(i))) {\n break;\n }\n\n // Found a character that isn't a digit or sign\n return false;\n }\n }\n\n int firstDigitIndex = i;\n\n if (number.length() == i) {\n // The number has only signs\n return false;\n }\n\n return (number.substring(firstDigitIndex).chars().allMatch(Character::isDigit));\n }",
"@Test\n public void test() {\n assertFalse(checkZeroOnes(\"111000\"));\n }",
"private static boolean isNegative(String value) {\n if (value.indexOf(\"-\") != -1) {\n return true;\n }\n return false;\n }",
"public float amountCheck(float amount) {\n\t\twhile(true) {\n\t\t\tif(amount<=0) {\n\t\t\t\tSystem.out.println(\"Amount should be greater than 0.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tamount = sc.nextInt();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn amount;\n\t\t\t}\n\t\t}\n\t}",
"private boolean acceptedValueRange(double amount){\n if(amount <= 1.0 && amount >= 0.0){\n return true;\n }\n else{\n throw new IllegalArgumentException(\"Number must be in range of [0,1]\");\n }\n }",
"public boolean isPositiveInfinite() {\n\t\treturn this.getHigh().equals(\"+Inf\");\n\t}",
"public static int checkNegative(int orderN)\n {\n if (orderN < 0)\n {\n System.out.println(\"Negative order number detected input is read as 0.\\n\");\n return 0;\n }\n else\n {\n return orderN;\n }\n }",
"public Boolean verifyTheValueTotalCostIsInZero() {\n\t\tSystem.out.println(\"Starting to verify if the value total cost is equal to zero.\");\n\t\treturn verifyIfSomeStringContainsZeroDotZeroZeroValueInside(getTextByLocator(body_value_total));\n\t}",
"public boolean almostZero(Coordinates a);",
"public boolean checkPosIntValues(TextField tempField) { //check if integer is positive\n \tString param = \"Nframes and N_reactions\";\n \treturn Values.checkPosIntValues(param, tempField);\n }",
"public boolean isZero()\n {\n return Native.fpaIsNumeralZero(getContext().nCtx(), getNativeObject());\n }",
"public static final boolean isNumberNotNegative(String str) {\n\t\treturn isNumber(str,false);\n\t}",
"boolean hasNum1();",
"public void sign() {\n System.out.print(\"Enter an integer: \");\n int int1 = in.nextInt();\n\n if (int1 > 0) {\n System.out.println(\"\\nPositive.\\n\");\n } else if (int1 < 0) {\n System.out.println(\"\\nNegative.\\n\");\n } else {\n System.out.println(\"\\nZero.\\n\");\n }\n }",
"boolean hasMoneyValue();",
"boolean hasMoneyValue();",
"@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }",
"@Test\n public void testZeroPuncturePoint(){\n assertTrue(\n \"Test [x = 0.0]: zero value puncture point\",\n Double.isNaN(systemFunctions.calculate(0))\n );\n }",
"public static final int sign(long x) {\n \t\treturn (x < 0) ? -1 : 1;\n \t}",
"boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isNegativeInfinite() {\n\t\treturn this.getLow().equals(\"-Inf\");\n\t}",
"public static int checkInt() {\n\t\tboolean is_Nb = false; int i = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\ti = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tis_Nb= true;\r\n\t\t\t\tif(i<0) {\r\n\t\t\t\t\tSystem.out.println(\"Enter a positive number\");\r\n\t\t\t\t\tis_Nb = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e) {\r\n\t\t\t\tSystem.out.println(\"Enter a number\");\r\n\t\t\t}\r\n\t\t}while(!is_Nb);\r\n\t\treturn i;\r\n\t}",
"static int check(int x, int a, int b) \n\t{ \n\t\t// sum of digits is 0 \n\t\tif (x == 0) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (x > 0) \n\t\t{ \n\n\t\t\t// if any of digits in sum is \n\t\t\t// other than a and b \n\t\t\tif (x % 10 != a & x % 10 != b) \n\t\t\t{ \n\t\t\t\treturn 0; \n\t\t\t} \n\n\t\t\tx /= 10; \n\t\t} \n\n\t\treturn 1; \n\t}",
"public static void main(String[] args) {\n\t\tint i = -10;\r\n\t\tif (i < 0) {\r\n\t\t\tSystem.out.println(\"Positive of \" + i + \" is \" + (-i));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(i + \" is Positive Number only\");\r\n\t\t}\r\n\t}",
"public static boolean isZero(float x, float tolerance) {\n\t\treturn abs(x) < tolerance;\n\t}",
"public static double abs(double numero) {\n return numero > 0 ? numero : -numero;\n }",
"public boolean showSignNegative(){\n return signFormat.equals(FormatIntegerSignVisibility.SHOW_NEGATIVE_ONLY);\n }",
"public static boolean isGood(int num){\r\n\t\tif ((num<0)||(num>6)){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"private boolean isAmountValid(String amount) {\n return Integer.parseInt(amount) > 0;\n }",
"public static boolean isValidPercentage(int input) {\n return input >= 0;\n }"
] |
[
"0.78638893",
"0.72565013",
"0.7237551",
"0.71715266",
"0.71646065",
"0.70547396",
"0.7054296",
"0.6878761",
"0.6786515",
"0.6781244",
"0.6754323",
"0.67526805",
"0.6750435",
"0.6731752",
"0.6691546",
"0.6682759",
"0.6624227",
"0.660852",
"0.6605621",
"0.6589813",
"0.6571118",
"0.6570922",
"0.65628463",
"0.6554273",
"0.6533196",
"0.6509473",
"0.64809775",
"0.64666903",
"0.6423626",
"0.64159644",
"0.64159644",
"0.64159644",
"0.63995606",
"0.63887984",
"0.6378275",
"0.63697666",
"0.63687193",
"0.63520026",
"0.6297542",
"0.62881815",
"0.62847185",
"0.62494224",
"0.62398636",
"0.6231816",
"0.62298536",
"0.6215142",
"0.61928463",
"0.61783004",
"0.6177273",
"0.6122005",
"0.607802",
"0.60724163",
"0.6064685",
"0.6041759",
"0.5963825",
"0.59565085",
"0.5930917",
"0.5918451",
"0.5881944",
"0.5880274",
"0.58577657",
"0.5854425",
"0.5835882",
"0.58344114",
"0.581436",
"0.5808631",
"0.5796844",
"0.5791666",
"0.5775827",
"0.5757843",
"0.5749137",
"0.5732456",
"0.57229507",
"0.572123",
"0.57144153",
"0.5703256",
"0.5698471",
"0.5682197",
"0.5679197",
"0.5675772",
"0.56720716",
"0.5662302",
"0.565754",
"0.56434155",
"0.56403005",
"0.56403005",
"0.56362975",
"0.56362975",
"0.5633886",
"0.5623748",
"0.5622877",
"0.5615744",
"0.5607207",
"0.5607188",
"0.5606764",
"0.5605898",
"0.5590954",
"0.5578386",
"0.5563035",
"0.5562344"
] |
0.78641766
|
0
|
Create a StringEscape instance that uses the default escape character '\'.
|
public StringEscape(final Map<Character, Character> mapping) {
this(mapping, '\\');
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }",
"CharSequence escape(char c);",
"EscapeStatement createEscapeStatement();",
"public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }",
"private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }",
"public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }",
"public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}",
"default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }",
"public static String escape(String source) {\n return escape(source, -1, true);\n }",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"default String escapeString(final String input) {\n return noQuestion(GedRenderer.escapeString(input)).trim();\n }",
"public JsonFactory setCharacterEscapes(CharacterEscapes esc)\n/* */ {\n/* 666 */ this._characterEscapes = esc;\n/* 667 */ return this;\n/* */ }",
"protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String escape(final String input) {\n\t\tStringBuilder builder = new StringBuilder(input);\n\t\tescape(builder);\n\t\treturn builder.toString();\n\t}",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"public static String escapeString(String string, char escape, String charsToEscape) {\n\t int len = string.length();\n\t StringBuilder res = new StringBuilder(len + 5);\n\t escapeStringToBuf(string, escape, charsToEscape, res);\n\t return res.length()==len ? string : res.toString();\n }",
"private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }",
"public static String escapeString(String str) {\n return escapeString(str, 0xf423f);\n\t}",
"private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}",
"private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }",
"public static String escape(String s) {\r\n if (s == null)\r\n return null;\r\n StringBuffer sb = new StringBuffer();\r\n escape(s, sb);\r\n return sb.toString();\r\n }",
"public String escape(String source) {\r\n\t\treturn null;\r\n\t}",
"public StringEscape(final Map<Character, Character> mapping, final char escape) {\n\t\tthis.escape = escape;\n\t\tthis.unescapeMap = MapTool.unmodifiableCopy(mapping);\n\t\tthis.escapeMap = Collections.unmodifiableMap(MapTool.reverse(mapping));\n\t\tcontrolCharacters = SetTool.unmodifiableCopy(mapping.keySet());\n\t\tstringCharacters = SetTool.unmodifiableCopy(mapping.values());\n\t}",
"private static String escape(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tescape(s, sb);\r\n\t\treturn sb.toString();\r\n\t}",
"public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"String escChr(char pChar) throws Exception;",
"String escStr(String pSource) throws Exception;",
"private static String escapeJavaString(String input)\n {\n int len = input.length();\n // assume (for performance, not for correctness) that string will not expand by more than 10 chars\n StringBuilder out = new StringBuilder(len + 10);\n for (int i = 0; i < len; i++) {\n char c = input.charAt(i);\n if (c >= 32 && c <= 0x7f) {\n if (c == '\"') {\n out.append('\\\\');\n out.append('\"');\n } else if (c == '\\\\') {\n out.append('\\\\');\n out.append('\\\\');\n } else {\n out.append(c);\n }\n } else {\n out.append('\\\\');\n out.append('u');\n // one liner hack to have the hex string of length exactly 4\n out.append(Integer.toHexString(c | 0x10000).substring(1));\n }\n }\n return out.toString();\n }",
"private void createString() {\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length && data[currentIndex] != '\"') {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tif (currentIndex >= data.length) {\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\n\t\t\t\tswitch (data[currentIndex]) {\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'n':\n\t\t\t\t\tvalue += '\\n';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\tvalue += '\\r';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 't':\n\t\t\t\t\tvalue += '\\t';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t}\n\t\t}\n\n\t\tif (currentIndex < data.length) {\n\t\t\tvalue += data[currentIndex++];\n\t\t} else {\n\t\t\tthrow new LexerException(\"Missing end: \\\".\");\n\t\t}\n\n\t\ttoken = new Token(TokenType.STRING, value);\n\t}",
"private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }",
"private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }",
"@Test\n void should_describe_escaped_chars() {\n final char backspace = 8;\n final char tab = 9;\n final char lineFeed = 10;\n final char carriageReturn = 13;\n final char doubleQuote = 0x22;\n final char singleQuote = 0x27;\n final char backslash = 0x5C;\n // --end-->\n\n assertEquals(EscapedChars.BACKSPACE.getValue(), backspace);\n assertEquals(EscapedChars.TAB.getValue(), tab);\n assertEquals(EscapedChars.LINE_FEED.getValue(), lineFeed);\n assertEquals(EscapedChars.CARRIAGE_RETURN.getValue(), carriageReturn);\n assertEquals(EscapedChars.DOUBLE_QUOTE.getValue(), doubleQuote);\n assertEquals(EscapedChars.SINGLE_QUOTE.getValue(), singleQuote);\n assertEquals(EscapedChars.BACKSLASH.getValue(), backslash);\n }",
"public final void mEscapeSequence() throws RecognitionException {\n try {\n // /development/json-antlr/grammar/JSON.g:98:6: ( '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' ) )\n // /development/json-antlr/grammar/JSON.g:98:10: '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n {\n match('\\\\'); \n // /development/json-antlr/grammar/JSON.g:98:15: ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n int alt9=10;\n switch ( input.LA(1) ) {\n case 'u':\n {\n alt9=1;\n }\n break;\n case 'b':\n {\n alt9=2;\n }\n break;\n case 't':\n {\n alt9=3;\n }\n break;\n case 'n':\n {\n alt9=4;\n }\n break;\n case 'f':\n {\n alt9=5;\n }\n break;\n case 'r':\n {\n alt9=6;\n }\n break;\n case '\\\"':\n {\n alt9=7;\n }\n break;\n case '\\'':\n {\n alt9=8;\n }\n break;\n case '\\\\':\n {\n alt9=9;\n }\n break;\n case '/':\n {\n alt9=10;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n }\n\n switch (alt9) {\n case 1 :\n // /development/json-antlr/grammar/JSON.g:98:16: UnicodeEscape\n {\n mUnicodeEscape(); \n\n }\n break;\n case 2 :\n // /development/json-antlr/grammar/JSON.g:98:31: 'b'\n {\n match('b'); \n\n }\n break;\n case 3 :\n // /development/json-antlr/grammar/JSON.g:98:35: 't'\n {\n match('t'); \n\n }\n break;\n case 4 :\n // /development/json-antlr/grammar/JSON.g:98:39: 'n'\n {\n match('n'); \n\n }\n break;\n case 5 :\n // /development/json-antlr/grammar/JSON.g:98:43: 'f'\n {\n match('f'); \n\n }\n break;\n case 6 :\n // /development/json-antlr/grammar/JSON.g:98:47: 'r'\n {\n match('r'); \n\n }\n break;\n case 7 :\n // /development/json-antlr/grammar/JSON.g:98:51: '\\\\\\\"'\n {\n match('\\\"'); \n\n }\n break;\n case 8 :\n // /development/json-antlr/grammar/JSON.g:98:56: '\\\\''\n {\n match('\\''); \n\n }\n break;\n case 9 :\n // /development/json-antlr/grammar/JSON.g:98:61: '\\\\\\\\'\n {\n match('\\\\'); \n\n }\n break;\n case 10 :\n // /development/json-antlr/grammar/JSON.g:98:66: '\\\\/'\n {\n match('/'); \n\n }\n break;\n\n }\n\n\n }\n\n }\n finally {\n }\n }",
"static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}",
"private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}",
"default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }",
"public static String escape(String source, int delimiter,\n boolean escapeQuote) {\n\n /*\n * If the source has any chars that need to be escaped, allocate a\n * new buffer and copy into it.\n * Allocate a new buffer iff source has any chars that need to\n * be esacaped.\n * Allocate enough so that the java buffer manager need not re-allocate\n * the buffer. Worst case is that all chars in the string need to be\n * escaped, resulting in twice the source length\n */\n int currpos = 0;\n StringBuffer result = null;\n // the default delimiter in COPY format is tab '\\t'\n boolean escapeDelimiter = false;\n // check if the user specified a custom delimiter\n if (delimiter != -1) {\n escapeDelimiter = true;\n }\n\n for (char ch : source.toCharArray()) {\n switch (ch) {\n case '\\\\':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\\\\\\");\n break;\n case '\\n':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\n\");\n break;\n case '\\r':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\r\");\n break;\n case '\\t':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\t\");\n break;\n case '\\b':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\b\");\n break;\n case '\\f':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\f\");\n break;\n case '\\'':\n if (escapeQuote) {\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"''\");\n break;\n }\n // Fall through to default otherwise\n default:\n if (result != null) {\n if (escapeDelimiter && ch == delimiter) {\n result.append(\"\\\\\");\n result.append(delimiter);\n } else {\n result.append(ch);\n }\n }\n else if (escapeDelimiter && ch == delimiter) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n result.append(\"\\\\\");\n result.append(delimiter);\n }\n }\n currpos++;\n }\n if (result != null) {\n return result.toString();\n } else {\n return source;\n }\n }",
"protected String getEscapedUri(String uriToEscape) {\r\n\t\treturn UriComponent.encode(uriToEscape, UriComponent.Type.PATH_SEGMENT);\r\n\t}",
"private String escapeString(String value, String queryLanguage) {\n String escaped = null;\n if (value != null) {\n if (queryLanguage.equals(Query.XPATH) || queryLanguage.equals(Query.SQL)) {\n // See JSR-170 spec v1.0, Sec. 6.6.4.9 and 6.6.5.2\n escaped = value.replaceAll(\"\\\\\\\\(?![-\\\"])\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"'\", \"\\\\\\\\'\")\n .replaceAll(\"'\", \"''\");\n }\n }\n return escaped;\n }",
"@Deprecated\r\n\tpublic static String addSlashesString(String str) {\r\n\t\tif (str == null)\r\n\t\t\treturn str;\r\n\r\n\t\tString newStr = \"\";\r\n\t\tfor (int i = 0; i < str.length(); ++i) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tswitch (c) {\r\n\t\t\tcase '\\n':\r\n\t\t\t\tnewStr += \"\\\\n\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\r':\r\n\t\t\t\tnewStr += \"\\\\r\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\t':\r\n\t\t\t\tnewStr += \"\\\\t\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\\\':\r\n\t\t\t\tnewStr += \"\\\\\\\\\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tnewStr += c;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newStr;\r\n\t}",
"public static String unicodeEscaped(char ch) {\n/* 353 */ if (ch < '\\020')\n/* 354 */ return \"\\\\u000\" + Integer.toHexString(ch); \n/* 355 */ if (ch < 'Ā')\n/* 356 */ return \"\\\\u00\" + Integer.toHexString(ch); \n/* 357 */ if (ch < 'က') {\n/* 358 */ return \"\\\\u0\" + Integer.toHexString(ch);\n/* */ }\n/* 360 */ return \"\\\\u\" + Integer.toHexString(ch);\n/* */ }",
"public static String escape(final Object self, final Object string) {\n final String str = JSType.toString(string);\n final int length = str.length();\n\n if (length == 0) {\n return str;\n }\n\n final StringBuilder sb = new StringBuilder();\n for (int k = 0; k < length; k++) {\n final char ch = str.charAt(k);\n if (UNESCAPED.indexOf(ch) != -1) {\n sb.append(ch);\n } else if (ch < 256) {\n sb.append('%');\n if (ch < 16) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n } else {\n sb.append(\"%u\");\n if (ch < 4096) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n }\n }\n\n return sb.toString();\n }",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"private String escapeName(String name) {\n return (name != null && name.indexOf('\"') > 0) ?\n name.replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") : name;\n }",
"public static String unicodeEscape(String input, boolean escapeSpaces)\n {\n if (input == null)\n {\n return null;\n }\n\n StringBuilder builder = new StringBuilder();\n boolean changed = false;\n int length = input.length();\n for (int i = 0; i < length; i++)\n {\n char c = input.charAt(i);\n\n if (c < ' ')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c == ' ' && escapeSpaces)\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c > '~')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n builder.append(c);\n }\n\n if (!changed)\n {\n return input;\n }\n\n return builder.toString();\n }",
"public static String escapeRegexChar(char c) {\n return (META_CHARS.contains(c) ? \"\\\\\" : \"\") + c;\n }",
"public interface EscapeMarker {}",
"private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }",
"public static String encodeJsString(String s) throws Exception {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"\\\"\");\r\n for (Character c : s.toCharArray())\r\n {\r\n switch(c)\r\n {\r\n case '\\\"': \r\n sb.append(\"\\\\\\\"\");\r\n break;\r\n case '\\\\': \r\n sb.append(\"\\\\\\\\\");\r\n break;\r\n case '\\b': \r\n sb.append(\"\\\\b\");\r\n break;\r\n case '\\f': \r\n sb.append(\"\\\\f\");\r\n break;\r\n case '\\n': \r\n sb.append(\"\\\\n\");\r\n break;\r\n case '\\r': \r\n sb.append(\"\\\\r\");\r\n break;\r\n case '\\t': \r\n sb.append(\"\\\\t\");\r\n break;\r\n default: \r\n Int32 i = (int)c;\r\n if (i < 32 || i > 127)\r\n {\r\n sb.append(String.format(StringSupport.CSFmtStrToJFmtStr(\"\\\\u{0:X04}\"),i));\r\n }\r\n else\r\n {\r\n sb.append(c);\r\n } \r\n break;\r\n \r\n }\r\n }\r\n sb.append(\"\\\"\");\r\n return sb.toString();\r\n }",
"private static String handleEscapes(String s) {\n final String UNLIKELY_STRING = \"___~~~~$$$$___\";\n return s.replace(\"\\\\\\\\\", UNLIKELY_STRING).replace(\"\\\\\", \"\").replace(UNLIKELY_STRING, \"\\\\\");\n }",
"public static String unicodeEscaped(Character ch) {\n/* 380 */ if (ch == null) {\n/* 381 */ return null;\n/* */ }\n/* 383 */ return unicodeEscaped(ch.charValue());\n/* */ }",
"private static void escape(String s, StringBuilder sb) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tchar ch = s.charAt(i);\r\n\t\t\tswitch (ch) {\r\n\t\t\tcase '\"':\r\n\t\t\t\tsb.append(\"\\\\\\\"\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\\\':\r\n\t\t\t\tsb.append(\"\\\\\\\\\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\b':\r\n\t\t\t\tsb.append(\"\\\\b\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\f':\r\n\t\t\t\tsb.append(\"\\\\f\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\n':\r\n\t\t\t\tsb.append(\"\\\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\r':\r\n\t\t\t\tsb.append(\"\\\\r\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\t':\r\n\t\t\t\tsb.append(\"\\\\t\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '/':\r\n\t\t\t\tsb.append(\"\\\\/\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif ((ch >= '\\u0000' && ch <= '\\u001F')\r\n\t\t\t\t\t\t|| (ch >= '\\u007F' && ch <= '\\u009F')\r\n\t\t\t\t\t\t|| (ch >= '\\u2000' && ch <= '\\u20FF')) {\r\n\t\t\t\t\tString str = Integer.toHexString(ch);\r\n\t\t\t\t\tsb.append(\"\\\\u\");\r\n\t\t\t\t\tfor (int k = 0; k < 4 - str.length(); k++) {\r\n\t\t\t\t\t\tsb.append('0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsb.append(str.toUpperCase());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(ch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected static String quote(String string) {\n final StringBuilder sb = new StringBuilder(string.length() + 2);\n for (int i = 0; i < string.length(); ++i) {\n final char c = string.charAt(i);\n switch (c) {\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n case '\"':\n sb.append(\"\\\\\\\"\");\n break;\n default:\n sb.append(c);\n break;\n }\n }\n return sb.toString();\n }",
"public static String escape(String input) {\n\t\tboolean insidequote = false;\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tchar current = input.charAt(i);\n\t\t\tif (current == '\\'') {\n\t\t\t\tinsidequote = !insidequote;\n\t\t\t\toutput += current;\n\t\t\t} else if (insidequote) {\n\t\t\t\tif (current == ' ') {\n\t\t\t\t\toutput += \"\\\\s\";\n\t\t\t\t} else if (current == '\\t') {\n\t\t\t\t\toutput += \"\\\\t\";\n\t\t\t\t} else if (current == ',') {\n\t\t\t\t\toutput += \"\\\\c\";\n\t\t\t\t} else if (current == '\\\\') {\n\t\t\t\t\toutput += \"\\\\b\";\n\t\t\t\t} else if (current == ';') {\n\t\t\t\t\toutput += \"\\\\p\";\n\t\t\t\t} else if (current == ':') {\n\t\t\t\t\toutput += \"\\\\d\";\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t} // no uppercase inside quoted strings!\n\t\t\t} else {\n\t\t\t\tif (current == ',') {\n\t\t\t\t\toutput += \" , \"; // add spaces around every comma\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}",
"private String escapedValue(String value) {\n \t\tStringBuffer buf = new StringBuffer(value.length() * 2); // assume expansion by less than factor of 2\n \t\tfor (int i = 0; i < value.length(); i++) {\n \t\t\tchar character = value.charAt(i);\n \t\t\tif (character == '\\\\' || character == '\\t' || character == '\\r' || character == '\\n' || character == '\\f') {\n \t\t\t\t// handle characters requiring leading \\\n \t\t\t\tbuf.append('\\\\');\n \t\t\t\tbuf.append(character);\n \t\t\t} else if ((character < 0x0020) || (character > 0x007e)) {\n \t\t\t\t// handle characters outside base range (encoded)\n \t\t\t\tbuf.append('\\\\');\n \t\t\t\tbuf.append('u');\n \t\t\t\tbuf.append(HEX[(character >> 12) & 0xF]); // first nibble\n \t\t\t\tbuf.append(HEX[(character >> 8) & 0xF]); // second nibble\n \t\t\t\tbuf.append(HEX[(character >> 4) & 0xF]); // third nibble\n \t\t\t\tbuf.append(HEX[character & 0xF]); // fourth nibble\n \t\t\t} else {\n \t\t\t\t// handle base characters\n \t\t\t\tbuf.append(character);\n \t\t\t}\n \t\t}\n \t\treturn buf.toString();\n \t}",
"public static String escapeControlCharactersAndQuotes(CharSequence seq) {\n int len = seq.length();\n StringBuilder sb = new StringBuilder(seq.length() + 1);\n escapeControlCharactersAndQuotes(seq, len, sb);\n return sb.toString();\n }",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}",
"private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"public String getQuoteEscapeCharacter() {\n return this.quoteEscapeCharacter;\n }",
"public static String customEscapeQueryChars(String s) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n // These characters are part of the query syntax and must be escaped\n if (c == '\\\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'\n || c == '^' || c == '[' || c == ']' || c == '\\\"' || c == '{' || c == '}'\n || c == '~' || c == '?' || c == '|' || c == '&' || c == ';' || c == '/'\n || Character.isWhitespace(c)) {\n sb.append('\\\\');\n }\n sb.append(c);\n }\n return sb.toString();\n }",
"@Override\n public String stringify()\n {\n return StringUtils.format(\"\\\"%s\\\"\", StringEscapeUtils.escapeJava(binding));\n }",
"public static String quote(String str) {\n return \"\\\"\" + str.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") + \"\\\"\";\n }",
"public final void mSTRING() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.STRING;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:8: ( '\\\"' ( ESC |\n\t\t\t// ~ ( '\\\\\\\\' | '\\\\n' | '\\\"' ) )* '\\\"' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:10: '\\\"' ( ESC |\n\t\t\t// ~ ( '\\\\\\\\' | '\\\\n' | '\\\"' ) )* '\\\"'\n\t\t\t{\n\t\t\t\tthis.match('\\\"');\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:14: ( ESC | ~\n\t\t\t\t// ( '\\\\\\\\' | '\\\\n' | '\\\"' ) )*\n\t\t\t\tloop3:\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tint alt3 = 3;\n\t\t\t\t\tfinal int LA3_0 = this.input.LA(1);\n\n\t\t\t\t\tif ((LA3_0 == '\\\\'))\n\t\t\t\t\t{\n\t\t\t\t\t\talt3 = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse if (((LA3_0 >= '\\u0000' && LA3_0 <= '\\t')\n\t\t\t\t\t\t\t|| (LA3_0 >= '\\u000B' && LA3_0 <= '!')\n\t\t\t\t\t\t\t|| (LA3_0 >= '#' && LA3_0 <= '[') || (LA3_0 >= ']' && LA3_0 <= '\\uFFFF')))\n\t\t\t\t\t{\n\t\t\t\t\t\talt3 = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt3)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:15:\n\t\t\t\t\t\t// ESC\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mESC();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:19: ~\n\t\t\t\t\t\t// ( '\\\\\\\\' | '\\\\n' | '\\\"' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((this.input.LA(1) >= '\\u0000' && this.input.LA(1) <= '\\t')\n\t\t\t\t\t\t\t\t\t|| (this.input.LA(1) >= '\\u000B' && this.input.LA(1) <= '!')\n\t\t\t\t\t\t\t\t\t|| (this.input.LA(1) >= '#' && this.input.LA(1) <= '[')\n\t\t\t\t\t\t\t\t\t|| (this.input.LA(1) >= ']' && this.input.LA(1) <= '\\uFFFF'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.input.consume();\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfinal MismatchedSetException mse = new MismatchedSetException(null,\n\t\t\t\t\t\t\t\t\t\tthis.input);\n\t\t\t\t\t\t\t\tthis.recover(mse);\n\t\t\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak loop3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (true);\n\n\t\t\t\tthis.match('\\\"');\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }",
"public static final String escape(int count) {\n if (count == 1)\n return ESCAPE;\n return repeat(\"ESCAPE\"/*I18nOK:EMS*/, count);\n }",
"public static String escapeJS(String inText)\n {\n return inText\n .replaceAll(\"(?<!\\\\\\\\)'\", \"\\\\\\\\'\")\n .replaceAll(\"(?<!\\\\\\\\)\\\"\", \"\\\\\\\\\\\"\")\n .replaceAll(\"\\n\", \"\\\\\\\\n\");\n }",
"public PyShadowString() {\n\t\tthis(Py.EmptyString, Py.EmptyString);\n\t}",
"protected String getQuote() {\n return \"\\\"\";\n }",
"private static String convertEscapeChar(String escapeCharacter)\t{\n\t\tString charCode = escapeCharacter.substring(escapeCharacter.indexOf(\"#\")+1);\n\t\treturn \"\" + (char) Integer.parseInt(charCode);\n\t}",
"public static String toEscapedUnicode(String unicodeString)\n\t{\n\t\tint len = unicodeString.length();\n\t\tint bufLen = len * 2;\n\t\tStringBuffer outBuffer = new StringBuffer(bufLen);\n\t\tfor (int x = 0; x < len; x++)\n\t\t{\n\t\t\tchar aChar = unicodeString.charAt(x);\n\t\t\t// Handle common case first, selecting largest block that\n\t\t\t// avoids the specials below\n\t\t\tif ((aChar > 61) && (aChar < 127))\n\t\t\t{\n\t\t\t\tif (aChar == '\\\\')\n\t\t\t\t{\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutBuffer.append(aChar);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (aChar)\n\t\t\t{\n\t\t\t\tcase ' ' :\n\t\t\t\t\tif (x == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t}\n\t\t\t\t\toutBuffer.append(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('t');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('n');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('r');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('f');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '=' : // Fall through\n\t\t\t\tcase ':' : // Fall through\n\t\t\t\tcase '#' : // Fall through\n\t\t\t\tcase '!' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tif ((aChar < 0x0020) || (aChar > 0x007e))\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t\toutBuffer.append('u');\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 12) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 8) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 4) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex(aChar & 0xF));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn outBuffer.toString();\n\t}",
"default HtmlFormatter escapeJava() {\n return andThen(StringEscapeUtils::escapeJava);\n }",
"default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }",
"public static String escape(String value, String escape) {\n String result = value.replace(\"_\", \"_\" + escape);\n result = result.replace(\"%\", \"%\" + escape);\n result = result.replace(escape, escape + escape);\n return result;\n }",
"private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }",
"public final void mString() throws RecognitionException {\n try {\n int _type = String;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /development/json-antlr/grammar/JSON.g:91:9: ( '\\\"' ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )* '\\\"' )\n // /development/json-antlr/grammar/JSON.g:92:2: '\\\"' ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )* '\\\"'\n {\n match('\\\"'); \n // /development/json-antlr/grammar/JSON.g:92:6: ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )*\n loop7:\n do {\n int alt7=3;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0=='\\\\') ) {\n alt7=1;\n }\n else if ( ((LA7_0>=' ' && LA7_0<='!')||(LA7_0>='#' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\\uFFFF')) ) {\n alt7=2;\n }\n\n\n switch (alt7) {\n \tcase 1 :\n \t // /development/json-antlr/grammar/JSON.g:92:8: EscapeSequence\n \t {\n \t mEscapeSequence(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // /development/json-antlr/grammar/JSON.g:92:25: ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' )\n \t {\n \t if ( (input.LA(1)>=' ' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop7;\n }\n } while (true);\n\n match('\\\"'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void backSlash() {\n text.append(\"\\\\\");\n }",
"private static String escape_PN_LOCAL_ESC(String x) {\n\n int N = x.length() ;\n boolean escchar = false ;\n for ( int i = 0 ; i < N ; i++ ) {\n char ch = x.charAt(i) ;\n if ( needsEscape(ch, (i==N-1)) ) {\n escchar = true ;\n break ;\n }\n }\n if ( ! escchar )\n return x ;\n StringBuilder sb = new StringBuilder(N+10) ;\n for ( int i = 0 ; i < N ; i++ ) {\n char ch = x.charAt(i) ;\n // DOT only needs escaping at the end\n if ( needsEscape(ch, (i==N-1) ) )\n sb.append('\\\\') ;\n sb.append(ch) ;\n }\n return sb.toString() ;\n }",
"private static String quote(String text) {\r\n String result;\r\n if (null == text) {\r\n result = text;\r\n } else {\r\n result = \"\\\"\" + text + \"\\\"\";\r\n }\r\n return result;\r\n }",
"public CharacterEscapes getCharacterEscapes()\n/* */ {\n/* 659 */ return this._characterEscapes;\n/* */ }",
"static String uriEscapeString(String unescaped) {\n try {\n return URLEncoder.encode(unescaped, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n // This is fatal.\n throw new RuntimeException(e);\n }\n }",
"static String getStringJsonEscaped(String str) {\n JsonStringEncoder e = JsonStringEncoder.getInstance();\n StringBuilder sb = new StringBuilder();\n e.quoteAsString(str, sb);\n return sb.toString();\n }",
"public final void mUnicodeEscape() throws RecognitionException {\n try {\n // /development/json-antlr/grammar/JSON.g:102:2: ( 'u' HexDigit HexDigit HexDigit HexDigit )\n // /development/json-antlr/grammar/JSON.g:102:4: 'u' HexDigit HexDigit HexDigit HexDigit\n {\n match('u'); \n mHexDigit(); \n mHexDigit(); \n mHexDigit(); \n mHexDigit(); \n\n }\n\n }\n finally {\n }\n }",
"public static String unicodeEscape(char ch)\n {\n if (ch < 0x10)\n {\n return \"\\\\u000\" + Integer.toHexString(ch);\n }\n else if (ch < 0x100)\n {\n return \"\\\\u00\" + Integer.toHexString(ch);\n }\n else if (ch < 0x1000)\n {\n return \"\\\\u0\" + Integer.toHexString(ch);\n }\n\n return \"\\\\u\" + Integer.toHexString(ch);\n }",
"public void quote() {\n text.append(\"\\'\");\n }"
] |
[
"0.67240864",
"0.6712284",
"0.65581965",
"0.6554843",
"0.6491983",
"0.64278424",
"0.6407616",
"0.6395089",
"0.6374999",
"0.6359749",
"0.6245641",
"0.6245363",
"0.6231798",
"0.61681324",
"0.6153607",
"0.61365235",
"0.61315715",
"0.6112034",
"0.610833",
"0.6085438",
"0.6069314",
"0.60650885",
"0.60478026",
"0.60209525",
"0.5980543",
"0.59692454",
"0.592249",
"0.591759",
"0.58826864",
"0.58758855",
"0.5865219",
"0.5856959",
"0.584515",
"0.5802697",
"0.579812",
"0.57746726",
"0.5747717",
"0.5735783",
"0.5721303",
"0.57203",
"0.56878865",
"0.5674566",
"0.56666124",
"0.56634206",
"0.56046695",
"0.55929214",
"0.55712706",
"0.55567616",
"0.55553025",
"0.5538726",
"0.5517253",
"0.5511126",
"0.5490574",
"0.54835933",
"0.5466061",
"0.546099",
"0.5451347",
"0.54472107",
"0.54398334",
"0.54327303",
"0.54302466",
"0.5425418",
"0.54241616",
"0.54240066",
"0.542396",
"0.53832877",
"0.5375291",
"0.5374163",
"0.53680766",
"0.5362106",
"0.5361727",
"0.535941",
"0.5356507",
"0.5340637",
"0.5336189",
"0.5334032",
"0.5300387",
"0.528656",
"0.5266651",
"0.5256518",
"0.5255962",
"0.52541953",
"0.525159",
"0.5250223",
"0.5245218",
"0.523591",
"0.52352893",
"0.52350366",
"0.5231095",
"0.52287465",
"0.52211595",
"0.51931417",
"0.5179132",
"0.51718426",
"0.5145421",
"0.5139925",
"0.51085997",
"0.51008797",
"0.5093618",
"0.5092617"
] |
0.66406935
|
2
|
Create a StringEscape instance that uses the specified escape character.
|
public StringEscape(final Map<Character, Character> mapping, final char escape) {
this.escape = escape;
this.unescapeMap = MapTool.unmodifiableCopy(mapping);
this.escapeMap = Collections.unmodifiableMap(MapTool.reverse(mapping));
controlCharacters = SetTool.unmodifiableCopy(mapping.keySet());
stringCharacters = SetTool.unmodifiableCopy(mapping.values());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"CharSequence escape(char c);",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"public static String escapeString(String string, char escape, String charsToEscape) {\n\t int len = string.length();\n\t StringBuilder res = new StringBuilder(len + 5);\n\t escapeStringToBuf(string, escape, charsToEscape, res);\n\t return res.length()==len ? string : res.toString();\n }",
"public StringEscape(final Map<Character, Character> mapping) {\n\t\tthis(mapping, '\\\\');\n\t}",
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"String escChr(char pChar) throws Exception;",
"public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"EscapeStatement createEscapeStatement();",
"public JsonFactory setCharacterEscapes(CharacterEscapes esc)\n/* */ {\n/* 666 */ this._characterEscapes = esc;\n/* 667 */ return this;\n/* */ }",
"public static String escapeString(String str) {\n return escapeString(str, 0xf423f);\n\t}",
"public static String escapeChar(String text, char ch) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar prevCh = 0;\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == ch) {\n\t\t\t\tif (prevCh != '\\\\') { // Only escape if the character isn't already escaped.\n\t\t\t\t\tsb.append('\\\\'); // Escape the character\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(chars[i]);\n\t\t\tprevCh = chars[i];\n\t\t}\n\t\tString newText = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn newText;\n\t}",
"private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }",
"default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }",
"private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }",
"public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}",
"protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }",
"private static String convertEscapeChar(String escapeCharacter)\t{\n\t\tString charCode = escapeCharacter.substring(escapeCharacter.indexOf(\"#\")+1);\n\t\treturn \"\" + (char) Integer.parseInt(charCode);\n\t}",
"private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }",
"public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }",
"public static String unicodeEscaped(char ch) {\n/* 353 */ if (ch < '\\020')\n/* 354 */ return \"\\\\u000\" + Integer.toHexString(ch); \n/* 355 */ if (ch < 'Ā')\n/* 356 */ return \"\\\\u00\" + Integer.toHexString(ch); \n/* 357 */ if (ch < 'က') {\n/* 358 */ return \"\\\\u0\" + Integer.toHexString(ch);\n/* */ }\n/* 360 */ return \"\\\\u\" + Integer.toHexString(ch);\n/* */ }",
"public static String escapeRegexChar(char c) {\n return (META_CHARS.contains(c) ? \"\\\\\" : \"\") + c;\n }",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}",
"public static void escapeStringToBuf(String string, char escape, String charsToEscape, StringBuilder buf) {\n\t int len = string.length();\n\t for (int i=0; i<len; i++) {\n\t\t char chr = string.charAt(i);\n\t\t if (chr==escape || charsToEscape.indexOf(chr) >= 0) buf.append(escape);\n\t\t buf.append(chr);\n\t }\n }",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}",
"static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}",
"public static String unicodeEscaped(Character ch) {\n/* 380 */ if (ch == null) {\n/* 381 */ return null;\n/* */ }\n/* 383 */ return unicodeEscaped(ch.charValue());\n/* */ }",
"private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }",
"char unescChr(String pEscaped) throws Exception;",
"public String escape(final String input) {\n\t\tStringBuilder builder = new StringBuilder(input);\n\t\tescape(builder);\n\t\treturn builder.toString();\n\t}",
"private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }",
"public static String escape(String source) {\n return escape(source, -1, true);\n }",
"public static String unicodeEscape(char ch)\n {\n if (ch < 0x10)\n {\n return \"\\\\u000\" + Integer.toHexString(ch);\n }\n else if (ch < 0x100)\n {\n return \"\\\\u00\" + Integer.toHexString(ch);\n }\n else if (ch < 0x1000)\n {\n return \"\\\\u0\" + Integer.toHexString(ch);\n }\n\n return \"\\\\u\" + Integer.toHexString(ch);\n }",
"protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }",
"private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }",
"@Test\n void should_describe_escaped_chars() {\n final char backspace = 8;\n final char tab = 9;\n final char lineFeed = 10;\n final char carriageReturn = 13;\n final char doubleQuote = 0x22;\n final char singleQuote = 0x27;\n final char backslash = 0x5C;\n // --end-->\n\n assertEquals(EscapedChars.BACKSPACE.getValue(), backspace);\n assertEquals(EscapedChars.TAB.getValue(), tab);\n assertEquals(EscapedChars.LINE_FEED.getValue(), lineFeed);\n assertEquals(EscapedChars.CARRIAGE_RETURN.getValue(), carriageReturn);\n assertEquals(EscapedChars.DOUBLE_QUOTE.getValue(), doubleQuote);\n assertEquals(EscapedChars.SINGLE_QUOTE.getValue(), singleQuote);\n assertEquals(EscapedChars.BACKSLASH.getValue(), backslash);\n }",
"public static String escape(final Object self, final Object string) {\n final String str = JSType.toString(string);\n final int length = str.length();\n\n if (length == 0) {\n return str;\n }\n\n final StringBuilder sb = new StringBuilder();\n for (int k = 0; k < length; k++) {\n final char ch = str.charAt(k);\n if (UNESCAPED.indexOf(ch) != -1) {\n sb.append(ch);\n } else if (ch < 256) {\n sb.append('%');\n if (ch < 16) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n } else {\n sb.append(\"%u\");\n if (ch < 4096) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n }\n }\n\n return sb.toString();\n }",
"default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"public final void mEscapeSequence() throws RecognitionException {\n try {\n // /development/json-antlr/grammar/JSON.g:98:6: ( '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' ) )\n // /development/json-antlr/grammar/JSON.g:98:10: '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n {\n match('\\\\'); \n // /development/json-antlr/grammar/JSON.g:98:15: ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n int alt9=10;\n switch ( input.LA(1) ) {\n case 'u':\n {\n alt9=1;\n }\n break;\n case 'b':\n {\n alt9=2;\n }\n break;\n case 't':\n {\n alt9=3;\n }\n break;\n case 'n':\n {\n alt9=4;\n }\n break;\n case 'f':\n {\n alt9=5;\n }\n break;\n case 'r':\n {\n alt9=6;\n }\n break;\n case '\\\"':\n {\n alt9=7;\n }\n break;\n case '\\'':\n {\n alt9=8;\n }\n break;\n case '\\\\':\n {\n alt9=9;\n }\n break;\n case '/':\n {\n alt9=10;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n }\n\n switch (alt9) {\n case 1 :\n // /development/json-antlr/grammar/JSON.g:98:16: UnicodeEscape\n {\n mUnicodeEscape(); \n\n }\n break;\n case 2 :\n // /development/json-antlr/grammar/JSON.g:98:31: 'b'\n {\n match('b'); \n\n }\n break;\n case 3 :\n // /development/json-antlr/grammar/JSON.g:98:35: 't'\n {\n match('t'); \n\n }\n break;\n case 4 :\n // /development/json-antlr/grammar/JSON.g:98:39: 'n'\n {\n match('n'); \n\n }\n break;\n case 5 :\n // /development/json-antlr/grammar/JSON.g:98:43: 'f'\n {\n match('f'); \n\n }\n break;\n case 6 :\n // /development/json-antlr/grammar/JSON.g:98:47: 'r'\n {\n match('r'); \n\n }\n break;\n case 7 :\n // /development/json-antlr/grammar/JSON.g:98:51: '\\\\\\\"'\n {\n match('\\\"'); \n\n }\n break;\n case 8 :\n // /development/json-antlr/grammar/JSON.g:98:56: '\\\\''\n {\n match('\\''); \n\n }\n break;\n case 9 :\n // /development/json-antlr/grammar/JSON.g:98:61: '\\\\\\\\'\n {\n match('\\\\'); \n\n }\n break;\n case 10 :\n // /development/json-antlr/grammar/JSON.g:98:66: '\\\\/'\n {\n match('/'); \n\n }\n break;\n\n }\n\n\n }\n\n }\n finally {\n }\n }",
"private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }",
"public static String escape(String s) {\r\n if (s == null)\r\n return null;\r\n StringBuffer sb = new StringBuffer();\r\n escape(s, sb);\r\n return sb.toString();\r\n }",
"String escStr(String pSource) throws Exception;",
"private void createString() {\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length && data[currentIndex] != '\"') {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tif (currentIndex >= data.length) {\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\n\t\t\t\tswitch (data[currentIndex]) {\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'n':\n\t\t\t\t\tvalue += '\\n';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\tvalue += '\\r';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 't':\n\t\t\t\t\tvalue += '\\t';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t}\n\t\t}\n\n\t\tif (currentIndex < data.length) {\n\t\t\tvalue += data[currentIndex++];\n\t\t} else {\n\t\t\tthrow new LexerException(\"Missing end: \\\".\");\n\t\t}\n\n\t\ttoken = new Token(TokenType.STRING, value);\n\t}",
"default String escapeString(final String input) {\n return noQuestion(GedRenderer.escapeString(input)).trim();\n }",
"public interface EscapeMarker {}",
"private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}",
"private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}",
"public static String escape(String source, int delimiter,\n boolean escapeQuote) {\n\n /*\n * If the source has any chars that need to be escaped, allocate a\n * new buffer and copy into it.\n * Allocate a new buffer iff source has any chars that need to\n * be esacaped.\n * Allocate enough so that the java buffer manager need not re-allocate\n * the buffer. Worst case is that all chars in the string need to be\n * escaped, resulting in twice the source length\n */\n int currpos = 0;\n StringBuffer result = null;\n // the default delimiter in COPY format is tab '\\t'\n boolean escapeDelimiter = false;\n // check if the user specified a custom delimiter\n if (delimiter != -1) {\n escapeDelimiter = true;\n }\n\n for (char ch : source.toCharArray()) {\n switch (ch) {\n case '\\\\':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\\\\\\");\n break;\n case '\\n':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\n\");\n break;\n case '\\r':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\r\");\n break;\n case '\\t':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\t\");\n break;\n case '\\b':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\b\");\n break;\n case '\\f':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\f\");\n break;\n case '\\'':\n if (escapeQuote) {\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"''\");\n break;\n }\n // Fall through to default otherwise\n default:\n if (result != null) {\n if (escapeDelimiter && ch == delimiter) {\n result.append(\"\\\\\");\n result.append(delimiter);\n } else {\n result.append(ch);\n }\n }\n else if (escapeDelimiter && ch == delimiter) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n result.append(\"\\\\\");\n result.append(delimiter);\n }\n }\n currpos++;\n }\n if (result != null) {\n return result.toString();\n } else {\n return source;\n }\n }",
"public static String unicodeEscape(String input, boolean escapeSpaces)\n {\n if (input == null)\n {\n return null;\n }\n\n StringBuilder builder = new StringBuilder();\n boolean changed = false;\n int length = input.length();\n for (int i = 0; i < length; i++)\n {\n char c = input.charAt(i);\n\n if (c < ' ')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c == ' ' && escapeSpaces)\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c > '~')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n builder.append(c);\n }\n\n if (!changed)\n {\n return input;\n }\n\n return builder.toString();\n }",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"<C> StringLiteralExp<C> createStringLiteralExp();",
"default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }",
"private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }",
"public static final String escape(int count) {\n if (count == 1)\n return ESCAPE;\n return repeat(\"ESCAPE\"/*I18nOK:EMS*/, count);\n }",
"public final void mUnicodeEscape() throws RecognitionException {\n try {\n // /development/json-antlr/grammar/JSON.g:102:2: ( 'u' HexDigit HexDigit HexDigit HexDigit )\n // /development/json-antlr/grammar/JSON.g:102:4: 'u' HexDigit HexDigit HexDigit HexDigit\n {\n match('u'); \n mHexDigit(); \n mHexDigit(); \n mHexDigit(); \n mHexDigit(); \n\n }\n\n }\n finally {\n }\n }",
"public void setQuoteEscapeCharacter(String quoteEscapeCharacter) {\n this.quoteEscapeCharacter = quoteEscapeCharacter;\n }",
"public DateTimeFormatterBuilder appendLiteral(char c) {\r\n return append0(new CharacterLiteral(c));\r\n }",
"private static Appendable writeString(Appendable buffer, String s, char quote) {\n append(buffer, quote);\n int len = s.length();\n for (int i = 0; i < len; i++) {\n char c = s.charAt(i);\n escapeCharacter(buffer, c, quote);\n }\n return append(buffer, quote);\n }",
"public static String toEscapedUnicode(String unicodeString)\n\t{\n\t\tint len = unicodeString.length();\n\t\tint bufLen = len * 2;\n\t\tStringBuffer outBuffer = new StringBuffer(bufLen);\n\t\tfor (int x = 0; x < len; x++)\n\t\t{\n\t\t\tchar aChar = unicodeString.charAt(x);\n\t\t\t// Handle common case first, selecting largest block that\n\t\t\t// avoids the specials below\n\t\t\tif ((aChar > 61) && (aChar < 127))\n\t\t\t{\n\t\t\t\tif (aChar == '\\\\')\n\t\t\t\t{\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutBuffer.append(aChar);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (aChar)\n\t\t\t{\n\t\t\t\tcase ' ' :\n\t\t\t\t\tif (x == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t}\n\t\t\t\t\toutBuffer.append(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('t');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('n');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('r');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('f');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '=' : // Fall through\n\t\t\t\tcase ':' : // Fall through\n\t\t\t\tcase '#' : // Fall through\n\t\t\t\tcase '!' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tif ((aChar < 0x0020) || (aChar > 0x007e))\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t\toutBuffer.append('u');\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 12) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 8) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 4) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex(aChar & 0xF));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn outBuffer.toString();\n\t}",
"public static String encodeJsString(String s) throws Exception {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"\\\"\");\r\n for (Character c : s.toCharArray())\r\n {\r\n switch(c)\r\n {\r\n case '\\\"': \r\n sb.append(\"\\\\\\\"\");\r\n break;\r\n case '\\\\': \r\n sb.append(\"\\\\\\\\\");\r\n break;\r\n case '\\b': \r\n sb.append(\"\\\\b\");\r\n break;\r\n case '\\f': \r\n sb.append(\"\\\\f\");\r\n break;\r\n case '\\n': \r\n sb.append(\"\\\\n\");\r\n break;\r\n case '\\r': \r\n sb.append(\"\\\\r\");\r\n break;\r\n case '\\t': \r\n sb.append(\"\\\\t\");\r\n break;\r\n default: \r\n Int32 i = (int)c;\r\n if (i < 32 || i > 127)\r\n {\r\n sb.append(String.format(StringSupport.CSFmtStrToJFmtStr(\"\\\\u{0:X04}\"),i));\r\n }\r\n else\r\n {\r\n sb.append(c);\r\n } \r\n break;\r\n \r\n }\r\n }\r\n sb.append(\"\\\"\");\r\n return sb.toString();\r\n }",
"public static String escape(String value, String escape) {\n String result = value.replace(\"_\", \"_\" + escape);\n result = result.replace(\"%\", \"%\" + escape);\n result = result.replace(escape, escape + escape);\n return result;\n }",
"public final void mString() throws RecognitionException {\n try {\n int _type = String;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /development/json-antlr/grammar/JSON.g:91:9: ( '\\\"' ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )* '\\\"' )\n // /development/json-antlr/grammar/JSON.g:92:2: '\\\"' ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )* '\\\"'\n {\n match('\\\"'); \n // /development/json-antlr/grammar/JSON.g:92:6: ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )*\n loop7:\n do {\n int alt7=3;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0=='\\\\') ) {\n alt7=1;\n }\n else if ( ((LA7_0>=' ' && LA7_0<='!')||(LA7_0>='#' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\\uFFFF')) ) {\n alt7=2;\n }\n\n\n switch (alt7) {\n \tcase 1 :\n \t // /development/json-antlr/grammar/JSON.g:92:8: EscapeSequence\n \t {\n \t mEscapeSequence(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // /development/json-antlr/grammar/JSON.g:92:25: ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' )\n \t {\n \t if ( (input.LA(1)>=' ' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop7;\n }\n } while (true);\n\n match('\\\"'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"public static String decodeEscapes(String inString)\n {\n String []parts = inString.split(s_marker);\n\n StringBuilder result = new StringBuilder(parts[0]);\n\n for(int i = 1; i < parts.length; i += 2)\n {\n int escape = Integer.parseInt(parts[i]);\n\n result.append(s_escapes.charAt(escape));\n\n if(i + 1 < parts.length)\n result.append(parts[i + 1]);\n }\n\n return result.toString();\n }",
"private static String escapeJavaString(String input)\n {\n int len = input.length();\n // assume (for performance, not for correctness) that string will not expand by more than 10 chars\n StringBuilder out = new StringBuilder(len + 10);\n for (int i = 0; i < len; i++) {\n char c = input.charAt(i);\n if (c >= 32 && c <= 0x7f) {\n if (c == '\"') {\n out.append('\\\\');\n out.append('\"');\n } else if (c == '\\\\') {\n out.append('\\\\');\n out.append('\\\\');\n } else {\n out.append(c);\n }\n } else {\n out.append('\\\\');\n out.append('u');\n // one liner hack to have the hex string of length exactly 4\n out.append(Integer.toHexString(c | 0x10000).substring(1));\n }\n }\n return out.toString();\n }",
"public static String escapeControlCharactersAndQuotes(CharSequence seq) {\n int len = seq.length();\n StringBuilder sb = new StringBuilder(seq.length() + 1);\n escapeControlCharactersAndQuotes(seq, len, sb);\n return sb.toString();\n }",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"public String getQuoteEscapeCharacter() {\n return this.quoteEscapeCharacter;\n }",
"private static String escape(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tescape(s, sb);\r\n\t\treturn sb.toString();\r\n\t}",
"private\n static\n void\n appendUnicodeEscape( char ch,\n StringBuilder sb )\n {\n sb.append( \"\\\\u\" );\n\n String numStr = Integer.toString( ch, 16 );\n\n if ( ch <= '\\u000F' ) sb.append( \"000\" );\n else if ( ch <= '\\u00FF' ) sb.append( \"00\" );\n else if ( ch <= '\\u0FFF' ) sb.append( \"0\" );\n\n sb.append( Integer.toString( ch, 16 ) );\n }",
"StringLiteralExp createStringLiteralExp();",
"public final void mSTRING() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.STRING;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:8: ( '\\\"' ( ESC |\n\t\t\t// ~ ( '\\\\\\\\' | '\\\\n' | '\\\"' ) )* '\\\"' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:10: '\\\"' ( ESC |\n\t\t\t// ~ ( '\\\\\\\\' | '\\\\n' | '\\\"' ) )* '\\\"'\n\t\t\t{\n\t\t\t\tthis.match('\\\"');\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:14: ( ESC | ~\n\t\t\t\t// ( '\\\\\\\\' | '\\\\n' | '\\\"' ) )*\n\t\t\t\tloop3:\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tint alt3 = 3;\n\t\t\t\t\tfinal int LA3_0 = this.input.LA(1);\n\n\t\t\t\t\tif ((LA3_0 == '\\\\'))\n\t\t\t\t\t{\n\t\t\t\t\t\talt3 = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse if (((LA3_0 >= '\\u0000' && LA3_0 <= '\\t')\n\t\t\t\t\t\t\t|| (LA3_0 >= '\\u000B' && LA3_0 <= '!')\n\t\t\t\t\t\t\t|| (LA3_0 >= '#' && LA3_0 <= '[') || (LA3_0 >= ']' && LA3_0 <= '\\uFFFF')))\n\t\t\t\t\t{\n\t\t\t\t\t\talt3 = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (alt3)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:15:\n\t\t\t\t\t\t// ESC\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mESC();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:774:19: ~\n\t\t\t\t\t\t// ( '\\\\\\\\' | '\\\\n' | '\\\"' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ((this.input.LA(1) >= '\\u0000' && this.input.LA(1) <= '\\t')\n\t\t\t\t\t\t\t\t\t|| (this.input.LA(1) >= '\\u000B' && this.input.LA(1) <= '!')\n\t\t\t\t\t\t\t\t\t|| (this.input.LA(1) >= '#' && this.input.LA(1) <= '[')\n\t\t\t\t\t\t\t\t\t|| (this.input.LA(1) >= ']' && this.input.LA(1) <= '\\uFFFF'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.input.consume();\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfinal MismatchedSetException mse = new MismatchedSetException(null,\n\t\t\t\t\t\t\t\t\t\tthis.input);\n\t\t\t\t\t\t\t\tthis.recover(mse);\n\t\t\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak loop3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (true);\n\n\t\t\t\tthis.match('\\\"');\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"public static String escape(String input) {\n\t\tboolean insidequote = false;\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tchar current = input.charAt(i);\n\t\t\tif (current == '\\'') {\n\t\t\t\tinsidequote = !insidequote;\n\t\t\t\toutput += current;\n\t\t\t} else if (insidequote) {\n\t\t\t\tif (current == ' ') {\n\t\t\t\t\toutput += \"\\\\s\";\n\t\t\t\t} else if (current == '\\t') {\n\t\t\t\t\toutput += \"\\\\t\";\n\t\t\t\t} else if (current == ',') {\n\t\t\t\t\toutput += \"\\\\c\";\n\t\t\t\t} else if (current == '\\\\') {\n\t\t\t\t\toutput += \"\\\\b\";\n\t\t\t\t} else if (current == ';') {\n\t\t\t\t\toutput += \"\\\\p\";\n\t\t\t\t} else if (current == ':') {\n\t\t\t\t\toutput += \"\\\\d\";\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t} // no uppercase inside quoted strings!\n\t\t\t} else {\n\t\t\t\tif (current == ',') {\n\t\t\t\t\toutput += \" , \"; // add spaces around every comma\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"public CharacterEscapes getCharacterEscapes()\n/* */ {\n/* 659 */ return this._characterEscapes;\n/* */ }",
"public final void mRULE_LITERAL_CHAR() throws RecognitionException {\n try {\n // InternalUniMapperGenerator.g:5117:28: ( ( RULE_ESC | ~ ( ( '\\\\'' | '\\\\\\\\' ) ) ) )\n // InternalUniMapperGenerator.g:5117:30: ( RULE_ESC | ~ ( ( '\\\\'' | '\\\\\\\\' ) ) )\n {\n // InternalUniMapperGenerator.g:5117:30: ( RULE_ESC | ~ ( ( '\\\\'' | '\\\\\\\\' ) ) )\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0=='\\\\') ) {\n alt7=1;\n }\n else if ( ((LA7_0>='\\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\\uFFFF')) ) {\n alt7=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 7, 0, input);\n\n throw nvae;\n }\n switch (alt7) {\n case 1 :\n // InternalUniMapperGenerator.g:5117:31: RULE_ESC\n {\n mRULE_ESC(); \n\n }\n break;\n case 2 :\n // InternalUniMapperGenerator.g:5117:40: ~ ( ( '\\\\'' | '\\\\\\\\' ) )\n {\n if ( (input.LA(1)>='\\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n\n }\n\n }\n finally {\n }\n }",
"public static String escapeRegexReservedCharacters(String stringWithReservedCharacters) {\n String reservedSymbols = \"{([*+^?<>$.|])}\";\n StringBuilder escapedStringBuilder = new StringBuilder();\n\n for (char character : stringWithReservedCharacters.toCharArray()) {\n if (reservedSymbols.contains(String.valueOf(character)))\n escapedStringBuilder.append(\"\\\\\");\n\n escapedStringBuilder.append(character);\n }\n\n return escapedStringBuilder.toString();\n }",
"private static void escape(String s, StringBuilder sb) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tchar ch = s.charAt(i);\r\n\t\t\tswitch (ch) {\r\n\t\t\tcase '\"':\r\n\t\t\t\tsb.append(\"\\\\\\\"\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\\\':\r\n\t\t\t\tsb.append(\"\\\\\\\\\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\b':\r\n\t\t\t\tsb.append(\"\\\\b\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\f':\r\n\t\t\t\tsb.append(\"\\\\f\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\n':\r\n\t\t\t\tsb.append(\"\\\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\r':\r\n\t\t\t\tsb.append(\"\\\\r\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\t':\r\n\t\t\t\tsb.append(\"\\\\t\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '/':\r\n\t\t\t\tsb.append(\"\\\\/\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif ((ch >= '\\u0000' && ch <= '\\u001F')\r\n\t\t\t\t\t\t|| (ch >= '\\u007F' && ch <= '\\u009F')\r\n\t\t\t\t\t\t|| (ch >= '\\u2000' && ch <= '\\u20FF')) {\r\n\t\t\t\t\tString str = Integer.toHexString(ch);\r\n\t\t\t\t\tsb.append(\"\\\\u\");\r\n\t\t\t\t\tfor (int k = 0; k < 4 - str.length(); k++) {\r\n\t\t\t\t\t\tsb.append('0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsb.append(str.toUpperCase());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(ch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static String escapeString(String str, int length) {\n if (str == null)\n \treturn \"\";\n if (str.length() > length)\n \tstr = str.substring(0, length);\n StringTokenizer st = new StringTokenizer(str, \"'\");\n StringBuffer buffer = null;\n for (; st.hasMoreTokens(); buffer.append(st.nextToken()))\n \tif (buffer == null)\n \t\tbuffer = new StringBuffer(str.length() + 20);\n \telse\n \t\tbuffer.append(\"\\'\");\n\n if (buffer == null)\n \treturn str;\n else\n \treturn buffer.toString();\n\t}",
"public static void escapeControlCharactersAndQuotes(CharSequence seq, StringBuilder into) {\n escapeControlCharactersAndQuotes(seq, seq.length(), into);\n }",
"public static String customEscapeQueryChars(String s) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n // These characters are part of the query syntax and must be escaped\n if (c == '\\\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'\n || c == '^' || c == '[' || c == ']' || c == '\\\"' || c == '{' || c == '}'\n || c == '~' || c == '?' || c == '|' || c == '&' || c == ';' || c == '/'\n || Character.isWhitespace(c)) {\n sb.append('\\\\');\n }\n sb.append(c);\n }\n return sb.toString();\n }",
"public static void escapeLikeValue(StringBuilder sb, String value, char escapeChar) {\n for (int i = 0; i < value.length(); i++) {\n char ch = value.charAt(i);\n if (ch == '%' || ch == '_') {\n sb.append(escapeChar);\n }\n sb.append(ch);\n }\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"protected String getEscapedUri(String uriToEscape) {\r\n\t\treturn UriComponent.encode(uriToEscape, UriComponent.Type.PATH_SEGMENT);\r\n\t}",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }",
"private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}",
"public String escape(String source) {\r\n\t\treturn null;\r\n\t}",
"public static StringLiteral fromLiteralValue (String pValue)\n {\n return new StringLiteral (pValue);\n }",
"public PyShadowString() {\n\t\tthis(Py.EmptyString, Py.EmptyString);\n\t}",
"public static CharSequence escapeMarkup(final String s, final boolean escapeSpaces)\n\t{\n\t\treturn escapeMarkup(s, escapeSpaces, false);\n\t}",
"public final void mCHAR() throws RecognitionException {\n try {\n int _type = CHAR;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // metamorph.runtime/src/antlr/Ast.g:43:5: ( '\\\\'' ( ESC_SEQ |~ ( '\\\\'' | '\\\\\\\\' ) ) '\\\\'' )\n // metamorph.runtime/src/antlr/Ast.g:43:8: '\\\\'' ( ESC_SEQ |~ ( '\\\\'' | '\\\\\\\\' ) ) '\\\\''\n {\n match('\\''); \n\n // metamorph.runtime/src/antlr/Ast.g:43:13: ( ESC_SEQ |~ ( '\\\\'' | '\\\\\\\\' ) )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='\\\\') ) {\n alt4=1;\n }\n else if ( ((LA4_0 >= '\\u0000' && LA4_0 <= '&')||(LA4_0 >= '(' && LA4_0 <= '[')||(LA4_0 >= ']' && LA4_0 <= '\\uFFFF')) ) {\n alt4=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n\n }\n switch (alt4) {\n case 1 :\n // metamorph.runtime/src/antlr/Ast.g:43:15: ESC_SEQ\n {\n mESC_SEQ(); \n\n\n }\n break;\n case 2 :\n // metamorph.runtime/src/antlr/Ast.g:43:25: ~ ( '\\\\'' | '\\\\\\\\' )\n {\n if ( (input.LA(1) >= '\\u0000' && input.LA(1) <= '&')||(input.LA(1) >= '(' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\\uFFFF') ) {\n input.consume();\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;\n }\n\n\n }\n break;\n\n }\n\n\n match('\\''); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }",
"public interface HtmlEscaper {\n String escape(String string);\n}",
"private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }"
] |
[
"0.6707864",
"0.6175182",
"0.61271816",
"0.6088766",
"0.59815973",
"0.5943486",
"0.58475435",
"0.5840952",
"0.58223677",
"0.57923216",
"0.56817526",
"0.5658697",
"0.5640833",
"0.5624483",
"0.5607078",
"0.55906606",
"0.5570711",
"0.5526348",
"0.5524416",
"0.5517991",
"0.55084723",
"0.5494358",
"0.5486609",
"0.54812026",
"0.54341793",
"0.53401303",
"0.5336262",
"0.5287324",
"0.5264453",
"0.52643883",
"0.5256406",
"0.5246617",
"0.52461255",
"0.5238917",
"0.5184191",
"0.5174007",
"0.5148028",
"0.5086475",
"0.508385",
"0.5083502",
"0.5082314",
"0.50735927",
"0.50694823",
"0.50666237",
"0.50589913",
"0.50220746",
"0.501468",
"0.500708",
"0.49840778",
"0.49768025",
"0.49731585",
"0.49622366",
"0.49504715",
"0.4943089",
"0.49410278",
"0.4927831",
"0.49026325",
"0.4899204",
"0.48938414",
"0.48766273",
"0.4874683",
"0.48544082",
"0.48370838",
"0.48300046",
"0.48129565",
"0.4798218",
"0.4794735",
"0.47912616",
"0.4787213",
"0.4768762",
"0.47639248",
"0.47610033",
"0.4758671",
"0.47557455",
"0.47554913",
"0.4751981",
"0.47255757",
"0.47096574",
"0.46815062",
"0.46796575",
"0.4656974",
"0.46537977",
"0.46426633",
"0.46105057",
"0.46038565",
"0.45817268",
"0.45497105",
"0.4542898",
"0.45332077",
"0.45294806",
"0.45293647",
"0.45289263",
"0.4526517",
"0.45241237",
"0.45157903",
"0.45104015",
"0.4509061",
"0.45053306",
"0.44921944",
"0.44830042"
] |
0.60204476
|
4
|
Escapes all occurrences of string characters in a String.
|
public String escape(final String input) {
StringBuilder builder = new StringBuilder(input);
escape(builder);
return builder.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"public String escapeSpetialCharecters(String string)\r\n {\r\n return string.replaceAll(\"(?=[]\\\\[+&|!(){}^\\\"~*?:\\\\\\\\-])\", \"\\\\\\\\\");\r\n }",
"private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }",
"public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}",
"public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}",
"private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }",
"protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }",
"public static String escapeString(String string, char escape, String charsToEscape) {\n\t int len = string.length();\n\t StringBuilder res = new StringBuilder(len + 5);\n\t escapeStringToBuf(string, escape, charsToEscape, res);\n\t return res.length()==len ? string : res.toString();\n }",
"public static String customEscapeQueryChars(String s) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n // These characters are part of the query syntax and must be escaped\n if (c == '\\\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'\n || c == '^' || c == '[' || c == ']' || c == '\\\"' || c == '{' || c == '}'\n || c == '~' || c == '?' || c == '|' || c == '&' || c == ';' || c == '/'\n || Character.isWhitespace(c)) {\n sb.append('\\\\');\n }\n sb.append(c);\n }\n return sb.toString();\n }",
"public static String escapeString(String str) {\n return escapeString(str, 0xf423f);\n\t}",
"private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}",
"public static String escapeRegexReservedCharacters(String stringWithReservedCharacters) {\n String reservedSymbols = \"{([*+^?<>$.|])}\";\n StringBuilder escapedStringBuilder = new StringBuilder();\n\n for (char character : stringWithReservedCharacters.toCharArray()) {\n if (reservedSymbols.contains(String.valueOf(character)))\n escapedStringBuilder.append(\"\\\\\");\n\n escapedStringBuilder.append(character);\n }\n\n return escapedStringBuilder.toString();\n }",
"public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }",
"private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}",
"public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }",
"CharSequence escape(char c);",
"public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }",
"private static String handleEscapes(String s) {\n final String UNLIKELY_STRING = \"___~~~~$$$$___\";\n return s.replace(\"\\\\\\\\\", UNLIKELY_STRING).replace(\"\\\\\", \"\").replace(UNLIKELY_STRING, \"\\\\\");\n }",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"private static void escape(String s, StringBuilder sb) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tchar ch = s.charAt(i);\r\n\t\t\tswitch (ch) {\r\n\t\t\tcase '\"':\r\n\t\t\t\tsb.append(\"\\\\\\\"\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\\\':\r\n\t\t\t\tsb.append(\"\\\\\\\\\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\b':\r\n\t\t\t\tsb.append(\"\\\\b\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\f':\r\n\t\t\t\tsb.append(\"\\\\f\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\n':\r\n\t\t\t\tsb.append(\"\\\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\r':\r\n\t\t\t\tsb.append(\"\\\\r\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\t':\r\n\t\t\t\tsb.append(\"\\\\t\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '/':\r\n\t\t\t\tsb.append(\"\\\\/\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif ((ch >= '\\u0000' && ch <= '\\u001F')\r\n\t\t\t\t\t\t|| (ch >= '\\u007F' && ch <= '\\u009F')\r\n\t\t\t\t\t\t|| (ch >= '\\u2000' && ch <= '\\u20FF')) {\r\n\t\t\t\t\tString str = Integer.toHexString(ch);\r\n\t\t\t\t\tsb.append(\"\\\\u\");\r\n\t\t\t\t\tfor (int k = 0; k < 4 - str.length(); k++) {\r\n\t\t\t\t\t\tsb.append('0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsb.append(str.toUpperCase());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(ch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }",
"public static String escape(String s) {\r\n if (s == null)\r\n return null;\r\n StringBuffer sb = new StringBuffer();\r\n escape(s, sb);\r\n return sb.toString();\r\n }",
"private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }",
"public static String escape(final Object self, final Object string) {\n final String str = JSType.toString(string);\n final int length = str.length();\n\n if (length == 0) {\n return str;\n }\n\n final StringBuilder sb = new StringBuilder();\n for (int k = 0; k < length; k++) {\n final char ch = str.charAt(k);\n if (UNESCAPED.indexOf(ch) != -1) {\n sb.append(ch);\n } else if (ch < 256) {\n sb.append('%');\n if (ch < 16) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n } else {\n sb.append(\"%u\");\n if (ch < 4096) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n }\n }\n\n return sb.toString();\n }",
"public static String escape(String input) {\n\t\tboolean insidequote = false;\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tchar current = input.charAt(i);\n\t\t\tif (current == '\\'') {\n\t\t\t\tinsidequote = !insidequote;\n\t\t\t\toutput += current;\n\t\t\t} else if (insidequote) {\n\t\t\t\tif (current == ' ') {\n\t\t\t\t\toutput += \"\\\\s\";\n\t\t\t\t} else if (current == '\\t') {\n\t\t\t\t\toutput += \"\\\\t\";\n\t\t\t\t} else if (current == ',') {\n\t\t\t\t\toutput += \"\\\\c\";\n\t\t\t\t} else if (current == '\\\\') {\n\t\t\t\t\toutput += \"\\\\b\";\n\t\t\t\t} else if (current == ';') {\n\t\t\t\t\toutput += \"\\\\p\";\n\t\t\t\t} else if (current == ':') {\n\t\t\t\t\toutput += \"\\\\d\";\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t} // no uppercase inside quoted strings!\n\t\t\t} else {\n\t\t\t\tif (current == ',') {\n\t\t\t\t\toutput += \" , \"; // add spaces around every comma\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}",
"public static void escapeStringToBuf(String string, char escape, String charsToEscape, StringBuilder buf) {\n\t int len = string.length();\n\t for (int i=0; i<len; i++) {\n\t\t char chr = string.charAt(i);\n\t\t if (chr==escape || charsToEscape.indexOf(chr) >= 0) buf.append(escape);\n\t\t buf.append(chr);\n\t }\n }",
"private static String escape(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tescape(s, sb);\r\n\t\treturn sb.toString();\r\n\t}",
"public static String escapeRegex(String str) {\n return str.chars().boxed()\n .map(i -> escapeRegexChar((char) i.intValue()))\n .collect(Collectors.joining());\n }",
"default String escapeString(final String input) {\n return noQuestion(GedRenderer.escapeString(input)).trim();\n }",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }",
"private static String escape(String s) {\n StringBuilder buf = new StringBuilder();\n int length = s.length();\n for (int i = 0; i < length; i++) {\n char c = s.charAt(i);\n if (c == ',') {\n buf.append(\"\\\\,\");\n } else {\n buf.append(c);\n }\n }\n\n return buf.toString();\n }",
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"protected static String quote(String string) {\n final StringBuilder sb = new StringBuilder(string.length() + 2);\n for (int i = 0; i < string.length(); ++i) {\n final char c = string.charAt(i);\n switch (c) {\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n case '\"':\n sb.append(\"\\\\\\\"\");\n break;\n default:\n sb.append(c);\n break;\n }\n }\n return sb.toString();\n }",
"private static String escapeJavaString(String input)\n {\n int len = input.length();\n // assume (for performance, not for correctness) that string will not expand by more than 10 chars\n StringBuilder out = new StringBuilder(len + 10);\n for (int i = 0; i < len; i++) {\n char c = input.charAt(i);\n if (c >= 32 && c <= 0x7f) {\n if (c == '\"') {\n out.append('\\\\');\n out.append('\"');\n } else if (c == '\\\\') {\n out.append('\\\\');\n out.append('\\\\');\n } else {\n out.append(c);\n }\n } else {\n out.append('\\\\');\n out.append('u');\n // one liner hack to have the hex string of length exactly 4\n out.append(Integer.toHexString(c | 0x10000).substring(1));\n }\n }\n return out.toString();\n }",
"public static String escape(String source) {\n return escape(source, -1, true);\n }",
"public static String replaceEscapeChars(final String input) {\n if (input == null) return null;\n\n String retValue = LEFT_SQUARE_BRACKET_PATTERN.matcher(input).replaceAll(\"[\");\n retValue = RIGHT_SQUARE_BRACKET_PATTERN.matcher(retValue).replaceAll(\"]\");\n retValue = LEFT_BRACKET_PATTERN.matcher(retValue).replaceAll(\"(\");\n retValue = RIGHT_BRACKET_PATTERN.matcher(retValue).replaceAll(\")\");\n retValue = COLON_PATTERN.matcher(retValue).replaceAll(\":\");\n retValue = COMMA_PATTERN.matcher(retValue).replaceAll(\",\");\n retValue = EQUALS_PATTERN.matcher(retValue).replaceAll(\"=\");\n retValue = PLUS_PATTERN.matcher(retValue).replaceAll(\"+\");\n return MINUS_PATTERN.matcher(retValue).replaceAll(\"-\");\n }",
"static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}",
"private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }",
"private String escape(String str) {\n String result = null; // replace(str, \"&\", \"&\");\n\n while (str.indexOf(\"&\") != -1) {\n str = replace(str, \"&\", \"&\");\n }\n result = str;\n while (result.indexOf(\"-\") != -1) {\n result = replace(result, \"-\", \"\");\n }\n return result;\n }",
"public StringEscape(final Map<Character, Character> mapping) {\n\t\tthis(mapping, '\\\\');\n\t}",
"String escStr(String pSource) throws Exception;",
"public static String escapeJS(String string) {\n\t\treturn Utils.escapeJS(string, true);\n\t}",
"static String uriEscapeString(String unescaped) {\n try {\n return URLEncoder.encode(unescaped, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n // This is fatal.\n throw new RuntimeException(e);\n }\n }",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"public String htmlSpecialChar(String string){\n String res = string.replaceAll(\"&\",\"&\");\n res = res.replace(\"'\",\"'\");\n res = res.replace(\"\\\"\",\"&qout;\");\n res = res.replace(\"$\",\"$\");\n res = res.replace(\"%\",\"%\");\n res = res.replace(\"<\",\"<\");\n res = res.replace(\">\",\">\");\n res = res.replace(\"\\n\",\"\\\\n\");\n return res;\n }",
"protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }",
"public static String toEscapedUnicode(String unicodeString)\n\t{\n\t\tint len = unicodeString.length();\n\t\tint bufLen = len * 2;\n\t\tStringBuffer outBuffer = new StringBuffer(bufLen);\n\t\tfor (int x = 0; x < len; x++)\n\t\t{\n\t\t\tchar aChar = unicodeString.charAt(x);\n\t\t\t// Handle common case first, selecting largest block that\n\t\t\t// avoids the specials below\n\t\t\tif ((aChar > 61) && (aChar < 127))\n\t\t\t{\n\t\t\t\tif (aChar == '\\\\')\n\t\t\t\t{\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutBuffer.append(aChar);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (aChar)\n\t\t\t{\n\t\t\t\tcase ' ' :\n\t\t\t\t\tif (x == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t}\n\t\t\t\t\toutBuffer.append(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('t');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('n');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('r');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('f');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '=' : // Fall through\n\t\t\t\tcase ':' : // Fall through\n\t\t\t\tcase '#' : // Fall through\n\t\t\t\tcase '!' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tif ((aChar < 0x0020) || (aChar > 0x007e))\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t\toutBuffer.append('u');\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 12) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 8) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 4) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex(aChar & 0xF));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn outBuffer.toString();\n\t}",
"public static String unicodeEscape(String input, boolean escapeSpaces)\n {\n if (input == null)\n {\n return null;\n }\n\n StringBuilder builder = new StringBuilder();\n boolean changed = false;\n int length = input.length();\n for (int i = 0; i < length; i++)\n {\n char c = input.charAt(i);\n\n if (c < ' ')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c == ' ' && escapeSpaces)\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c > '~')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n builder.append(c);\n }\n\n if (!changed)\n {\n return input;\n }\n\n return builder.toString();\n }",
"public static String escape(String value, String escape) {\n String result = value.replace(\"_\", \"_\" + escape);\n result = result.replace(\"%\", \"%\" + escape);\n result = result.replace(escape, escape + escape);\n return result;\n }",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}",
"public static String cleanString(String aText) {\n if ( !Utils.stringDefined(aText)) {\n return \"\";\n }\n final StringBuilder result = new StringBuilder();\n StringCharacterIterator iterator = new StringCharacterIterator(aText);\n char character = iterator.current();\n char char_slash = '\\\\';\n char char_dquote = '\"';\n\n while (character != StringCharacterIterator.DONE) {\n if (character == char_dquote) {\n //For now don't escape double quotes\n result.append(character);\n // result.append(char_slash);\n // result.append(char_dquote);\n } else if (character == char_slash) {\n result.append(char_slash);\n result.append(char_slash);\n } else if (character == '\\b') {\n result.append(\"\\\\b\");\n } else if (character == '\\f') {\n result.append(\"\\\\f\");\n } else if (character == '\\n') {\n result.append(\"\\\\n\");\n } else if (character == '\\r') {\n result.append(\"\\\\r\");\n } else if (character == '\\t') {\n result.append(\"\\\\t\");\n } else {\n //the char is not a special one\n //add it to the result as is\n result.append(character);\n }\n character = iterator.next();\n }\n\n String s = result.toString();\n\n //Make into all ascii ??\n s = s.replaceAll(\"[^\\n\\\\x20-\\\\x7E]+\", \" \");\n\n return s;\n }",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"String escChr(char pChar) throws Exception;",
"public static String escapeJS(String inText)\n {\n return inText\n .replaceAll(\"(?<!\\\\\\\\)'\", \"\\\\\\\\'\")\n .replaceAll(\"(?<!\\\\\\\\)\\\"\", \"\\\\\\\\\\\"\")\n .replaceAll(\"\\n\", \"\\\\\\\\n\");\n }",
"public static String escapeString(String str, int length) {\n if (str == null)\n \treturn \"\";\n if (str.length() > length)\n \tstr = str.substring(0, length);\n StringTokenizer st = new StringTokenizer(str, \"'\");\n StringBuffer buffer = null;\n for (; st.hasMoreTokens(); buffer.append(st.nextToken()))\n \tif (buffer == null)\n \t\tbuffer = new StringBuffer(str.length() + 20);\n \telse\n \t\tbuffer.append(\"\\'\");\n\n if (buffer == null)\n \treturn str;\n else\n \treturn buffer.toString();\n\t}",
"public static String decodeEscapes(String inString)\n {\n String []parts = inString.split(s_marker);\n\n StringBuilder result = new StringBuilder(parts[0]);\n\n for(int i = 1; i < parts.length; i += 2)\n {\n int escape = Integer.parseInt(parts[i]);\n\n result.append(s_escapes.charAt(escape));\n\n if(i + 1 < parts.length)\n result.append(parts[i + 1]);\n }\n\n return result.toString();\n }",
"public static String encodeJsString(String s) throws Exception {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"\\\"\");\r\n for (Character c : s.toCharArray())\r\n {\r\n switch(c)\r\n {\r\n case '\\\"': \r\n sb.append(\"\\\\\\\"\");\r\n break;\r\n case '\\\\': \r\n sb.append(\"\\\\\\\\\");\r\n break;\r\n case '\\b': \r\n sb.append(\"\\\\b\");\r\n break;\r\n case '\\f': \r\n sb.append(\"\\\\f\");\r\n break;\r\n case '\\n': \r\n sb.append(\"\\\\n\");\r\n break;\r\n case '\\r': \r\n sb.append(\"\\\\r\");\r\n break;\r\n case '\\t': \r\n sb.append(\"\\\\t\");\r\n break;\r\n default: \r\n Int32 i = (int)c;\r\n if (i < 32 || i > 127)\r\n {\r\n sb.append(String.format(StringSupport.CSFmtStrToJFmtStr(\"\\\\u{0:X04}\"),i));\r\n }\r\n else\r\n {\r\n sb.append(c);\r\n } \r\n break;\r\n \r\n }\r\n }\r\n sb.append(\"\\\"\");\r\n return sb.toString();\r\n }",
"private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }",
"public static String percentEscape(String s)\n {\n boolean changed = false;\n StringBuilder out = new StringBuilder(s.length());\n StringBuilder run = new StringBuilder();\n\n for (int i = 0; i < s.length();)\n {\n int c = (int) s.charAt(i);\n if (c >= 0x20 && c <= 0x7E)\n {\n out.append((char) c);\n i++;\n }\n else\n {\n /*\n * Process a run of non-ascii characters.\n */\n run.setLength(0);\n for (;;)\n {\n run.append((char) c);\n i++;\n\n // if start of a unicode pair\n if (c >= 0xD800 && c <= 0xDBFF)\n {\n // see if next char is the 2nd char of a pair\n if (i < s.length())\n {\n c = (int) s.charAt(i);\n // If 2nd char of a Unicode pair\n if (c >= 0xDC00 && c <= 0xDFFF)\n {\n run.append((char) c);\n i++;\n }\n }\n }\n\n if (i < s.length())\n {\n c = (int) s.charAt(i);\n if (c >= 0x20 && c <= 0x7E)\n {\n break;\n }\n }\n else\n {\n break;\n }\n }\n\n /*\n * Convert the characters to bytes and write out\n */\n byte[] bytes = run.toString().getBytes(UTF8_CHARSET);\n for (int j = 0; j < bytes.length; j++)\n {\n out.append('%');\n out.append(HEX_CHARS.charAt((bytes[j] >> 4) & 0x0F));\n out.append(HEX_CHARS.charAt(bytes[j] & 0x0F));\n }\n changed = true;\n }\n }\n\n return (changed ? out.toString() : s);\n }",
"private static String[] escape(String[] args) {\n String[] result;\n\n result = new String[args.length];\n for (int i = 0; i < result.length; i++) {\n result[i] = escape(args[i]);\n }\n return result;\n }",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"private String escapeXML(String string) {\n StringBuffer sb = new StringBuffer();\n int length = string.length();\n for (int i = 0; i < length; ++i) {\n char c = string.charAt(i);\n switch (c) {\n case '&':\n sb.append(\"&\");\n break;\n case '<':\n sb.append(\"<\");\n break;\n case '>':\n sb.append(\">\");\n break;\n case '\\'':\n sb.append(\"'\");\n break;\n case '\"':\n sb.append(\""\");\n break;\n default:\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"static private void writeGroovyString( StringBuilder buffer, String s )\r\n\t{\r\n\t\tchar[] chars = s.toCharArray();\r\n\t\tint len = chars.length;\r\n\t\tchar c;\r\n\t\tfor( int i = 0; i < len; i++ )\r\n\t\t\tswitch( c = chars[ i ] )\r\n\t\t\t{\r\n\t\t\t\tcase '\"':\r\n\t\t\t\tcase '\\\\':\r\n\t\t\t\tcase '$':\r\n\t\t\t\t\tbuffer.append( '\\\\' ); //$FALL-THROUGH$\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbuffer.append( c );\r\n\t\t\t}\r\n\t}",
"public StringEscape(final Map<Character, Character> mapping, final char escape) {\n\t\tthis.escape = escape;\n\t\tthis.unescapeMap = MapTool.unmodifiableCopy(mapping);\n\t\tthis.escapeMap = Collections.unmodifiableMap(MapTool.reverse(mapping));\n\t\tcontrolCharacters = SetTool.unmodifiableCopy(mapping.keySet());\n\t\tstringCharacters = SetTool.unmodifiableCopy(mapping.values());\n\t}",
"public static String escapeChar(String text, char ch) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar prevCh = 0;\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == ch) {\n\t\t\t\tif (prevCh != '\\\\') { // Only escape if the character isn't already escaped.\n\t\t\t\t\tsb.append('\\\\'); // Escape the character\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(chars[i]);\n\t\t\tprevCh = chars[i];\n\t\t}\n\t\tString newText = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn newText;\n\t}",
"public static String escapeHTML(String str){\r\n\t\treturn FuzzyXMLUtil.escape(str, true);\r\n\t}",
"private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}",
"public static void escapeLikeValue(StringBuilder sb, String value, char escapeChar) {\n for (int i = 0; i < value.length(); i++) {\n char ch = value.charAt(i);\n if (ch == '%' || ch == '_') {\n sb.append(escapeChar);\n }\n sb.append(ch);\n }\n }",
"private String escapeXML(String string) {\n if (string == null)\n return \"null\";\n StringBuffer sb = new StringBuffer();\n int length = string.length();\n for (int i = 0; i < length; ++i) {\n char c = string.charAt(i);\n switch (c) {\n case '&':\n sb.append(\"&\");\n break;\n case '<':\n sb.append(\"<\");\n break;\n case '>':\n sb.append(\">\");\n break;\n case '\\'':\n sb.append(\"'\");\n break;\n case '\"':\n sb.append(\""\");\n break;\n default:\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"public static String escapeMarkup(final String s)\n\t{\n\t\treturn escapeMarkup(s, false);\n\t}",
"private String escapeString(String value, String queryLanguage) {\n String escaped = null;\n if (value != null) {\n if (queryLanguage.equals(Query.XPATH) || queryLanguage.equals(Query.SQL)) {\n // See JSR-170 spec v1.0, Sec. 6.6.4.9 and 6.6.5.2\n escaped = value.replaceAll(\"\\\\\\\\(?![-\\\"])\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"'\", \"\\\\\\\\'\")\n .replaceAll(\"'\", \"''\");\n }\n }\n return escaped;\n }",
"public static boolean stringHasValidEscapes( String string )\n\t{\t\t\n\t\tboolean answer = true;\n\t\tfor( int i = 0; i < string.length(); i++ )\n\t\t{\n\t\t\tif( string.charAt( i ) == '\\\\' && i + 1 < string.length() )\n\t\t\t{\n\t\t\t\tchar nextchar = string.charAt( i + 1 );\n\t\t\t\tif( nextchar == '\\\"' || nextchar == '\\\\' || nextchar == '/' \n\t\t\t\t|| nextchar == 'b' || nextchar == 'f' || nextchar == 'n' \n\t\t\t\t|| nextchar == 'r' || nextchar == 't' || nextchar == 'u' )\n\t\t\t\t{\n\t\t\t\t\tif( nextchar == 'u' && i + 5 < string.length() )\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//the next 4 characters should be hex digits\n\t\t\t\t\t\t\tfor(int j = i + 2; j < i + 6; j++ )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tInteger.parseInt( string.substring( j , j + 1 ) , 16 ); //substring instead of charAt because parseInt requires a string\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( NumberFormatException nfe )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//one of the 4 characters was not a hex value\n\t\t\t\t\t\t\tanswer = false;\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//the character following the slash was not a valid escape character\n\t\t\t\t\tanswer = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn answer;\n\t}",
"public static String escapeHTML(String s) {\n return escapeHTML(s, true);\n }",
"private String encodeXSS(String s) { \n if (s == null || \"\".equals(s)) { \n return s; \n } \n StringBuilder sb = new StringBuilder(s.length() + 16); \n for (int i = 0; i < s.length(); i++) { \n char c = s.charAt(i); \n switch (c) { \n \n //handle the '<' and '>' which can be used for constructing <script> and </script> \n case '>': \n sb.append('>'); \n break; \n case '<': \n sb.append('<'); \n break; \n \n //since the html can support the characters using $#number format \n //so here also need to escape '#','&' and quote symbol \n case '\\'': \n sb.append('‘'); \n break; \n case '\\\"': \n sb.append('“'); \n break; \n case '&': \n sb.append('&'); \n break; \n case '\\\\': \n sb.append('\'); \n break; \n case '#': \n sb.append('#'); \n break; \n //if not the special characters ,then output it directly \n default: \n sb.append(c); \n break; \n } \n } \n return sb.toString(); \n }",
"public static String removeEscapeChar(String string)\t{\n\t\tint lastIndex = 0;\n\t\twhile (string.contains(\"&#\"))\n\t\t{\n\t\t\t//Get the escape character index\n\t\t\tint startIndex = string.indexOf(\"&#\", lastIndex);\n\t\t\tint endIndex = string.indexOf(\";\", startIndex);\n\n\t\t\t//and rip the sucker out of the string\n\t\t\tString escapeChar = string.substring(startIndex, endIndex);\n\n\t\t\t//Get the unicode representation and replace all occurrences in the string\n\t\t\tString replacementChar = convertEscapeChar(escapeChar);\n\t\t\tstring = string.replaceAll(escapeChar + \";\", replacementChar);\t\t\t\n\t\t\tlastIndex = endIndex;\n\t\t}\n\t\treturn string;\n\t}",
"public static String encode(String s) {\n // return java.net.URLEncoder.encode(s);\n /*\n ** The only encoded chars are \"<>%=/\", chars < space and chars >= 127\n ** (including cr/lf, ...)\n ** A leading and/or trailing space is also encoded, all others are\n ** left alone\n **\n ** Encoding is %dd where dd are hex digits for the hex value encode\n **\n ** Check if needs encoding first, if not, simply return original string\n */\n char arr[] = s.toCharArray();\n int len = arr.length;\n for(int i=0; i < len; i++) {\n char ch = arr[i];\n if (ch < ' ' || ch > (char)127 || ch == '%' ||\n ch == '<' || ch == '>' || ch == '=' || \n ch == '/' || \n ((ch == ' ') && (i == 0 || i == len-1))) {\n \n StringBuffer sb = new StringBuffer();\n for(i=0; i < len; i++) {\n ch = arr[i];\n if (ch < ' ' || ch > (char)127 || ch == '%' ||\n ch == '<' || ch == '>' || ch == '=' || \n ch == '/' || \n ((ch == ' ') && (i == 0 || i == len-1))) {\n \n byte b = (byte)arr[i];\n sb.append('%');\n char c = Character.forDigit((b >> 4) & 0xf, 16);\n sb.append(c);\n c = Character.forDigit(b & 0xf, 16);\n sb.append(c);\n } else {\n sb.append(arr[i]);\n }\n }\n s = sb.toString();\n break;\n }\n }\n return s;\n }",
"public static String escapeInvalidXMLCharacters(String str) {\n StringBuffer out = new StringBuffer();\n final int strlen = str.length();\n final String substitute = \"\\uFFFD\";\n int idx = 0;\n while (idx < strlen) {\n final int cpt = str.codePointAt(idx);\n idx += Character.isSupplementaryCodePoint(cpt) ? 2 : 1;\n if ((cpt == 0x9) ||\n (cpt == 0xA) ||\n (cpt == 0xD) ||\n ((cpt >= 0x20) && (cpt <= 0xD7FF)) ||\n ((cpt >= 0xE000) && (cpt <= 0xFFFD)) ||\n ((cpt >= 0x10000) && (cpt <= 0x10FFFF))) {\n out.append(Character.toChars(cpt));\n } else {\n out.append(substitute);\n }\n }\n return out.toString();\n }",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"private String sanitizeSpecialChars(String value) {\n return value.replaceAll(\"[^a-zA-Z0-9_]\", \"_\");\n }",
"private String encodeSQL(String text) {\r\n text = text.replaceAll(\"'\", \"''\");\r\n return \"'\" + text + \"'\";\r\n }",
"public static String escapeRegexChar(char c) {\n return (META_CHARS.contains(c) ? \"\\\\\" : \"\") + c;\n }",
"private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"public static String quote(String str) {\n return \"\\\"\" + str.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") + \"\\\"\";\n }",
"public static String htmlEscapeCharsToString(String source) {\n if (TextUtils.isEmpty(source)) {\n return source;\n } else {\n return source.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\").replaceAll(\"&\", \"&\")\n .replaceAll(\""\", \"\\\"\");\n }\n }",
"public static String escapeControlCharactersAndQuotes(CharSequence seq) {\n int len = seq.length();\n StringBuilder sb = new StringBuilder(seq.length() + 1);\n escapeControlCharactersAndQuotes(seq, len, sb);\n return sb.toString();\n }",
"char unescChr(String pEscaped) throws Exception;",
"public String escape(String source) {\r\n\t\treturn null;\r\n\t}",
"public static String encode(String string){\n return encode(string.getBytes());\n }",
"public static CharSequence escapeMarkup(final String s)\n\t{\n\t\treturn escapeMarkup(s, false);\n\t}",
"String unescStr(String pSource) throws Exception;",
"public String addQuotes(String s) {\n return String.format(\"'%s'\", s.replaceAll(\"'\", \"''\"));\n }",
"public String escapeForVideoFilter(String input) {\n\t\t//return input.replace(\"\\\\\", \"\\\\\\\\\").replace(\",\", \"\\\\,\").replace(\";\", \"\\\\;\").replace(\":\", \"\\\\:\")\n\t\t//\t\t.replace(\"'\", \"\\\\'\").replace(\"[\", \"\\\\[\").replace(\"]\", \"\\\\]\").replace(\"=\", \"\\\\=\");\n\t\treturn \"'\" + input.replace(\"'\", \"'\\\\''\") + \"'\";\n\t}",
"private static Appendable writeString(Appendable buffer, String s, char quote) {\n append(buffer, quote);\n int len = s.length();\n for (int i = 0; i < len; i++) {\n char c = s.charAt(i);\n escapeCharacter(buffer, c, quote);\n }\n return append(buffer, quote);\n }",
"public static void escapeControlCharactersAndQuotes(CharSequence seq, StringBuilder into) {\n escapeControlCharactersAndQuotes(seq, seq.length(), into);\n }"
] |
[
"0.7454076",
"0.7132026",
"0.70092624",
"0.6886972",
"0.6864738",
"0.6709184",
"0.66097146",
"0.6589031",
"0.6579539",
"0.647239",
"0.6465733",
"0.64588875",
"0.6433838",
"0.64152837",
"0.63849485",
"0.63521045",
"0.63366514",
"0.63360983",
"0.6330987",
"0.629967",
"0.62701845",
"0.62615526",
"0.62238926",
"0.6216499",
"0.62076885",
"0.61717314",
"0.6156681",
"0.6124343",
"0.6116609",
"0.6102545",
"0.603745",
"0.6029503",
"0.6013087",
"0.60050696",
"0.5991056",
"0.5972826",
"0.595043",
"0.59471947",
"0.5934392",
"0.59322065",
"0.59306014",
"0.5848598",
"0.58292264",
"0.5769781",
"0.57533866",
"0.57504517",
"0.57292217",
"0.5708671",
"0.5702617",
"0.56857246",
"0.5665528",
"0.56531763",
"0.5635642",
"0.5611113",
"0.5607858",
"0.5581636",
"0.5577465",
"0.55513686",
"0.55498683",
"0.5534715",
"0.55280375",
"0.5523108",
"0.5520502",
"0.55083483",
"0.5489632",
"0.54880816",
"0.54843175",
"0.5449832",
"0.5445188",
"0.5422912",
"0.54105043",
"0.53950757",
"0.5381659",
"0.5338322",
"0.5332705",
"0.5324836",
"0.53239363",
"0.53186935",
"0.53141296",
"0.53116345",
"0.53024083",
"0.5290206",
"0.5283078",
"0.5278839",
"0.52752197",
"0.5275073",
"0.52739537",
"0.52612686",
"0.5248787",
"0.5223581",
"0.5216513",
"0.52096033",
"0.5203019",
"0.5198174",
"0.51907915",
"0.5166447",
"0.5152764",
"0.5136884",
"0.51189005",
"0.51169"
] |
0.6095486
|
30
|
Replaces all escape sequences in a String with the string character. All escape sequences in the String are assumed to be valid. For invalid escape sequences the result is unspecified, an Exception might be thrown.
|
public String unescape(final String input) {
CharIterator iter = new CharIterator(input);
StringBuilder builder = new StringBuilder();
while (iter.hasNext()) {
if (iter.next() != escape) {
builder.append(iter.getLookbehind());
} else {
Check.isTrue(iter.hasNext(), "Trailing escape character: %", input);
builder.append(unescape(iter.next()));
}
}
return builder.toString();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }",
"public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }",
"public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}",
"private static String handleEscapes(String s) {\n final String UNLIKELY_STRING = \"___~~~~$$$$___\";\n return s.replace(\"\\\\\\\\\", UNLIKELY_STRING).replace(\"\\\\\", \"\").replace(UNLIKELY_STRING, \"\\\\\");\n }",
"private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }",
"private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }",
"char unescChr(String pEscaped) throws Exception;",
"public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}",
"String escChr(char pChar) throws Exception;",
"public static String decodeEscapes(String inString)\n {\n String []parts = inString.split(s_marker);\n\n StringBuilder result = new StringBuilder(parts[0]);\n\n for(int i = 1; i < parts.length; i += 2)\n {\n int escape = Integer.parseInt(parts[i]);\n\n result.append(s_escapes.charAt(escape));\n\n if(i + 1 < parts.length)\n result.append(parts[i + 1]);\n }\n\n return result.toString();\n }",
"CharSequence escape(char c);",
"public static String escapeString(String str) {\n return escapeString(str, 0xf423f);\n\t}",
"public String escapeSpetialCharecters(String string)\r\n {\r\n return string.replaceAll(\"(?=[]\\\\[+&|!(){}^\\\"~*?:\\\\\\\\-])\", \"\\\\\\\\\");\r\n }",
"public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }",
"public static String removeEscapeChar(String string)\t{\n\t\tint lastIndex = 0;\n\t\twhile (string.contains(\"&#\"))\n\t\t{\n\t\t\t//Get the escape character index\n\t\t\tint startIndex = string.indexOf(\"&#\", lastIndex);\n\t\t\tint endIndex = string.indexOf(\";\", startIndex);\n\n\t\t\t//and rip the sucker out of the string\n\t\t\tString escapeChar = string.substring(startIndex, endIndex);\n\n\t\t\t//Get the unicode representation and replace all occurrences in the string\n\t\t\tString replacementChar = convertEscapeChar(escapeChar);\n\t\t\tstring = string.replaceAll(escapeChar + \";\", replacementChar);\t\t\t\n\t\t\tlastIndex = endIndex;\n\t\t}\n\t\treturn string;\n\t}",
"protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }",
"private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }",
"private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"public static String replaceEscapeChars(final String input) {\n if (input == null) return null;\n\n String retValue = LEFT_SQUARE_BRACKET_PATTERN.matcher(input).replaceAll(\"[\");\n retValue = RIGHT_SQUARE_BRACKET_PATTERN.matcher(retValue).replaceAll(\"]\");\n retValue = LEFT_BRACKET_PATTERN.matcher(retValue).replaceAll(\"(\");\n retValue = RIGHT_BRACKET_PATTERN.matcher(retValue).replaceAll(\")\");\n retValue = COLON_PATTERN.matcher(retValue).replaceAll(\":\");\n retValue = COMMA_PATTERN.matcher(retValue).replaceAll(\",\");\n retValue = EQUALS_PATTERN.matcher(retValue).replaceAll(\"=\");\n retValue = PLUS_PATTERN.matcher(retValue).replaceAll(\"+\");\n return MINUS_PATTERN.matcher(retValue).replaceAll(\"-\");\n }",
"public static String escapeString(String string, char escape, String charsToEscape) {\n\t int len = string.length();\n\t StringBuilder res = new StringBuilder(len + 5);\n\t escapeStringToBuf(string, escape, charsToEscape, res);\n\t return res.length()==len ? string : res.toString();\n }",
"public static String toEscapedUnicode(String unicodeString)\n\t{\n\t\tint len = unicodeString.length();\n\t\tint bufLen = len * 2;\n\t\tStringBuffer outBuffer = new StringBuffer(bufLen);\n\t\tfor (int x = 0; x < len; x++)\n\t\t{\n\t\t\tchar aChar = unicodeString.charAt(x);\n\t\t\t// Handle common case first, selecting largest block that\n\t\t\t// avoids the specials below\n\t\t\tif ((aChar > 61) && (aChar < 127))\n\t\t\t{\n\t\t\t\tif (aChar == '\\\\')\n\t\t\t\t{\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\toutBuffer.append(aChar);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (aChar)\n\t\t\t{\n\t\t\t\tcase ' ' :\n\t\t\t\t\tif (x == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t}\n\t\t\t\t\toutBuffer.append(' ');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('t');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('n');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('r');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append('f');\n\t\t\t\t\tbreak;\n\t\t\t\tcase '=' : // Fall through\n\t\t\t\tcase ':' : // Fall through\n\t\t\t\tcase '#' : // Fall through\n\t\t\t\tcase '!' :\n\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tif ((aChar < 0x0020) || (aChar > 0x007e))\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append('\\\\');\n\t\t\t\t\t\toutBuffer.append('u');\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 12) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 8) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex((aChar >> 4) & 0xF));\n\t\t\t\t\t\toutBuffer.append(toHex(aChar & 0xF));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toutBuffer.append(aChar);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn outBuffer.toString();\n\t}",
"public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }",
"private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}",
"private static String convertEscapeChar(String escapeCharacter)\t{\n\t\tString charCode = escapeCharacter.substring(escapeCharacter.indexOf(\"#\")+1);\n\t\treturn \"\" + (char) Integer.parseInt(charCode);\n\t}",
"public static String escape(String s) {\r\n if (s == null)\r\n return null;\r\n StringBuffer sb = new StringBuffer();\r\n escape(s, sb);\r\n return sb.toString();\r\n }",
"public static String replaceSymbols(String text) {\n\t\tif (text.isEmpty()) {\n\t\t\treturn \"\\u03B5\";\n\t\t}\n\n\t\treturn text.replaceAll(\"\\n\", \"\\u21B5\") // ↵\n\t\t\t\t.replaceAll(\"\\t\", \"\\u00BB\") // »\n\t\t\t\t.replaceAll(\" \", \"\\u00B7\"); // ·\n\t}",
"private static void escape(String s, StringBuilder sb) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tchar ch = s.charAt(i);\r\n\t\t\tswitch (ch) {\r\n\t\t\tcase '\"':\r\n\t\t\t\tsb.append(\"\\\\\\\"\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\\\':\r\n\t\t\t\tsb.append(\"\\\\\\\\\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\b':\r\n\t\t\t\tsb.append(\"\\\\b\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\f':\r\n\t\t\t\tsb.append(\"\\\\f\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\n':\r\n\t\t\t\tsb.append(\"\\\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\r':\r\n\t\t\t\tsb.append(\"\\\\r\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\t':\r\n\t\t\t\tsb.append(\"\\\\t\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '/':\r\n\t\t\t\tsb.append(\"\\\\/\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif ((ch >= '\\u0000' && ch <= '\\u001F')\r\n\t\t\t\t\t\t|| (ch >= '\\u007F' && ch <= '\\u009F')\r\n\t\t\t\t\t\t|| (ch >= '\\u2000' && ch <= '\\u20FF')) {\r\n\t\t\t\t\tString str = Integer.toHexString(ch);\r\n\t\t\t\t\tsb.append(\"\\\\u\");\r\n\t\t\t\t\tfor (int k = 0; k < 4 - str.length(); k++) {\r\n\t\t\t\t\t\tsb.append('0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsb.append(str.toUpperCase());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(ch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static String escapeRegexChar(char c) {\n return (META_CHARS.contains(c) ? \"\\\\\" : \"\") + c;\n }",
"public static String escapeRegexReservedCharacters(String stringWithReservedCharacters) {\n String reservedSymbols = \"{([*+^?<>$.|])}\";\n StringBuilder escapedStringBuilder = new StringBuilder();\n\n for (char character : stringWithReservedCharacters.toCharArray()) {\n if (reservedSymbols.contains(String.valueOf(character)))\n escapedStringBuilder.append(\"\\\\\");\n\n escapedStringBuilder.append(character);\n }\n\n return escapedStringBuilder.toString();\n }",
"public StringEscape(final Map<Character, Character> mapping) {\n\t\tthis(mapping, '\\\\');\n\t}",
"public StringEscape(final Map<Character, Character> mapping, final char escape) {\n\t\tthis.escape = escape;\n\t\tthis.unescapeMap = MapTool.unmodifiableCopy(mapping);\n\t\tthis.escapeMap = Collections.unmodifiableMap(MapTool.reverse(mapping));\n\t\tcontrolCharacters = SetTool.unmodifiableCopy(mapping.keySet());\n\t\tstringCharacters = SetTool.unmodifiableCopy(mapping.values());\n\t}",
"public static String escapeRegex(String str) {\n return str.chars().boxed()\n .map(i -> escapeRegexChar((char) i.intValue()))\n .collect(Collectors.joining());\n }",
"public static String cleanString(String aText) {\n if ( !Utils.stringDefined(aText)) {\n return \"\";\n }\n final StringBuilder result = new StringBuilder();\n StringCharacterIterator iterator = new StringCharacterIterator(aText);\n char character = iterator.current();\n char char_slash = '\\\\';\n char char_dquote = '\"';\n\n while (character != StringCharacterIterator.DONE) {\n if (character == char_dquote) {\n //For now don't escape double quotes\n result.append(character);\n // result.append(char_slash);\n // result.append(char_dquote);\n } else if (character == char_slash) {\n result.append(char_slash);\n result.append(char_slash);\n } else if (character == '\\b') {\n result.append(\"\\\\b\");\n } else if (character == '\\f') {\n result.append(\"\\\\f\");\n } else if (character == '\\n') {\n result.append(\"\\\\n\");\n } else if (character == '\\r') {\n result.append(\"\\\\r\");\n } else if (character == '\\t') {\n result.append(\"\\\\t\");\n } else {\n //the char is not a special one\n //add it to the result as is\n result.append(character);\n }\n character = iterator.next();\n }\n\n String s = result.toString();\n\n //Make into all ascii ??\n s = s.replaceAll(\"[^\\n\\\\x20-\\\\x7E]+\", \" \");\n\n return s;\n }",
"public static String escape(String source) {\n return escape(source, -1, true);\n }",
"protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }",
"private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }",
"public static void escapeStringToBuf(String string, char escape, String charsToEscape, StringBuilder buf) {\n\t int len = string.length();\n\t for (int i=0; i<len; i++) {\n\t\t char chr = string.charAt(i);\n\t\t if (chr==escape || charsToEscape.indexOf(chr) >= 0) buf.append(escape);\n\t\t buf.append(chr);\n\t }\n }",
"public static String escapeChar(String text, char ch) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar prevCh = 0;\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == ch) {\n\t\t\t\tif (prevCh != '\\\\') { // Only escape if the character isn't already escaped.\n\t\t\t\t\tsb.append('\\\\'); // Escape the character\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(chars[i]);\n\t\t\tprevCh = chars[i];\n\t\t}\n\t\tString newText = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn newText;\n\t}",
"public static final String escapeForIntro(String string) {\n String str = string;\n str = replace(str, \"\\r\\n\", \"<br>\");\n str = replace(str, \"\\n\", \"<br>\");\n str = replace(str, \"'\", \"\\\\'\");\n return replace(str, \"\\r\", \"\");\n\n }",
"private static String escape(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tescape(s, sb);\r\n\t\treturn sb.toString();\r\n\t}",
"public String htmlSpecialChar(String string){\n String res = string.replaceAll(\"&\",\"&\");\n res = res.replace(\"'\",\"'\");\n res = res.replace(\"\\\"\",\"&qout;\");\n res = res.replace(\"$\",\"$\");\n res = res.replace(\"%\",\"%\");\n res = res.replace(\"<\",\"<\");\n res = res.replace(\">\",\">\");\n res = res.replace(\"\\n\",\"\\\\n\");\n return res;\n }",
"static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}",
"public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }",
"public static String discardEscapeChar(String input) throws ParseException {\n\n // Create char array to hold unescaped char sequence\n char[] output = new char[input.length()];\n\n // The length of the output can be less than the input\n // due to discarded escape chars. This variable holds\n // the actual length of the output\n int length = 0;\n\n // We remember whether the last processed character was\n // an escape character\n boolean lastCharWasEscapeChar = false;\n\n // The multiplier the current unicode digit must be multiplied with.\n // E. g. the first digit must be multiplied with 16^3, the second with 16^2...\n int codePointMultiplier = 0;\n\n // Used to calculate the codepoint of the escaped unicode character\n int codePoint = 0;\n\n for (int i = 0; i < input.length(); i++) {\n char curChar = input.charAt(i);\n if (codePointMultiplier > 0) {\n codePoint += hexToInt(curChar) * codePointMultiplier;\n codePointMultiplier >>>= 4;\n if (codePointMultiplier == 0) {\n output[length++] = (char) codePoint;\n codePoint = 0;\n }\n } else if (lastCharWasEscapeChar) {\n if (curChar == 'u') {\n // found an escaped unicode character\n codePointMultiplier = 16 * 16 * 16;\n } else {\n // this character was escaped\n output[length] = curChar;\n length++;\n }\n lastCharWasEscapeChar = false;\n } else {\n if (curChar == '\\\\') {\n lastCharWasEscapeChar = true;\n } else {\n output[length] = curChar;\n length++;\n }\n }\n }\n\n if (codePointMultiplier > 0) {\n throw new ParseException(\"Truncated unicode escape sequence.\");\n }\n\n if (lastCharWasEscapeChar) {\n throw new ParseException(\"Term can not end with escape character.\");\n }\n\n // 返回已删除转义字符的String,或者如果存在双转义则仅保留一次\n //return new String(output, 0, length);\n\n // 返回原串\n return input;\n }",
"protected static String quote(String string) {\n final StringBuilder sb = new StringBuilder(string.length() + 2);\n for (int i = 0; i < string.length(); ++i) {\n final char c = string.charAt(i);\n switch (c) {\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n case '\"':\n sb.append(\"\\\\\\\"\");\n break;\n default:\n sb.append(c);\n break;\n }\n }\n return sb.toString();\n }",
"String escStr(String pSource) throws Exception;",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"public static String removeInvalidCharacteres(String string) {\n\t\tString corretString = string;\n\t\tif (containsInvalidCharacterInLogin(string)) {\n\t\t\tString regex = \"[|\\\"&*=+'@#$%\\\\/?{}?:;~<>,\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D8\\u0152\\u00DE\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u0178\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F8\\u0153\\u00DF\\u00FE\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FF]\";\n\t\t\tPattern p = Pattern.compile(regex);\n\t\t\tMatcher m = p.matcher(string);\n\t\t\tcorretString = m.replaceAll(\"\");\n\t\t\t//System.out.println(corretString);\n\t\t}\n\t\t\n\t\tcorretString = corretString.replace(\"\\\\\", \"\");\n\t\t\n\t\treturn corretString;\n\t}",
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"public String replaceAllCharacter(String string, String regex, String replacement) {\n return string.replaceAll(regex, replacement);\n }",
"public final void mEscapeSequence() throws RecognitionException {\n try {\n // /development/json-antlr/grammar/JSON.g:98:6: ( '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' ) )\n // /development/json-antlr/grammar/JSON.g:98:10: '\\\\\\\\' ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n {\n match('\\\\'); \n // /development/json-antlr/grammar/JSON.g:98:15: ( UnicodeEscape | 'b' | 't' | 'n' | 'f' | 'r' | '\\\\\\\"' | '\\\\'' | '\\\\\\\\' | '\\\\/' )\n int alt9=10;\n switch ( input.LA(1) ) {\n case 'u':\n {\n alt9=1;\n }\n break;\n case 'b':\n {\n alt9=2;\n }\n break;\n case 't':\n {\n alt9=3;\n }\n break;\n case 'n':\n {\n alt9=4;\n }\n break;\n case 'f':\n {\n alt9=5;\n }\n break;\n case 'r':\n {\n alt9=6;\n }\n break;\n case '\\\"':\n {\n alt9=7;\n }\n break;\n case '\\'':\n {\n alt9=8;\n }\n break;\n case '\\\\':\n {\n alt9=9;\n }\n break;\n case '/':\n {\n alt9=10;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n }\n\n switch (alt9) {\n case 1 :\n // /development/json-antlr/grammar/JSON.g:98:16: UnicodeEscape\n {\n mUnicodeEscape(); \n\n }\n break;\n case 2 :\n // /development/json-antlr/grammar/JSON.g:98:31: 'b'\n {\n match('b'); \n\n }\n break;\n case 3 :\n // /development/json-antlr/grammar/JSON.g:98:35: 't'\n {\n match('t'); \n\n }\n break;\n case 4 :\n // /development/json-antlr/grammar/JSON.g:98:39: 'n'\n {\n match('n'); \n\n }\n break;\n case 5 :\n // /development/json-antlr/grammar/JSON.g:98:43: 'f'\n {\n match('f'); \n\n }\n break;\n case 6 :\n // /development/json-antlr/grammar/JSON.g:98:47: 'r'\n {\n match('r'); \n\n }\n break;\n case 7 :\n // /development/json-antlr/grammar/JSON.g:98:51: '\\\\\\\"'\n {\n match('\\\"'); \n\n }\n break;\n case 8 :\n // /development/json-antlr/grammar/JSON.g:98:56: '\\\\''\n {\n match('\\''); \n\n }\n break;\n case 9 :\n // /development/json-antlr/grammar/JSON.g:98:61: '\\\\\\\\'\n {\n match('\\\\'); \n\n }\n break;\n case 10 :\n // /development/json-antlr/grammar/JSON.g:98:66: '\\\\/'\n {\n match('/'); \n\n }\n break;\n\n }\n\n\n }\n\n }\n finally {\n }\n }",
"public static String escape(String input) {\n\t\tboolean insidequote = false;\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tchar current = input.charAt(i);\n\t\t\tif (current == '\\'') {\n\t\t\t\tinsidequote = !insidequote;\n\t\t\t\toutput += current;\n\t\t\t} else if (insidequote) {\n\t\t\t\tif (current == ' ') {\n\t\t\t\t\toutput += \"\\\\s\";\n\t\t\t\t} else if (current == '\\t') {\n\t\t\t\t\toutput += \"\\\\t\";\n\t\t\t\t} else if (current == ',') {\n\t\t\t\t\toutput += \"\\\\c\";\n\t\t\t\t} else if (current == '\\\\') {\n\t\t\t\t\toutput += \"\\\\b\";\n\t\t\t\t} else if (current == ';') {\n\t\t\t\t\toutput += \"\\\\p\";\n\t\t\t\t} else if (current == ':') {\n\t\t\t\t\toutput += \"\\\\d\";\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t} // no uppercase inside quoted strings!\n\t\t\t} else {\n\t\t\t\tif (current == ',') {\n\t\t\t\t\toutput += \" , \"; // add spaces around every comma\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"default String escapeString(final String input) {\n return noQuestion(GedRenderer.escapeString(input)).trim();\n }",
"protected java.lang.String unescape(java.lang.String s) throws java.io.IOException {\n boolean escape = false;\n final java.lang.StringBuilder digits = new java.lang.StringBuilder();\n boolean changed = false;\n final java.lang.StringBuilder result = new java.lang.StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (escape) {\n switch (c) {\n case 'b': result.append('\\b'); break;\n case 't': result.append('\\t'); break;\n case 'n': result.append('\\n'); break;\n case 'f': result.append('\\f'); break;\n case 'r': result.append('\\r'); break;\n \n case '\"': case '\\'': case '\\\\':\n result.append(c); break;\n \n case '0': case '1': case '2': case '3':\n case '4': case '5': case '6': case '7':\n digits.append(c);\n if (digits.length() == 3) {\n // this should succeed -- there are guaranteed to be 3 octal digits\n result.append((char) java.lang.Integer.parseInt(digits.toString(), 8));\n digits.setLength(0);\n }\n break;\n \n default:\n throw error();\n }\n if (digits.length() == 0) escape = false;\n }\n else {\n if (c == '\\\\') { escape = true; changed = true; }\n else { result.append(c); }\n }\n }\n if (escape) throw error(); // escape was not completed\n return changed ? result.toString() : s;\n }",
"String unescStr(String pSource) throws Exception;",
"private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}",
"private static String repairString(String s) {\n return s != null ? s.replaceAll(\"\\'\", \"\\'\\'\") : null;\n }",
"public String escape(final String input) {\n\t\tStringBuilder builder = new StringBuilder(input);\n\t\tescape(builder);\n\t\treturn builder.toString();\n\t}",
"public final void mString() throws RecognitionException {\n try {\n int _type = String;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /development/json-antlr/grammar/JSON.g:91:9: ( '\\\"' ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )* '\\\"' )\n // /development/json-antlr/grammar/JSON.g:92:2: '\\\"' ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )* '\\\"'\n {\n match('\\\"'); \n // /development/json-antlr/grammar/JSON.g:92:6: ( EscapeSequence | ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' ) )*\n loop7:\n do {\n int alt7=3;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0=='\\\\') ) {\n alt7=1;\n }\n else if ( ((LA7_0>=' ' && LA7_0<='!')||(LA7_0>='#' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\\uFFFF')) ) {\n alt7=2;\n }\n\n\n switch (alt7) {\n \tcase 1 :\n \t // /development/json-antlr/grammar/JSON.g:92:8: EscapeSequence\n \t {\n \t mEscapeSequence(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // /development/json-antlr/grammar/JSON.g:92:25: ~ ( '\\\\u0000' .. '\\\\u001f' | '\\\\\\\\' | '\\\\\\\"' )\n \t {\n \t if ( (input.LA(1)>=' ' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop7;\n }\n } while (true);\n\n match('\\\"'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static String unicodeEscape(String input, boolean escapeSpaces)\n {\n if (input == null)\n {\n return null;\n }\n\n StringBuilder builder = new StringBuilder();\n boolean changed = false;\n int length = input.length();\n for (int i = 0; i < length; i++)\n {\n char c = input.charAt(i);\n\n if (c < ' ')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c == ' ' && escapeSpaces)\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n if (c > '~')\n {\n builder.append(unicodeEscape(c));\n changed = true;\n continue;\n }\n\n builder.append(c);\n }\n\n if (!changed)\n {\n return input;\n }\n\n return builder.toString();\n }",
"public static String removeSpecialCharacters(String string) {\n return Normalizer.normalize(string, Normalizer.Form.NFD).replaceAll(\"[^\\\\p{ASCII}]\", \"\");\n }",
"public static String unicodeEscaped(Character ch) {\n/* 380 */ if (ch == null) {\n/* 381 */ return null;\n/* */ }\n/* 383 */ return unicodeEscaped(ch.charValue());\n/* */ }",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"public static String escapeJS(String string) {\n\t\treturn Utils.escapeJS(string, true);\n\t}",
"default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }",
"public static String escape(final Object self, final Object string) {\n final String str = JSType.toString(string);\n final int length = str.length();\n\n if (length == 0) {\n return str;\n }\n\n final StringBuilder sb = new StringBuilder();\n for (int k = 0; k < length; k++) {\n final char ch = str.charAt(k);\n if (UNESCAPED.indexOf(ch) != -1) {\n sb.append(ch);\n } else if (ch < 256) {\n sb.append('%');\n if (ch < 16) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n } else {\n sb.append(\"%u\");\n if (ch < 4096) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH));\n }\n }\n\n return sb.toString();\n }",
"public static String escapeInvalidXMLCharacters(String str) {\n StringBuffer out = new StringBuffer();\n final int strlen = str.length();\n final String substitute = \"\\uFFFD\";\n int idx = 0;\n while (idx < strlen) {\n final int cpt = str.codePointAt(idx);\n idx += Character.isSupplementaryCodePoint(cpt) ? 2 : 1;\n if ((cpt == 0x9) ||\n (cpt == 0xA) ||\n (cpt == 0xD) ||\n ((cpt >= 0x20) && (cpt <= 0xD7FF)) ||\n ((cpt >= 0xE000) && (cpt <= 0xFFFD)) ||\n ((cpt >= 0x10000) && (cpt <= 0x10FFFF))) {\n out.append(Character.toChars(cpt));\n } else {\n out.append(substitute);\n }\n }\n return out.toString();\n }",
"public static boolean stringHasValidEscapes( String string )\n\t{\t\t\n\t\tboolean answer = true;\n\t\tfor( int i = 0; i < string.length(); i++ )\n\t\t{\n\t\t\tif( string.charAt( i ) == '\\\\' && i + 1 < string.length() )\n\t\t\t{\n\t\t\t\tchar nextchar = string.charAt( i + 1 );\n\t\t\t\tif( nextchar == '\\\"' || nextchar == '\\\\' || nextchar == '/' \n\t\t\t\t|| nextchar == 'b' || nextchar == 'f' || nextchar == 'n' \n\t\t\t\t|| nextchar == 'r' || nextchar == 't' || nextchar == 'u' )\n\t\t\t\t{\n\t\t\t\t\tif( nextchar == 'u' && i + 5 < string.length() )\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//the next 4 characters should be hex digits\n\t\t\t\t\t\t\tfor(int j = i + 2; j < i + 6; j++ )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tInteger.parseInt( string.substring( j , j + 1 ) , 16 ); //substring instead of charAt because parseInt requires a string\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( NumberFormatException nfe )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//one of the 4 characters was not a hex value\n\t\t\t\t\t\t\tanswer = false;\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//the character following the slash was not a valid escape character\n\t\t\t\t\tanswer = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn answer;\n\t}",
"public String escape(String source) {\r\n\t\treturn null;\r\n\t}",
"private String readString() throws ParseException {\n int stringStart = pos;\n while (pos < length) {\n char c = src.charAt(pos++);\n if (c <= '\\u001F') {\n throw new ParseException(\"String contains control character\");\n } else if (c == '\\\\') {\n break;\n } else if (c == '\"') {\n return src.substring(stringStart, pos - 1);\n }\n }\n\n /*\n * Slow case: string contains escaped characters. Copy a maximal sequence\n * of unescaped characters into a temporary buffer, then an escaped\n * character, and repeat until the entire string is consumed.\n */\n StringBuilder b = new StringBuilder();\n while (pos < length) {\n assert src.charAt(pos - 1) == '\\\\';\n b.append(src, stringStart, pos - 1);\n if (pos >= length) {\n throw new ParseException(\"Unterminated string\");\n }\n char c = src.charAt(pos++);\n switch (c) {\n case '\"':\n b.append('\"');\n break;\n case '\\\\':\n b.append('\\\\');\n break;\n case '/':\n b.append('/');\n break;\n case 'b':\n b.append('\\b');\n break;\n case 'f':\n b.append('\\f');\n break;\n case 'n':\n b.append('\\n');\n break;\n case 'r':\n b.append('\\r');\n break;\n case 't':\n b.append('\\t');\n break;\n case 'u':\n if (length - pos < 5) {\n throw new ParseException(\"Invalid character code: \\\\u\" + src.substring(pos));\n }\n int code = fromHex(src.charAt(pos + 0)) << 12\n | fromHex(src.charAt(pos + 1)) << 8\n | fromHex(src.charAt(pos + 2)) << 4\n | fromHex(src.charAt(pos + 3));\n if (code < 0) {\n throw new ParseException(\"Invalid character code: \" + src.substring(pos, pos + 4));\n }\n pos += 4;\n b.append((char) code);\n break;\n default:\n throw new ParseException(\"Unexpected character in string: '\\\\\" + c + \"'\");\n }\n stringStart = pos;\n while (pos < length) {\n c = src.charAt(pos++);\n if (c <= '\\u001F') {\n throw new ParseException(\"String contains control character\");\n } else if (c == '\\\\') {\n break;\n } else if (c == '\"') {\n b.append(src, stringStart, pos - 1);\n return b.toString();\n }\n }\n }\n throw new ParseException(\"Unterminated string literal\");\n }",
"public static String customEscapeQueryChars(String s) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n // These characters are part of the query syntax and must be escaped\n if (c == '\\\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'\n || c == '^' || c == '[' || c == ']' || c == '\\\"' || c == '{' || c == '}'\n || c == '~' || c == '?' || c == '|' || c == '&' || c == ';' || c == '/'\n || Character.isWhitespace(c)) {\n sb.append('\\\\');\n }\n sb.append(c);\n }\n return sb.toString();\n }",
"public CharacterEscapes getCharacterEscapes()\n/* */ {\n/* 659 */ return this._characterEscapes;\n/* */ }",
"private String escape(String str) {\n String result = null; // replace(str, \"&\", \"&\");\n\n while (str.indexOf(\"&\") != -1) {\n str = replace(str, \"&\", \"&\");\n }\n result = str;\n while (result.indexOf(\"-\") != -1) {\n result = replace(result, \"-\", \"\");\n }\n return result;\n }",
"public static String escape(String source, int delimiter,\n boolean escapeQuote) {\n\n /*\n * If the source has any chars that need to be escaped, allocate a\n * new buffer and copy into it.\n * Allocate a new buffer iff source has any chars that need to\n * be esacaped.\n * Allocate enough so that the java buffer manager need not re-allocate\n * the buffer. Worst case is that all chars in the string need to be\n * escaped, resulting in twice the source length\n */\n int currpos = 0;\n StringBuffer result = null;\n // the default delimiter in COPY format is tab '\\t'\n boolean escapeDelimiter = false;\n // check if the user specified a custom delimiter\n if (delimiter != -1) {\n escapeDelimiter = true;\n }\n\n for (char ch : source.toCharArray()) {\n switch (ch) {\n case '\\\\':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\\\\\\");\n break;\n case '\\n':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\n\");\n break;\n case '\\r':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\r\");\n break;\n case '\\t':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\t\");\n break;\n case '\\b':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\b\");\n break;\n case '\\f':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\f\");\n break;\n case '\\'':\n if (escapeQuote) {\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"''\");\n break;\n }\n // Fall through to default otherwise\n default:\n if (result != null) {\n if (escapeDelimiter && ch == delimiter) {\n result.append(\"\\\\\");\n result.append(delimiter);\n } else {\n result.append(ch);\n }\n }\n else if (escapeDelimiter && ch == delimiter) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n result.append(\"\\\\\");\n result.append(delimiter);\n }\n }\n currpos++;\n }\n if (result != null) {\n return result.toString();\n } else {\n return source;\n }\n }",
"public static String encodeJsString(String s) throws Exception {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"\\\"\");\r\n for (Character c : s.toCharArray())\r\n {\r\n switch(c)\r\n {\r\n case '\\\"': \r\n sb.append(\"\\\\\\\"\");\r\n break;\r\n case '\\\\': \r\n sb.append(\"\\\\\\\\\");\r\n break;\r\n case '\\b': \r\n sb.append(\"\\\\b\");\r\n break;\r\n case '\\f': \r\n sb.append(\"\\\\f\");\r\n break;\r\n case '\\n': \r\n sb.append(\"\\\\n\");\r\n break;\r\n case '\\r': \r\n sb.append(\"\\\\r\");\r\n break;\r\n case '\\t': \r\n sb.append(\"\\\\t\");\r\n break;\r\n default: \r\n Int32 i = (int)c;\r\n if (i < 32 || i > 127)\r\n {\r\n sb.append(String.format(StringSupport.CSFmtStrToJFmtStr(\"\\\\u{0:X04}\"),i));\r\n }\r\n else\r\n {\r\n sb.append(c);\r\n } \r\n break;\r\n \r\n }\r\n }\r\n sb.append(\"\\\"\");\r\n return sb.toString();\r\n }",
"private static String escapeJavaString(String input)\n {\n int len = input.length();\n // assume (for performance, not for correctness) that string will not expand by more than 10 chars\n StringBuilder out = new StringBuilder(len + 10);\n for (int i = 0; i < len; i++) {\n char c = input.charAt(i);\n if (c >= 32 && c <= 0x7f) {\n if (c == '\"') {\n out.append('\\\\');\n out.append('\"');\n } else if (c == '\\\\') {\n out.append('\\\\');\n out.append('\\\\');\n } else {\n out.append(c);\n }\n } else {\n out.append('\\\\');\n out.append('u');\n // one liner hack to have the hex string of length exactly 4\n out.append(Integer.toHexString(c | 0x10000).substring(1));\n }\n }\n return out.toString();\n }",
"@Override\n\tpublic String strreplace(String str, char oldchar, char newchar) {\n\t\treturn null;\n\t}",
"private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }",
"@Test\n void should_describe_escaped_chars() {\n final char backspace = 8;\n final char tab = 9;\n final char lineFeed = 10;\n final char carriageReturn = 13;\n final char doubleQuote = 0x22;\n final char singleQuote = 0x27;\n final char backslash = 0x5C;\n // --end-->\n\n assertEquals(EscapedChars.BACKSPACE.getValue(), backspace);\n assertEquals(EscapedChars.TAB.getValue(), tab);\n assertEquals(EscapedChars.LINE_FEED.getValue(), lineFeed);\n assertEquals(EscapedChars.CARRIAGE_RETURN.getValue(), carriageReturn);\n assertEquals(EscapedChars.DOUBLE_QUOTE.getValue(), doubleQuote);\n assertEquals(EscapedChars.SINGLE_QUOTE.getValue(), singleQuote);\n assertEquals(EscapedChars.BACKSLASH.getValue(), backslash);\n }",
"public JsonFactory setCharacterEscapes(CharacterEscapes esc)\n/* */ {\n/* 666 */ this._characterEscapes = esc;\n/* 667 */ return this;\n/* */ }",
"static public void printesc(String s) {\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) >= ' ') {\n System.out.append(s.charAt(i));\n } else {\n System.out.append(\"\\\\\" + (int) s.charAt(i));\n }\n }\n System.out.println();\n }",
"static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }",
"public final void mSTRING() throws RecognitionException {\n try {\n int _type = STRING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // metamorph.runtime/src/antlr/Ast.g:40:5: ( '\\\"' ( ESC_SEQ |~ ( '\\\\\\\\' | '\\\"' ) )* '\\\"' )\n // metamorph.runtime/src/antlr/Ast.g:40:8: '\\\"' ( ESC_SEQ |~ ( '\\\\\\\\' | '\\\"' ) )* '\\\"'\n {\n match('\\\"'); \n\n // metamorph.runtime/src/antlr/Ast.g:40:12: ( ESC_SEQ |~ ( '\\\\\\\\' | '\\\"' ) )*\n loop3:\n do {\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0=='\\\\') ) {\n alt3=1;\n }\n else if ( ((LA3_0 >= '\\u0000' && LA3_0 <= '!')||(LA3_0 >= '#' && LA3_0 <= '[')||(LA3_0 >= ']' && LA3_0 <= '\\uFFFF')) ) {\n alt3=2;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // metamorph.runtime/src/antlr/Ast.g:40:14: ESC_SEQ\n \t {\n \t mESC_SEQ(); \n\n\n \t }\n \t break;\n \tcase 2 :\n \t // metamorph.runtime/src/antlr/Ast.g:40:24: ~ ( '\\\\\\\\' | '\\\"' )\n \t {\n \t if ( (input.LA(1) >= '\\u0000' && input.LA(1) <= '!')||(input.LA(1) >= '#' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\\uFFFF') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n match('\\\"'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }",
"public String replaceNonPrintableCharacters(String dataValueToTranslate) {\n\t\tSystem.out.println(\"Replacing non-printable characters in [\" + dataValueToTranslate + \"] with [\" + replaceNonPrintableCharactersWith + \"]\");\n\t\tString dataValue = dataValueToTranslate;\n\t\tif (!dataValueToTranslate.isEmpty()) {\n\t\t\t//dataValueToTranslate.replaceAll(\"\\\\p{C}\", replaceNonPrintableCharactersWith);\n\t\t\tString nonBreakingSpace = \"\\u00A0\";\n\t\t\tdataValueToTranslate.replaceAll(nonBreakingSpace, replaceNonPrintableCharactersWith);\n\t\t}\n\t\treturn dataValue;\n\t}",
"public static void main(String[] args) {\r\n String str = \"Filesystem 1K-blocks Used Available Use% Mounted on\\n\";\r\n str += \"/dev/sda1 7850996 1511468 5940716 21% /\\n\";\r\n str += \"tmpfs 258432 0 258432 0% /lib/init/rw\\n\";\r\n str += \"udev 10240 52 10188 1% /dev\\n\";\r\n str += \"tmpfs 258432 0 258432 0% /dev/shm\\n\";\r\n \r\n System.out.println(str);\r\n \r\n System.out.println(\"StringEscapeUtils.unescapeHtml(str):\");\r\n System.out.println(StringEscapeUtils.unescapeHtml(str));\r\n \r\n System.out.println(\"StringEscapeUtils.escapeHtml(str):\");\r\n System.out.println(StringEscapeUtils.escapeHtml(str));\r\n \r\n System.out.println(\"StringEscapeUtils.unescapeJava(str):\");\r\n System.out.println(StringEscapeUtils.unescapeJava(str));\r\n \r\n System.out.println(\"StringEscapeUtils.escapeJava(str):\");\r\n System.out.println(StringEscapeUtils.escapeJava(str));\r\n \r\n System.out.println(\"StringUtils.replace(str, \\\"\\n\\\", \\\"<br>\\\"):\");\r\n System.out.println(StringUtils.replace(str, \"\\n\", \"<br>\"));\r\n \r\n System.out.println(\"StringUtils.replace(str, \\\" \\\", \\\" \\\"):\");\r\n System.out.println(StringUtils.replace(str, \" \", \" \"));\r\n }",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"public String ReplaceCharacterwithAnotherCharacter(String str)\n {\n str=str.replace(\"d\",\"f\");\n str=str.replace(\"l\",\"t\");\n return str;\n }",
"public static String escapeJS(String inText)\n {\n return inText\n .replaceAll(\"(?<!\\\\\\\\)'\", \"\\\\\\\\'\")\n .replaceAll(\"(?<!\\\\\\\\)\\\"\", \"\\\\\\\\\\\"\")\n .replaceAll(\"\\n\", \"\\\\\\\\n\");\n }",
"public static String escape(String value, String escape) {\n String result = value.replace(\"_\", \"_\" + escape);\n result = result.replace(\"%\", \"%\" + escape);\n result = result.replace(escape, escape + escape);\n return result;\n }",
"public static String javaScriptStringEnc(String s) {\n int ln = s.length();\n for (int i = 0; i < ln; i++) {\n char c = s.charAt(i);\n if (c == '\"' || c == '\\'' || c == '\\\\' || c == '>' || c < 0x20) {\n StringBuffer b = new StringBuffer(ln + 4);\n b.append(s.substring(0, i));\n while (true) {\n if (c == '\"') {\n b.append(\"\\\\\\\"\");\n } else if (c == '\\'') {\n b.append(\"\\\\'\");\n } else if (c == '\\\\') {\n b.append(\"\\\\\\\\\");\n } else if (c == '>') {\n b.append(\"\\\\>\");\n } else if (c < 0x20) {\n if (c == '\\n') {\n b.append(\"\\\\n\");\n } else if (c == '\\r') {\n b.append(\"\\\\r\");\n } else if (c == '\\f') {\n b.append(\"\\\\f\");\n } else if (c == '\\b') {\n b.append(\"\\\\b\");\n } else if (c == '\\t') {\n b.append(\"\\\\t\");\n } else {\n b.append(\"\\\\x\");\n int x = c / 0x10;\n b.append((char)\n (x < 0xA ? x + '0' : x - 0xA + 'A'));\n x = c & 0xF;\n b.append((char)\n (x < 0xA ? x + '0' : x - 0xA + 'A'));\n }\n } else {\n b.append(c);\n }\n i++;\n if (i >= ln) {\n return b.toString();\n }\n c = s.charAt(i);\n }\n } // if has to be escaped\n } // for each characters\n return s;\n }",
"public String cyclifyWithEscapeChars() {\n return cyclify();\n }",
"@Test\n public void testReplacingFailure()\n {\n String expectedValue=\"datly fry\",actualValue;\n actualValue=replaceingchar.replaceChar(inputString);\n assertNotEquals(expectedValue,actualValue);\n }",
"String remEscapes(String str){\n StringBuilder retval = new StringBuilder();\n\n // remove leading/trailing \" or '\r\n int start = 1, end = str.length() - 1;\n\n if ((str.startsWith(SQ3) && str.endsWith(SQ3)) ||\n (str.startsWith(SSQ3) && str.endsWith(SSQ3))){\n // remove leading/trailing \"\"\" or '''\r\n start = 3;\n end = str.length() - 3;\n }\n\n for (int i = start; i < end; i++) {\n\n if (str.charAt(i) == '\\\\' && i+1 < str.length()){\n i += 1;\n switch (str.charAt(i)){\n\n case 'b':\n retval.append('\\b');\n continue;\n case 't':\n retval.append('\\t');\n continue;\n case 'n':\n retval.append('\\n');\n continue;\n case 'f':\n retval.append('\\f');\n continue;\n case 'r':\n retval.append('\\r');\n continue;\n case '\"':\n retval.append('\\\"');\n continue;\n case '\\'':\n retval.append('\\'');\n continue;\n case '\\\\':\n retval.append('\\\\');\n continue;\n }\n\n }\n else {\n retval.append(str.charAt(i));\n }\n }\n\n return retval.toString();\n }",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"public static String escapeHTML(String s) {\n return escapeHTML(s, true);\n }"
] |
[
"0.6829178",
"0.6827824",
"0.6427361",
"0.6325252",
"0.6263673",
"0.6260961",
"0.6256443",
"0.62335074",
"0.6225013",
"0.61885124",
"0.61789227",
"0.6166455",
"0.60198474",
"0.5978289",
"0.59204054",
"0.5901861",
"0.5892002",
"0.58897394",
"0.5879344",
"0.5868268",
"0.5860461",
"0.58585596",
"0.5841102",
"0.58327323",
"0.5823604",
"0.5799435",
"0.5790059",
"0.5760651",
"0.5681349",
"0.5680302",
"0.560372",
"0.55980015",
"0.5571224",
"0.555259",
"0.55525434",
"0.55431294",
"0.551571",
"0.5488663",
"0.54554826",
"0.5448952",
"0.5431412",
"0.54136515",
"0.5394825",
"0.53933305",
"0.53691787",
"0.5360937",
"0.53412503",
"0.52968454",
"0.52795726",
"0.52713895",
"0.5264027",
"0.52541137",
"0.5236488",
"0.52215075",
"0.5215258",
"0.5204122",
"0.520248",
"0.51982963",
"0.51678264",
"0.5141234",
"0.5135434",
"0.51349974",
"0.51141566",
"0.5095905",
"0.50867397",
"0.50763595",
"0.5074567",
"0.50657713",
"0.50657153",
"0.50478303",
"0.50013906",
"0.49986318",
"0.49903548",
"0.49901527",
"0.49842215",
"0.4980318",
"0.49737656",
"0.49422",
"0.49411112",
"0.49395752",
"0.493891",
"0.49338934",
"0.49219698",
"0.4901517",
"0.48992097",
"0.48938137",
"0.48936433",
"0.4892142",
"0.48874715",
"0.48854142",
"0.48777342",
"0.48693305",
"0.48568335",
"0.4844663",
"0.48401976",
"0.48023883",
"0.4792857",
"0.4786959",
"0.47847787",
"0.47837532",
"0.47799128"
] |
0.0
|
-1
|
Created by Administrator on 2015/9/12 0012.
|
public interface Sorter {
int[] sort(int[] sequence);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private stendhal() {\n\t}",
"public void mo38117a() {\n }",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"public void mo12930a() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"public void mo6081a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void mo3376r() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo21877s() {\n }",
"public void verarbeite() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"public Pitonyak_09_02() {\r\n }",
"public void mo1531a() {\n }",
"public void mo21878t() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo21779D() {\n }",
"protected void mo6255a() {\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n public void func_104112_b() {\n \n }",
"public void designBasement() {\n\t\t\r\n\t}",
"public void mo97908d() {\n }",
"public void mo9848a() {\n }",
"public void mo3749d() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"public void mo21785J() {\n }",
"public static void listing5_14() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void mo21825b() {\n }",
"@Override\n public void memoria() {\n \n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo115190b() {\n }",
"private void m50366E() {\n }",
"public void mo21793R() {\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"public void mo3370l() {\n }",
"static void feladat9() {\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public void mo21791P() {\n }",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public final void mo91715d() {\n }",
"public void mo21783H() {\n }",
"public void mo21795T() {\n }",
"public void mo56167c() {\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo21794S() {\n }",
"public void mo115188a() {\n }",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"@Override\n\tpublic void afterInit() {\n\t\t\n\t}",
"public void mo2470d() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void mo21787L() {\n }",
"@Override\n\tprotected void onCreate() {\n\t}",
"protected void aktualisieren() {\r\n\r\n\t}",
"static void feladat7() {\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 protected void initialize() {\n\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"public void mo44053a() {\n }",
"public void mo2471e() {\n }",
"public void mo21782G() {\n }",
"@Override\n protected void getExras() {\n }",
"public void mo5382o() {\n }"
] |
[
"0.6051609",
"0.59261566",
"0.5892088",
"0.58687013",
"0.585219",
"0.5844124",
"0.5835625",
"0.57923186",
"0.5778863",
"0.5766133",
"0.5766133",
"0.5766133",
"0.5766133",
"0.5766133",
"0.5766133",
"0.5766133",
"0.5762591",
"0.5756782",
"0.57557726",
"0.57533586",
"0.5747343",
"0.5731426",
"0.5719266",
"0.5704354",
"0.5677974",
"0.5676933",
"0.567617",
"0.567617",
"0.5670261",
"0.5670261",
"0.56613594",
"0.5618418",
"0.56125134",
"0.5610046",
"0.5597997",
"0.55661124",
"0.55596364",
"0.555796",
"0.5556826",
"0.553576",
"0.55313087",
"0.55252564",
"0.55240977",
"0.5515277",
"0.55071414",
"0.54995936",
"0.5493813",
"0.5480745",
"0.54797554",
"0.5478363",
"0.5477773",
"0.54760706",
"0.54694563",
"0.5469315",
"0.5464943",
"0.54637325",
"0.54632294",
"0.5454186",
"0.5449426",
"0.54444194",
"0.5438713",
"0.54352754",
"0.5433795",
"0.543247",
"0.54222775",
"0.54150206",
"0.5412543",
"0.5411877",
"0.5408819",
"0.54037166",
"0.5402623",
"0.54009056",
"0.53955257",
"0.53940547",
"0.5383435",
"0.5380312",
"0.5379559",
"0.53755915",
"0.53748435",
"0.5374727",
"0.5371803",
"0.5368819",
"0.5368819",
"0.5359969",
"0.5358174",
"0.5357967",
"0.5357872",
"0.53559375",
"0.53545314",
"0.5352347",
"0.5352347",
"0.5352347",
"0.5352347",
"0.5352347",
"0.5345881",
"0.53439015",
"0.53396183",
"0.5337456",
"0.5335163",
"0.53335094",
"0.53248626"
] |
0.0
|
-1
|
Called when the activity is first created.
|
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ps);
txtRadio = (TextView) findViewById(R.id.txtRadio);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }",
"protected void onCreate() {\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}",
"@Override\n public void onCreate()\n {\n\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n initData();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }",
"@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}",
"protected void onFirstTimeLaunched() {\n }",
"@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }",
"@Override\n public void onCreate() {\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}",
"@Override\n public void onCreate() {\n\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}",
"public void onCreate() {\n }",
"@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}",
"@Override\n\tpublic void onCreate() {\n\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }",
"@Override\n public void onCreate()\n {\n\n\n }",
"@Override\n\tprotected void onCreate() {\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}",
"public void onCreate();",
"public void onCreate();",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }",
"@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}",
"@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }",
"public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }",
"@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }",
"@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }",
"@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}",
"@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }"
] |
[
"0.791686",
"0.77270156",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7637394",
"0.7637394",
"0.7629958",
"0.76189965",
"0.76189965",
"0.7543775",
"0.7540053",
"0.7540053",
"0.7539505",
"0.75269467",
"0.75147736",
"0.7509639",
"0.7500879",
"0.74805456",
"0.7475343",
"0.7469598",
"0.7469598",
"0.7455178",
"0.743656",
"0.74256307",
"0.7422192",
"0.73934627",
"0.7370002",
"0.73569906",
"0.73569906",
"0.7353011",
"0.7347353",
"0.7347353",
"0.7333878",
"0.7311508",
"0.72663945",
"0.72612154",
"0.7252271",
"0.72419256",
"0.72131634",
"0.71865886",
"0.718271",
"0.71728176",
"0.7168954",
"0.7166841",
"0.71481615",
"0.7141478",
"0.7132933",
"0.71174103",
"0.7097966",
"0.70979583",
"0.7093163",
"0.7093163",
"0.7085773",
"0.7075851",
"0.7073558",
"0.70698684",
"0.7049258",
"0.704046",
"0.70370424",
"0.7013127",
"0.7005552",
"0.7004414",
"0.7004136",
"0.69996923",
"0.6995201",
"0.69904065",
"0.6988358",
"0.69834954",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69783133",
"0.6977392",
"0.69668365",
"0.69660246",
"0.69651115",
"0.6962911",
"0.696241",
"0.6961096",
"0.69608897",
"0.6947069",
"0.6940148",
"0.69358927",
"0.6933102",
"0.6927288",
"0.69265485",
"0.69247025"
] |
0.0
|
-1
|
If all of the checkboxes were selected, return true
|
private boolean checkQuestion9() {
chkBox1_Q9 = (CheckBox) findViewById(R.id.chkBox1_Q9);
chkBox2_Q9 = (CheckBox) findViewById(R.id.chkBox2_Q9);
chkBox3_Q9 = (CheckBox) findViewById(R.id.chkBox3_Q9);
if (chkBox1_Q9.isChecked() && chkBox2_Q9.isChecked() && chkBox3_Q9.isChecked()) {
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean allDaysSelected() {\n return selectedDays.size() == 7;\n }",
"public boolean allDaysSelected() {\n return selectedDays.size() == 7;\n }",
"boolean isSetMultiple();",
"boolean hasAll();",
"boolean hasAll();",
"public void selectAllCheckBox(){\r\n\t\tfor (WebElement cbox : checkbox) {\r\n\t\t\tif(!cbox.isSelected()){\r\n\t\t\t\tcbox.click();\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}",
"public boolean areAllAnswersCollect(){\n\t\tif(selectedA.isEmpty())\n\t\t\treturn false;\n\t\telse{\n\t\t\n\t\tfor(String Aanswer:selectedA){\n\t\t\tif(!(correctA.contains(Aanswer)))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn (selectedA.size() == correctA.size());\n\t\t}\n\t}",
"boolean hasStablesSelected();",
"private boolean isAllProceduresChecked(List<IacucProtocolSpeciesStudyGroup> iacucProtocolSpeciesStudyGroups) {\n boolean allProceduresSelected = true; \n for(IacucProtocolSpeciesStudyGroup iacucProtocolSpeciesStudyGroup : iacucProtocolSpeciesStudyGroups) {\n iacucProtocolSpeciesStudyGroup.setAllProceduresSelected(true);\n for(IacucProtocolStudyGroupBean iacucProtocolStudyGroupBean : iacucProtocolSpeciesStudyGroup.getResponsibleProcedures()) {\n if(!iacucProtocolStudyGroupBean.isProcedureSelected()) {\n allProceduresSelected = false;\n iacucProtocolSpeciesStudyGroup.setAllProceduresSelected(false);\n break;\n }\n }\n }\n return allProceduresSelected;\n }",
"public void checkOrUnCheckAllCheckBox(boolean isCheck) {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // verify \"CheckAll\" check box is checked when all check box are check\n //// check all check box in ToDo page\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBox(eleToDoCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n\n if (!checkEmptyToDoCompleteListRow) {\n result = checkAllCheckBox(eleToDoCompleteCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n if (result) {\n NXGReports.addStep(\"Check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"Uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }",
"public void selectCheckBoxes(){\n fallSemCheckBox.setSelected(true);\n springSemCheckBox.setSelected(true);\n summerSemCheckBox.setSelected(true);\n allQtrCheckBox.setSelected(true);\n allMbaCheckBox.setSelected(true);\n allHalfCheckBox.setSelected(true);\n allCampusCheckBox.setSelected(true);\n allHolidayCheckBox.setSelected(true);\n fallSemCheckBox.setSelected(true);\n// allTraTrbCheckBox.setSelected(true);\n }",
"public void verifyCheckAllCheckBoxIsCheckOrUncheck(boolean isCheck) {\n waitForVisibleElement(eleCheckAllCheckBox, \"CheckAll check box\");\n if (isCheck) {\n if (!eleCheckAllCheckBox.isSelected()) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: CheckAll check box do not auto check in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return;\n }\n } else {\n if (eleCheckAllCheckBox.isSelected()) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: CheckAll check box do not auto uncheck in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return;\n }\n }\n if (isCheck) {\n NXGReports.addStep(\"'CheckAll' check box is check when check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"'CheckAll' check box is uncheck when uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }",
"@FXML\n private void selectAllCheckBoxes(ActionEvent e)\n {\n if (selectAllCheckBox.isSelected())\n {\n selectCheckBoxes();\n }\n else\n {\n unSelectCheckBoxes();\n }\n \n handleCheckBoxAction(new ActionEvent());\n }",
"public String getIsSelectedAll() {\r\n return this.stemSearch.getIsSelectedAll().toString();\r\n }",
"private void checkSelectable() {\n \t\tboolean oldIsSelectable = isSelectable;\n \t\tisSelectable = isSelectAllEnabled();\n \t\tif (oldIsSelectable != isSelectable) {\n \t\t\tfireEnablementChanged(SELECT_ALL);\n \t\t}\n \t}",
"private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}",
"private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}",
"public void verifyAllCheckBoxIsCheckOrUnCheck(boolean isCheck) {\n try {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBoxIsCheckOrUnCheck(eleToDoCheckboxRow, isCheck);\n }\n if (!checkEmptyToDoCompleteListRow) {\n if (result)\n checkAllCheckBoxIsCheckOrUnCheck(eleToDoCompleteCheckboxRow, isCheck);\n }\n Assert.assertTrue(result, \"All checkbox do not check/uncheck\");\n if (isCheck) {\n NXGReports.addStep(\"All check box are check in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"All check box are uncheck in ToDo page\", LogAs.PASSED, null);\n }\n\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: All check box are not check in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: All check box are not uncheck in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }\n }",
"private boolean checkSetOfFeatures() {\n\t\t\n\t\tif ((sentimentRelatedFeatures.isSelected() && numberOfSentimentRelatedFeatures==0) ||\n\t\t\t(punctuationFeatures.isSelected() && numberOfPunctuationFeatures==0) ||\n\t\t\t(stylisticFeatures.isSelected() && numberOfStylisticFeatures==0) ||\n\t\t\t(semanticFeatures.isSelected() && numberOfSemanticFeatures==0) ||\n\t\t\t(unigramFeatures.isSelected() && numberOfUnigramFeatures==0) ||\n\t\t\t(topWordsFeatures.isSelected() && numberOfTopWordsFeatures==0) ||\n\t\t\t(patternFeatures.isSelected() && numberOfPatternFeatures==0))\n\t\t\t\n\t\t\t{\n\t\t\tboolean test = ConfirmBox.display(\"Attention\", \"You have chosen to use one or more set(s) of features, however you have not set the corresponding parameters yet. Are you sure you want to continue?\");\n\t\t\tif (test==false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ((!sentimentRelatedFeatures.isSelected() && numberOfSentimentRelatedFeatures!=0) ||\n\t\t\t(!punctuationFeatures.isSelected() && numberOfPunctuationFeatures!=0) ||\n\t\t\t(!stylisticFeatures.isSelected() && numberOfStylisticFeatures!=0) ||\n\t\t\t(!semanticFeatures.isSelected() && numberOfSemanticFeatures!=0) ||\n\t\t\t(!unigramFeatures.isSelected() && numberOfUnigramFeatures!=0) ||\n\t\t\t(!topWordsFeatures.isSelected() && numberOfTopWordsFeatures!=0) ||\n\t\t\t(!patternFeatures.isSelected() && numberOfPatternFeatures!=0))\n\t\t\t\t\n\t\t\t\t{\n\t\t\t\tboolean test = ConfirmBox.display(\"Attention\", \"You have customized one or more set(s) of features, however you have not selected this (these) set(s) to be extracted. Are you sure you want to continue?\");\n\t\t\t\tif (test==false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"private void checkAtLeastOneRuleIsSelected() {\n\t\tsufficientRulesSelected = false;\n\t\tint checked = 0;\n\t\tControl[] controlArray = rulesGroup.getChildren();\n\n\t\tfor (Control elem : controlArray) {\n\t\t\tif (elem instanceof Button) {\n\t\t\t\tif (((Button) elem).getSelection()) {\n\t\t\t\t\tchecked++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checked >= 1)\n\t\t\tsufficientRulesSelected = true;\n\t\tupdateFinishButton();\n\t}",
"boolean hasSelectedTransport()\n {\n for(JCheckBoxMenuItem item : transportMenuItems.values())\n {\n if(item.isSelected())\n return true;\n }\n\n return false;\n }",
"public boolean allAre(ISelect s){\r\n return true; \r\n }",
"boolean hasBracksSelected();",
"private boolean isAllIngredientOk(ArrayList<Boolean> listOfBool) {\n if (listOfBool.isEmpty() || listOfBool.contains(false))\n return false;\n return true;\n }",
"public boolean isMultiSelection()\n\t{\n\t\treturn this.isMultiple();\n\t}",
"private boolean[] getCheckBoxes() {\n\t\tHBox n4 = (HBox) uicontrols.getChildren().get(4);\n\t\tCheckBox b1 = (CheckBox) n4.getChildren().get(0);\n\t\tCheckBox b2 = (CheckBox) n4.getChildren().get(1);\n\t\tCheckBox b3 = (CheckBox) n4.getChildren().get(2);\n\t\tCheckBox b4 = (CheckBox) n4.getChildren().get(3);\n\t\tboolean[] boxes = { b1.isSelected(),b2.isSelected(),b3.isSelected(),b4.isSelected()};\n\t\treturn boxes;\n\t}",
"private boolean validateInputs(){\n if(jrTakeTest.isSelected()==false && jrViewScores.isSelected()==false && jrChangePassword.isSelected()==false)\n return false;\n return true;\n}",
"private boolean checkQuestion6() {\n CheckBox answer1CheckBox = (CheckBox) findViewById(R.id.q_6_answer_1);\n CheckBox answer2CheckBox = (CheckBox) findViewById(R.id.q_6_answer_2);\n CheckBox answer3CheckBox = (CheckBox) findViewById(R.id.q_6_answer_3);\n if (answer1CheckBox.isChecked() && answer2CheckBox.isChecked() && answer3CheckBox.isChecked()) {\n return true;\n }\n return false;\n }",
"public void checkOrUnCheckCheckAllCheckBox(boolean isCheck) {\n try {\n waitForVisibleElement(eleCheckAllCheckBox, \"'CheckAll' check box\");\n hoverElement(eleCheckAllCheckBox, \"Hover 'CheckAll' check box\");\n if (isCheck) {\n if (!eleCheckAllCheckBox.isSelected()) {\n clickElement(eleCheckAllCheckBox, \"Check on 'CheckAll' checkbox\");\n } else {\n clickElement(eleCheckAllCheckBox, \"Un check on 'CheckAll' checkbox\");\n clickElement(eleCheckAllCheckBox, \"Check on 'CheckAll' checkbox\");\n }\n NXGReports.addStep(\"Check on 'CheckAll' check box in ToDo page complete\", LogAs.PASSED, null);\n } else {\n if (eleCheckAllCheckBox.isSelected()) {\n clickElement(eleCheckAllCheckBox, \"Un Check on 'CheckAll' checkbox\");\n } else {\n clickElement(eleCheckAllCheckBox, \"Un check on 'CheckAll' checkbox\");\n clickElement(eleCheckAllCheckBox, \"Check on 'CheckAll' checkbox\");\n }\n NXGReports.addStep(\"UnCheck on 'CheckAll' check box in ToDo page complete\", LogAs.PASSED, null);\n }\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Can not check/uncheck 'CheckAll' check box in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"public boolean testSelected() {\n // test if set\n boolean set = Card.isSet(\n selectedCards.get(0).getCard(),\n selectedCards.get(1).getCard(),\n selectedCards.get(2).getCard()\n );\n\n // set currentlySelected to false and replace with new Cards (if applicable)\n for (BoardSquare bs : selectedCards)\n bs.setCurrentlySelected(false);\n\n // handle if set\n if (set) {\n if (!deck.isEmpty() && this.numCardsOnBoard() == 12) {\n for (BoardSquare bs : selectedCards)\n bs.setCard(deck.getTopCard());\n }\n else if (!deck.isEmpty() && this.numCardsOnBoard() < 12) {\n board.compressBoard(selectedCards);\n this.add3();\n }\n else {\n board.compressBoard(selectedCards);\n }\n }\n\n // clear ArrayList\n selectedCards.clear();\n\n // return bool\n return set;\n }",
"public boolean CheckBox() {\n if (AseguradoCulpable.isSelected()) {\n return true;\n } else {\n return false;\n }\n }",
"private boolean checkboxQuestion() {\n CheckBox detectiveCheck = (CheckBox) findViewById(R.id.greatest_detective);\n CheckBox greatestCheck = (CheckBox) findViewById(R.id.dark_knight);\n CheckBox boyWonderCheck = (CheckBox) findViewById(R.id.boy_wonder);\n CheckBox manOfSteelCheck = (CheckBox) findViewById(R.id.man_of_steel);\n\n boolean detectiveCheckChecked = detectiveCheck.isChecked();\n boolean greatestCheckChecked = greatestCheck.isChecked();\n boolean boyWonderCheckChecked = boyWonderCheck.isChecked();\n boolean manOfSteelCheckChecked = manOfSteelCheck.isChecked();\n\n return detectiveCheckChecked && greatestCheckChecked && !boyWonderCheckChecked && !manOfSteelCheckChecked;\n\n }",
"public boolean checkAllCheckBoxIsCheckOrUnCheck(List<WebElement> checkBoxList, boolean isCheck) {\n int totalRows = checkBoxList.size();\n for (int i = 0; i < totalRows; i++) {\n if (isCheck) {\n if (!checkBoxList.get(i).isSelected())\n return false;\n } else {\n if (checkBoxList.get(i).isSelected())\n return false;\n }\n }\n return true;\n }",
"public Boolean isMultipleSelection() {\n return m_multipleSelection;\n }",
"public boolean checkAllCheckBox(List<WebElement> checkBoxList, boolean isCheck) {\n int beforeError = AbstractService.sStatusCnt;\n int totalRows = checkBoxList.size();\n for (int i = 0; i < totalRows; i++) {\n if (isCheck) {\n if (!checkBoxList.get(i).isSelected()) {\n hoverElement(checkBoxList.get(i), \"Hover check box\");\n clickElement(checkBoxList.get(i), \"Check on check box\");\n\n }\n } else {\n if (checkBoxList.get(i).isSelected()) {\n hoverElement(checkBoxList.get(i), \"Hover check box\");\n clickElement(checkBoxList.get(i), \"Un check on check box\");\n }\n\n }\n int afterError = AbstractService.sStatusCnt;\n if (beforeError != afterError)\n return false;\n }\n return true;\n }",
"public void enableCheckBoxes(){\n fallSemCheckBox.setDisable(false);\n springSemCheckBox.setDisable(false);\n summerSemCheckBox.setDisable(false);\n allQtrCheckBox.setDisable(false);\n allMbaCheckBox.setDisable(false);\n allHalfCheckBox.setDisable(false);\n allCampusCheckBox.setDisable(false);\n allHolidayCheckBox.setDisable(false);\n fallSemCheckBox.setDisable(false);\n// allTraTrbCheckBox.setDisable(false);\n selectAllCheckBox.setDisable(false);\n //Set selection for select all check box to true\n selectAllCheckBox.setSelected(true);\n }",
"public boolean hasAll() {\n return all_ != null;\n }",
"public boolean hasAll() {\n return all_ != null;\n }",
"private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}",
"public void testMarkAllItemsSelected()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelected(2l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertTrue(newCategory2.getEntry(\"item6\").getIsSelected());\t\t\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelected(2l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\t\n\t}",
"public boolean isApplied() {\n return selectedDatasetNumbers.size() > 1;\n }",
"boolean isSelected();",
"boolean isSelected();",
"boolean isSelected();",
"private boolean isEnableConfirmBtns() {\n int count = mManualItemArray.size();\n for (int i = 0; i < count; i++) {\n ListViewItem item = mManualItemArray.get(i);\n if (item.mNeedCheckBox && item.mIsChecked) {\n return true;\n }\n }\n return false;\n }",
"private boolean checkAllFields() {\n formValues.clear();\n\n if (genderRadio != null) {\n RadioButton gender = (RadioButton) findViewById(genderRadio.getCheckedRadioButtonId());\n formValues.add(gender.getText().toString());\n }\n\n boolean shouldPassToActivity = true;\n for (Map.Entry<EditText, Boolean> entry : map.entrySet()) {\n if (!checkFieldColor(entry.getKey(), entry.getValue())) shouldPassToActivity = false;\n if (shouldPassToActivity) formValues.add(entry.getKey().getText().toString());\n }\n\n return shouldPassToActivity;\n }",
"public boolean isSelected() {\n return checkbox.isSelected();\n }",
"private boolean validateAnswer() {\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n int checkboxSelected = 0;\n\n if (checkbox1.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox2.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox3.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n\n if (checkboxSelected == 2) {\n return true;\n }\n else{\n Toast.makeText(this, getString(R.string.message_two_correct), Toast.LENGTH_SHORT).show();\n return false;\n }\n }",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"public boolean isSetSldAll()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SLDALL$6) != 0;\n }\n }",
"public final AntlrDatatypeRuleToken ruleSelectAllCheckboxes() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2109:28: (kw= 'selectAllCheckBoxes' )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2111:2: kw= 'selectAllCheckBoxes'\n {\n kw=(Token)match(input,48,FOLLOW_48_in_ruleSelectAllCheckboxes4242); \n\n current.merge(kw);\n newLeafNode(kw, grammarAccess.getSelectAllCheckboxesAccess().getSelectAllCheckBoxesKeyword()); \n \n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"private void checkCheckboxes(Order orderToLoad) {\n Map<String, CheckBox> checkBoxes = new TreeMap<>(){{\n put(\"PNEU\",pneuCB);\n put(\"OIL\",oilCB);\n put(\"BATTERY\",batCB);\n put(\"AC\",acCB);\n put(\"WIPER\",wipCB);\n put(\"COMPLETE\",comCB);\n put(\"GEOMETRY\",geoCB);\n }};\n for (String problem : orderToLoad.getProblems()) {\n if (checkBoxes.containsKey(problem)){\n checkBoxes.get(problem).setSelected(true);\n }\n }\n }",
"private boolean checkQuestion6() {\n chkBox3_Q6 = (CheckBox) findViewById(R.id.chkBox3_Q6);\n chkBox2_Q6 = (CheckBox) findViewById(R.id.chkBox2_Q6);\n chkBox1_Q6 = (CheckBox) findViewById(R.id.chkBox1_Q6);\n if (chkBox3_Q6.isChecked() && !chkBox1_Q6.isChecked() && chkBox2_Q6.isChecked()) {\n return true;\n }\n return false;\n }",
"private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}",
"public final boolean hasActorsSelected() {\n return (selectedActors.size() > 0);\n }",
"public boolean isAllValues() { return this.isAll; }",
"private boolean checkSelectAll(){\n\t\tboolean ans = false;\n\t\tint i =0;//# of *\n\t\tfor(String temp : this.attrList){\n\t\t\tif(temp.equals(\"*\")){\n\t\t\t\t// ans = true;\n\t\t\t\ti++;\n\t\t\t\t// break;\n\t\t\t\tif (i==tableNames.size()) {\n\t\t\t\t\tans = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}",
"@Step(\"Select and assert checkboxes\")\n public void selectCheckBox() {\n //http://selenide.org/javadoc/3.5/com/codeborne/selenide/SelenideElement.html\n $(\"label:contains('Water')\").scrollTo();\n $(\"label:contains('Water')\").setSelected(true);\n $(\".label-checkbox:contains('Water') input\").shouldBe(checked);\n logList.add(CHECKBOX1.toString());\n $(\".label-checkbox:contains('Wind')\").scrollTo();\n $(\".label-checkbox:contains('Wind')\").setSelected(true);\n $(\".label-checkbox:contains('Wind') input\").shouldBe(checked);\n logList.add(CHECKBOX2.toString());\n }",
"public boolean hasAll() {\n return allBuilder_ != null || all_ != null;\n }",
"public boolean hasAll() {\n return allBuilder_ != null || all_ != null;\n }",
"final void refreshCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"refreshCheckBoxes\");\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n this.chkMsdtSelection.get(msdt).setSelected(false);\r\n } else {\r\n this.chkMsdtSelection.get(msdt).setSelected(true);\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"refreshCheckBoxes\");\r\n }",
"boolean isChecked();",
"boolean isChecked();",
"private boolean checkBox() {\n if(ToSCheckBox.isSelected()) { return true; }\n else {\n errorMessage.setText(\"Please check that you have read and agree to \" +\n \"the Terms of Service agreement.\");\n return false;\n }\n }",
"boolean hasIronSelected();",
"public boolean isInterestedInAllItems();",
"private boolean isAllTrue(HashMap<Integer, Boolean> messages)\r\n {\r\n // Iterate through each value for each key in the map.\r\n for(boolean value : messages.values())\r\n {\r\n // If a value is false, then return false.\r\n if(!value)\r\n {\r\n return false;\r\n }\r\n }\r\n // If all values are true, then return true.\r\n return true;\r\n }",
"public void chk_element(WebDriver driver,String[] selObj, String cusObj){\n\t\t\tfor (int K = 0; K < selObj.length; K++) {\r\n\t\t\t\tWebElement elem = cmf.checkBox(cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\tdriver);\r\n\t\t\t\tif (!elem.isDisplayed()){\r\n\t\t\t\t\t((JavascriptExecutor) driver).executeScript(\r\n\t\t\t \"arguments[0].scrollIntoView();\", elem);\r\n\t\t\t\t}\r\n\t\t\t\tif (elem.getAttribute(\"checked\") == null) {\r\n\t\t\t\t\tcmf.clkElement(driver, cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\t\tselObj[K], extent, test);\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\ttest.log(LogStatus.PASS, \"Region\", \"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\tcmf.sleep(500);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"Element \" + EndUser.custom_region_obj + \"'\" + selObj[K]\r\n\t\t\t\t\t\t\t+ \"']\" + \" already checked\");\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t\ttest.log(LogStatus.INFO, \"Region\",\r\n\t\t\t\t\t\t\t\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}",
"org.apache.xmlbeans.XmlBoolean xgetMultiple();",
"private boolean testMultiple(Set<Long> selectedSet, int columnId, boolean defaultflag) {\n final Cursor c = mListAdapter.getCursor();\n if (c == null || c.isClosed()) {\n return false;\n }\n c.moveToPosition(-1);\n while (c.moveToNext()) {\n long id = c.getInt(MessagesAdapter.COLUMN_ID);\n if (selectedSet.contains(Long.valueOf(id))) {\n if (c.getInt(columnId) == (defaultflag ? 1 : 0)) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean isAnswered() {\n\t\tfor (boolean b : this.checked) {\n\t\t\tif (b)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void testMarkAllItemsSelectedInCategory()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t}",
"public void cabSelectAll() {\n ListView lv = getListView();\n int vCnt = lv.getCount();\n \n if (this.selectedListItems.size() == vCnt) {\n \tcabDeselectAll();\n \treturn;\n }\n \n // clear this out because it will be reset in the\n // onItemCheckedStateChanged callback\n selectedListItems.clear();\n for (int i = 0; i < vCnt; i++) {\n \tlv.setItemChecked(i, true);\n }\n \n redrawListView();\n }",
"private boolean checkQuestion5() {\n chkBox1_Q5 = (CheckBox) findViewById(R.id.chkBox1_Q5);\n chkBox2_Q5 = (CheckBox) findViewById(R.id.chkBox2_Q5);\n chkBox3_Q5 = (CheckBox) findViewById(R.id.chkBox3_Q5);\n if (chkBox1_Q5.isChecked() && chkBox2_Q5.isChecked() && !chkBox3_Q5.isChecked()) {\n return true;\n }\n return false;\n }",
"private void habilitaCampos() {\n for(java.util.ArrayList<JCheckBox> hijosAux: hijos)\n for(JCheckBox hijo: hijosAux)\n if(!hijo.isSelected())\n hijo.setSelected(true);\n \n }",
"protected boolean isAllJava() {\r\n System.out.println(\"RefactoringAction.isAllJava()\");\r\n if (selectedFileSet == null) {\r\n return true;\r\n } else {\r\n return selectedFileSet.isAllJava();\r\n }\r\n }",
"public boolean containsAll(Collection<?> arg0) {\n\t\treturn false;\n\t}",
"public boolean isSelected() {\n\t\treturn _booleanNode.isPartiallyTrue();\n\t}",
"public boolean isMultiSelection()\n {\n return multiSelection;\n }",
"public abstract boolean hasSelection();",
"public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }",
"private boolean checkAnswerOne() {\n CheckBox correctAnswer1Q1 = findViewById(R.id.qs1Ans1);\n CheckBox correctAnswer2Q1 = findViewById(R.id.qs1Ans3);\n correctAnswer1Q1.setTextColor(Color.parseColor(\"green\"));\n correctAnswer2Q1.setTextColor(Color.parseColor(\"green\"));\n return ((correctAnswer1Q1.isChecked()) && (correctAnswer2Q1.isChecked()));\n }",
"private boolean searchButtonEnabler(){\n //Check if there is any search text\n if(this.jTextFieldSearchWord.getText().trim().length()>0){\n //Get all the components from the check box container\n for(Component component:this.jLayeredPaneResultsChooser.getComponents()){\n //Check if it is a check box\n if(component instanceof javax.swing.JCheckBox){\n //If it is a check box then check if it is selected\n if(((javax.swing.JCheckBox)component).isSelected()){\n //If it is selected the set the button enabled\n this.jButtonSearch.setEnabled(true);\n //Exit the method as we need only one check box to be selected\n return true;\n }\n }\n }\n }\n //Nothing was selected so set button to disabled\n this.jButtonSearch.setEnabled(false);\n return false;\n }",
"public boolean areAllItemsSelectable() { return false; }",
"public boolean checarRespuesta(Opcion[] opciones) {\n boolean correcta = false;\n\n for (int i = 0; i < radios.size(); i++) {\n if (radios.get(i).isSelected() && opciones[i].isCorrecta()) {\n System.out.println(\"Ya le atinaste\");\n correcta = true;\n break;\n }\n }\n\n return correcta;\n }",
"private boolean checkSelected() {\n\t\tRadioButton c1 = (RadioButton)findViewById(R.id.ch_01Setting);\n\t\tRadioButton c2 = (RadioButton)findViewById(R.id.ch_02Setting);\n\t\tRadioButton c3 = (RadioButton)findViewById(R.id.ch_03Setting);\n\t\tRadioButton c4 = (RadioButton)findViewById(R.id.ch_04Setting);\n\t\tRadioButton c5 = (RadioButton)findViewById(R.id.ch_05Setting);\n\t\tRadioButton c6 = (RadioButton)findViewById(R.id.ch_06Setting);\n\t\tRadioButton c061 = (RadioButton)findViewById(R.id.ch_061Setting);\n\t\tRadioButton c7 = (RadioButton)findViewById(R.id.ch_07Setting);\n\t\tRadioButton c8 = (RadioButton)findViewById(R.id.ch_08Setting);\n\t\tRadioButton c9 = (RadioButton)findViewById(R.id.ch_09Setting);\n\t\tRadioButton c10 = (RadioButton)findViewById(R.id.ch_10Setting);\n\t\tRadioButton c11 = (RadioButton)findViewById(R.id.ch_11Setting);\n\t\tRadioButton c111 = (RadioButton)findViewById(R.id.ch_111Setting);\n\t\tRadioButton c12 = (RadioButton)findViewById(R.id.ch_12Setting);\n\t\tRadioButton c13 = (RadioButton)findViewById(R.id.ch_13Setting);\n\t\tRadioButton c131 = (RadioButton)findViewById(R.id.ch_131Setting);\n\t\tRadioButton c14 = (RadioButton)findViewById(R.id.ch_14Setting);\n\t\tRadioButton c15 = (RadioButton)findViewById(R.id.ch_15Setting);\n\t\tRadioButton c16 = (RadioButton)findViewById(R.id.ch_16Setting);\n\t\tRadioButton c17 = (RadioButton)findViewById(R.id.ch_17Setting);\n\t\tRadioButton c18 = (RadioButton)findViewById(R.id.ch_18Setting);\n\t\tRadioButton c19 = (RadioButton)findViewById(R.id.ch_19Setting);\n\t\tRadioButton c20 = (RadioButton)findViewById(R.id.ch_20Setting);\n\t\tRadioButton c21 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c22 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c23 = (RadioButton)findViewById(R.id.ch_23Setting);\n\t\tRadioButton c24 = (RadioButton)findViewById(R.id.ch_24Setting);\n\t\tRadioButton c25 = (RadioButton)findViewById(R.id.ch_25Setting);\n\t\tRadioButton c26 = (RadioButton)findViewById(R.id.ch_26Setting);\n\t\tRadioButton c27 = (RadioButton)findViewById(R.id.ch_27Setting);\n\t\tRadioButton c28 = (RadioButton)findViewById(R.id.ch_28Setting);\n\t\tRadioButton c29 = (RadioButton)findViewById(R.id.ch_29Setting);\n\t\tRadioButton c291 = (RadioButton)findViewById(R.id.ch_291Setting);\n\t\tRadioButton c30 = (RadioButton)findViewById(R.id.ch_30Setting);\n\t\tRadioButton c31 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c32 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c321 = (RadioButton)findViewById(R.id.ch_321Setting);\n\t\tRadioButton c322 = (RadioButton)findViewById(R.id.ch_322Setting);\n\t\t\t\n\t\t\n\t\t\n\t\treturn (c1.isChecked() || c2.isChecked() || c3.isChecked() || \n\t\t\t\tc4.isChecked() || c5.isChecked() || c6.isChecked() || \n\t\t\t\tc061.isChecked() || c7.isChecked() || c8.isChecked() ||\n\t\t\t\tc9.isChecked() || c10.isChecked() || c11.isChecked() ||\t\n\t\t\t\tc111.isChecked() ||\tc12.isChecked() || c13.isChecked() || \n\t\t\t\tc131.isChecked() ||\tc14.isChecked() || c15.isChecked() || \n\t\t\t\tc16.isChecked() || c17.isChecked() || c18.isChecked() || \n\t\t\t\tc19.isChecked() || c20.isChecked() || c21.isChecked() || \n\t\t\t\tc22.isChecked() || c23.isChecked() || c24.isChecked() || \n\t\t\t\tc25.isChecked() || c26.isChecked() || c27.isChecked() || \n\t\t\t\tc28.isChecked() || c29.isChecked() || c291.isChecked() ||\n\t\t\t\tc30.isChecked() || c31.isChecked() || c32.isChecked() || \n\t\t\t\tc321.isChecked() || c322.isChecked());\n\t}",
"boolean getVisible(ActionEvent event) {\n JCheckBox box = (JCheckBox) event.getSource();\n return box.isSelected();\n }",
"private boolean allTrue(CompositeTrue predicate) {\n if (kids.isEmpty()) {\n return false;\n }\n\n Iterator<E> i = kids.iterator();\n while (i.hasNext()) {\n E future = i.next();\n if (!predicate.isTrue(future)) {\n return false;\n }\n }\n return true;\n }",
"public void SetAllBypassBoxesSelected(boolean selected) {\n redTeamBypass1.setSelected(selected);\n redTeamBypass2.setSelected(selected);\n redTeamBypass3.setSelected(selected);\n blueTeamBypass1.setSelected(selected);\n blueTeamBypass2.setSelected(selected);\n blueTeamBypass3.setSelected(selected);\n }",
"public int countTrueCheckBox() {\r\n\t\tint ret = 0;\r\n\t\tif(attributs != null) {\r\n\t\t\tfor(AttributDescribe item : attributs) {\r\n\t\t\t\tif(item.getPk() == true) {\r\n\t\t\t\t\tret++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"public static boolean anyDirty ()\n {\n for (Boolean b : _dirty.values()) {\n if (Boolean.TRUE.equals(b)) {\n return true;\n }\n }\n return false;\n }",
"public static WebElement check_PACatfishBanner_AllCatChkbxSelected(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tList<WebElement> els = driver.findElements(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'catfishPAList')]//input\")) ;\r\n \t\tfor(WebElement chkbx : els){\r\n \t\t\tif(chkbx.isSelected()){\r\n \t\t\t\tAdd_Log.info(\"All the categories checkboxes in PA Catfish Banner section are selected\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_2ND_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_PASS);\r\n \t\t\t}else{\r\n \t\t\t\tAdd_Log.info(\"All the categories checkboxes in PA Catfish Banner section are NOT selected\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_2ND_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\t\ttestFail.set(0, true);\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t/*\tBoolean isChkbxSelected = driver.findElement(By.xpath(\"//*[@id='catfishAd']//input\")).isSelected();\r\n \t\tAdd_Log.info(\"Is all the categories checkboxes selected ::\" + isChkbxSelected);\r\n \t\t\r\n \t\tif(isChkbxSelected == true){\r\n \t\t\tAdd_Log.info(\"All categories checkboxes in PA Catfish Banner section are selected.\");\r\n \t\t//\tSuiteUtility.WriteResultUtility(\r\n \t\t//\t\t\txls, sheetName, Constant.COL_ALL_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"All categories checkboxes in PA Catfish Banner section are NOT selected.\");\r\n \t\t//\tSuiteUtility.WriteResultUtility(\r\n \t\t//\t\t\txls, sheetName, Constant.COL_ALL_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\t*/\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"@Override\n\tpublic boolean isSelected() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tif (fromPoint.isSelected()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\tif (toPoint.isSelected()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn super.isSelected();\n\t}",
"boolean getIsChecked();",
"public boolean getCanPickupItems ( ) {\n\t\treturn extract ( handle -> handle.getCanPickupItems ( ) );\n\t}",
"private ArrayList<String> getCheckboxes() {\n ArrayList<CheckBox> checkBoxes = new ArrayList<>();\n String[] names = {\"PNEU\",\"OIL\",\"BATTERY\",\"AC\",\"WIPER\",\"COMPLETE\",\"GEOMETRY\"}; //LINK NA DB ?\n checkBoxes.addAll(Arrays.asList(pneuCB, oilCB, batCB, acCB, wipCB, comCB, geoCB));\n ArrayList<String> result = new ArrayList<>();\n for (int i = 0; i < checkBoxes.size(); i++) {\n if(checkBoxes.get(i).isSelected()){\n result.add(names[i]);\n }\n }\n return result;\n }",
"public boolean isSelected();",
"public boolean isSelected();"
] |
[
"0.70957506",
"0.70957506",
"0.6803605",
"0.6684049",
"0.6684049",
"0.6661318",
"0.6611643",
"0.6573504",
"0.656047",
"0.64073384",
"0.6403918",
"0.64005923",
"0.6400166",
"0.63773096",
"0.6365222",
"0.6365056",
"0.6365056",
"0.6349221",
"0.63381946",
"0.631139",
"0.6285854",
"0.6275759",
"0.627179",
"0.6263534",
"0.6262924",
"0.6246625",
"0.62213916",
"0.62102985",
"0.6187525",
"0.61570334",
"0.61107403",
"0.6106209",
"0.609076",
"0.6053526",
"0.60518605",
"0.6001465",
"0.59588176",
"0.59588176",
"0.5957194",
"0.59515965",
"0.594349",
"0.59387106",
"0.59387106",
"0.59387106",
"0.59320045",
"0.59275866",
"0.5914229",
"0.5906344",
"0.58958954",
"0.58958954",
"0.58958954",
"0.58949614",
"0.5867446",
"0.58549553",
"0.5852724",
"0.5848592",
"0.5844144",
"0.58350575",
"0.5814706",
"0.581406",
"0.5787609",
"0.5787609",
"0.5739969",
"0.57377505",
"0.57377505",
"0.5730215",
"0.57240075",
"0.57154536",
"0.5707113",
"0.5699262",
"0.56940913",
"0.5676119",
"0.56724787",
"0.5669737",
"0.566795",
"0.56506425",
"0.5648319",
"0.56451917",
"0.563735",
"0.5625762",
"0.56167656",
"0.5609374",
"0.55921173",
"0.55890065",
"0.5579249",
"0.5571144",
"0.55618757",
"0.55612814",
"0.5557985",
"0.55573624",
"0.5553976",
"0.5542868",
"0.55408496",
"0.55400884",
"0.55396956",
"0.55369455",
"0.55315983",
"0.5530631",
"0.55293405",
"0.55293405"
] |
0.5784475
|
62
|
If the 1st & 2nd checkbox was selected, return true
|
private boolean checkQuestion5() {
chkBox1_Q5 = (CheckBox) findViewById(R.id.chkBox1_Q5);
chkBox2_Q5 = (CheckBox) findViewById(R.id.chkBox2_Q5);
chkBox3_Q5 = (CheckBox) findViewById(R.id.chkBox3_Q5);
if (chkBox1_Q5.isChecked() && chkBox2_Q5.isChecked() && !chkBox3_Q5.isChecked()) {
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void checkTwoBox(View view) {\n CheckBox firstcheck = (CheckBox) findViewById(R.id.optionQ3_1);\n CheckBox secondcheck = (CheckBox) findViewById(R.id.optionQ3_2);\n CheckBox thirdcheck = (CheckBox) findViewById(R.id.optionQ3_3);\n\n if (firstcheck.isChecked() && secondcheck.isChecked()) {\n thirdcheck.setChecked(false);\n }\n if (thirdcheck.isChecked() && secondcheck.isChecked()) {\n firstcheck.setChecked(false);\n }\n if (thirdcheck.isChecked() && firstcheck.isChecked()) {\n secondcheck.setChecked(false);\n }\n }",
"private boolean validateAnswer() {\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n int checkboxSelected = 0;\n\n if (checkbox1.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox2.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox3.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n\n if (checkboxSelected == 2) {\n return true;\n }\n else{\n Toast.makeText(this, getString(R.string.message_two_correct), Toast.LENGTH_SHORT).show();\n return false;\n }\n }",
"private boolean checkAnswerOne() {\n CheckBox correctAnswer1Q1 = findViewById(R.id.qs1Ans1);\n CheckBox correctAnswer2Q1 = findViewById(R.id.qs1Ans3);\n correctAnswer1Q1.setTextColor(Color.parseColor(\"green\"));\n correctAnswer2Q1.setTextColor(Color.parseColor(\"green\"));\n return ((correctAnswer1Q1.isChecked()) && (correctAnswer2Q1.isChecked()));\n }",
"public boolean IsSelected1(int i) {\n\t\treturn theSelected1[i];\n\t}",
"public boolean IsSelected2(int i) {\n\t\treturn theSelected2[i];\n\t}",
"boolean isSelected();",
"boolean isSelected();",
"boolean isSelected();",
"private boolean checkAnswerTwo() {\n CheckBox correctAnswer1Q2 = findViewById(R.id.qs2Ans3);\n correctAnswer1Q2.setTextColor(Color.parseColor(\"green\"));\n return correctAnswer1Q2.isChecked();\n }",
"public boolean isMultiSelection()\n\t{\n\t\treturn this.isMultiple();\n\t}",
"private void checkAtLeastOneRuleIsSelected() {\n\t\tsufficientRulesSelected = false;\n\t\tint checked = 0;\n\t\tControl[] controlArray = rulesGroup.getChildren();\n\n\t\tfor (Control elem : controlArray) {\n\t\t\tif (elem instanceof Button) {\n\t\t\t\tif (((Button) elem).getSelection()) {\n\t\t\t\t\tchecked++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checked >= 1)\n\t\t\tsufficientRulesSelected = true;\n\t\tupdateFinishButton();\n\t}",
"public boolean isSelected() {\n return checkbox.isSelected();\n }",
"boolean isSetMultiple();",
"private boolean validateInputs(){\n if(jrTakeTest.isSelected()==false && jrViewScores.isSelected()==false && jrChangePassword.isSelected()==false)\n return false;\n return true;\n}",
"public boolean checkDualExciters() {\r\n return dualExciter.isSelected();\r\n }",
"boolean getVisible(ActionEvent event) {\n JCheckBox box = (JCheckBox) event.getSource();\n return box.isSelected();\n }",
"public boolean CheckBox() {\n if (AseguradoCulpable.isSelected()) {\n return true;\n } else {\n return false;\n }\n }",
"private boolean checkboxQuestion() {\n CheckBox detectiveCheck = (CheckBox) findViewById(R.id.greatest_detective);\n CheckBox greatestCheck = (CheckBox) findViewById(R.id.dark_knight);\n CheckBox boyWonderCheck = (CheckBox) findViewById(R.id.boy_wonder);\n CheckBox manOfSteelCheck = (CheckBox) findViewById(R.id.man_of_steel);\n\n boolean detectiveCheckChecked = detectiveCheck.isChecked();\n boolean greatestCheckChecked = greatestCheck.isChecked();\n boolean boyWonderCheckChecked = boyWonderCheck.isChecked();\n boolean manOfSteelCheckChecked = manOfSteelCheck.isChecked();\n\n return detectiveCheckChecked && greatestCheckChecked && !boyWonderCheckChecked && !manOfSteelCheckChecked;\n\n }",
"private boolean checkSingleCheckBox (int checkBoxId) {\n CheckBox checkbox = (CheckBox) findViewById(checkBoxId);\n return checkbox.isChecked();\n }",
"@Step(\"Select and assert checkboxes\")\n public void selectCheckBox() {\n //http://selenide.org/javadoc/3.5/com/codeborne/selenide/SelenideElement.html\n $(\"label:contains('Water')\").scrollTo();\n $(\"label:contains('Water')\").setSelected(true);\n $(\".label-checkbox:contains('Water') input\").shouldBe(checked);\n logList.add(CHECKBOX1.toString());\n $(\".label-checkbox:contains('Wind')\").scrollTo();\n $(\".label-checkbox:contains('Wind')\").setSelected(true);\n $(\".label-checkbox:contains('Wind') input\").shouldBe(checked);\n logList.add(CHECKBOX2.toString());\n }",
"@Step(\"Check in logs section selected values 2 checkbox\")\n public void checkLogSelected(String option1, String option2) {\n //exist.matchText(option);//проверка на содержание части текста\n log.should(matchText(option1));\n log.should(matchText(option2));\n }",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"private boolean checkBox() {\n if(ToSCheckBox.isSelected()) { return true; }\n else {\n errorMessage.setText(\"Please check that you have read and agree to \" +\n \"the Terms of Service agreement.\");\n return false;\n }\n }",
"private void rdnamActionPerformed(java.awt.event.ActionEvent evt) {\n if( rdnam.isSelected())\n { \n gt= true;\n }\n \n \n }",
"private boolean checkQuestion6() {\n CheckBox answer1CheckBox = (CheckBox) findViewById(R.id.q_6_answer_1);\n CheckBox answer2CheckBox = (CheckBox) findViewById(R.id.q_6_answer_2);\n CheckBox answer3CheckBox = (CheckBox) findViewById(R.id.q_6_answer_3);\n if (answer1CheckBox.isChecked() && answer2CheckBox.isChecked() && answer3CheckBox.isChecked()) {\n return true;\n }\n return false;\n }",
"public void actionPerformed(ActionEvent e){\r\n if(r4.isSelected() || r3.isSelected() || r2.isSelected()){\r\n JOptionPane.showMessageDialog(f,\"Your answer is wrong.\");\r\n }\r\n if(r1.isSelected()){\r\n JOptionPane.showMessageDialog(f,\"Your answer is correct.\");\r\n }\r\n }",
"public boolean isSelected();",
"public boolean isSelected();",
"private boolean checkBoxSituation(int secondI, int secondJ) {\n int max = 0;\n if (secondI + 1 < 8) {\n if (checkBlueBox(secondI + 1, secondJ)) {\n max++;\n }\n }\n if (secondI - 1 > -1) {\n if (checkBlueBox(secondI - 1, secondJ)) {\n max++;\n }\n }\n if (secondJ + 1 < 8) {\n if (checkBlueBox(secondI, secondJ + 1)) {\n max++;\n }\n }\n if (secondJ - 1 > -1) {\n if (checkBlueBox(secondI, secondJ - 1)) {\n max++;\n }\n }\n if (max >= 3) {\n return true;\n }\n return false;\n }",
"public Boolean isMultipleSelection() {\n return m_multipleSelection;\n }",
"@Override \r\n public void onCheckedChanged(CompoundButton buttonView, \r\n boolean isChecked) {\n if(isChecked){ \r\n Log.d(TAG, \"Selected\");\r\n }else{ \r\n Log.d(TAG, \"NO Selected\");\r\n } \r\n }",
"private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}",
"private boolean checkQuestion6() {\n chkBox3_Q6 = (CheckBox) findViewById(R.id.chkBox3_Q6);\n chkBox2_Q6 = (CheckBox) findViewById(R.id.chkBox2_Q6);\n chkBox1_Q6 = (CheckBox) findViewById(R.id.chkBox1_Q6);\n if (chkBox3_Q6.isChecked() && !chkBox1_Q6.isChecked() && chkBox2_Q6.isChecked()) {\n return true;\n }\n return false;\n }",
"public abstract boolean hasSelection();",
"boolean getIsChecked();",
"boolean isChecked();",
"boolean isChecked();",
"public boolean isMultiSelection()\n {\n return multiSelection;\n }",
"public boolean isSelected() { \n \treturn selection != null; \n }",
"private boolean checkSelected() {\n\t\tRadioButton c1 = (RadioButton)findViewById(R.id.ch_01Setting);\n\t\tRadioButton c2 = (RadioButton)findViewById(R.id.ch_02Setting);\n\t\tRadioButton c3 = (RadioButton)findViewById(R.id.ch_03Setting);\n\t\tRadioButton c4 = (RadioButton)findViewById(R.id.ch_04Setting);\n\t\tRadioButton c5 = (RadioButton)findViewById(R.id.ch_05Setting);\n\t\tRadioButton c6 = (RadioButton)findViewById(R.id.ch_06Setting);\n\t\tRadioButton c061 = (RadioButton)findViewById(R.id.ch_061Setting);\n\t\tRadioButton c7 = (RadioButton)findViewById(R.id.ch_07Setting);\n\t\tRadioButton c8 = (RadioButton)findViewById(R.id.ch_08Setting);\n\t\tRadioButton c9 = (RadioButton)findViewById(R.id.ch_09Setting);\n\t\tRadioButton c10 = (RadioButton)findViewById(R.id.ch_10Setting);\n\t\tRadioButton c11 = (RadioButton)findViewById(R.id.ch_11Setting);\n\t\tRadioButton c111 = (RadioButton)findViewById(R.id.ch_111Setting);\n\t\tRadioButton c12 = (RadioButton)findViewById(R.id.ch_12Setting);\n\t\tRadioButton c13 = (RadioButton)findViewById(R.id.ch_13Setting);\n\t\tRadioButton c131 = (RadioButton)findViewById(R.id.ch_131Setting);\n\t\tRadioButton c14 = (RadioButton)findViewById(R.id.ch_14Setting);\n\t\tRadioButton c15 = (RadioButton)findViewById(R.id.ch_15Setting);\n\t\tRadioButton c16 = (RadioButton)findViewById(R.id.ch_16Setting);\n\t\tRadioButton c17 = (RadioButton)findViewById(R.id.ch_17Setting);\n\t\tRadioButton c18 = (RadioButton)findViewById(R.id.ch_18Setting);\n\t\tRadioButton c19 = (RadioButton)findViewById(R.id.ch_19Setting);\n\t\tRadioButton c20 = (RadioButton)findViewById(R.id.ch_20Setting);\n\t\tRadioButton c21 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c22 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c23 = (RadioButton)findViewById(R.id.ch_23Setting);\n\t\tRadioButton c24 = (RadioButton)findViewById(R.id.ch_24Setting);\n\t\tRadioButton c25 = (RadioButton)findViewById(R.id.ch_25Setting);\n\t\tRadioButton c26 = (RadioButton)findViewById(R.id.ch_26Setting);\n\t\tRadioButton c27 = (RadioButton)findViewById(R.id.ch_27Setting);\n\t\tRadioButton c28 = (RadioButton)findViewById(R.id.ch_28Setting);\n\t\tRadioButton c29 = (RadioButton)findViewById(R.id.ch_29Setting);\n\t\tRadioButton c291 = (RadioButton)findViewById(R.id.ch_291Setting);\n\t\tRadioButton c30 = (RadioButton)findViewById(R.id.ch_30Setting);\n\t\tRadioButton c31 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c32 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c321 = (RadioButton)findViewById(R.id.ch_321Setting);\n\t\tRadioButton c322 = (RadioButton)findViewById(R.id.ch_322Setting);\n\t\t\t\n\t\t\n\t\t\n\t\treturn (c1.isChecked() || c2.isChecked() || c3.isChecked() || \n\t\t\t\tc4.isChecked() || c5.isChecked() || c6.isChecked() || \n\t\t\t\tc061.isChecked() || c7.isChecked() || c8.isChecked() ||\n\t\t\t\tc9.isChecked() || c10.isChecked() || c11.isChecked() ||\t\n\t\t\t\tc111.isChecked() ||\tc12.isChecked() || c13.isChecked() || \n\t\t\t\tc131.isChecked() ||\tc14.isChecked() || c15.isChecked() || \n\t\t\t\tc16.isChecked() || c17.isChecked() || c18.isChecked() || \n\t\t\t\tc19.isChecked() || c20.isChecked() || c21.isChecked() || \n\t\t\t\tc22.isChecked() || c23.isChecked() || c24.isChecked() || \n\t\t\t\tc25.isChecked() || c26.isChecked() || c27.isChecked() || \n\t\t\t\tc28.isChecked() || c29.isChecked() || c291.isChecked() ||\n\t\t\t\tc30.isChecked() || c31.isChecked() || c32.isChecked() || \n\t\t\t\tc321.isChecked() || c322.isChecked());\n\t}",
"protected void do_chckbxOther_actionPerformed(ActionEvent arg0) {\n\t\tif(chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(true);\n\t\telse if(! chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(false);\n\t\t\t\n\t}",
"boolean hasSelectedTransport()\n {\n for(JCheckBoxMenuItem item : transportMenuItems.values())\n {\n if(item.isSelected())\n return true;\n }\n\n return false;\n }",
"public abstract boolean isSelected();",
"public abstract boolean isIndexSelected(int i);",
"@Override\n\tpublic boolean isSelected() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tif (fromPoint.isSelected()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\tif (toPoint.isSelected()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn super.isSelected();\n\t}",
"private boolean checkQuestion9() {\n chkBox1_Q9 = (CheckBox) findViewById(R.id.chkBox1_Q9);\n chkBox2_Q9 = (CheckBox) findViewById(R.id.chkBox2_Q9);\n chkBox3_Q9 = (CheckBox) findViewById(R.id.chkBox3_Q9);\n if (chkBox1_Q9.isChecked() && chkBox2_Q9.isChecked() && chkBox3_Q9.isChecked()) {\n return true;\n }\n return false;\n }",
"public boolean isSelected_txt_Pick_Up_Text(){\r\n\t\tif(txt_Pick_Up_Text.isSelected()) { return true; } else { return false;} \r\n\t}",
"CheckBox getCk();",
"boolean hasStablesSelected();",
"public boolean isIndexSelected(int idx) {\n return getElement().isIndexSelected(idx);\n }",
"private boolean featureSelectStatus(int index) {\n if (featureCollection == null) {\n return false;\n }\n\n return featureCollection.features().get(index).getBooleanProperty(PROPERTY_SELECTED);\n }",
"public void onCheckboxClicked(View view) {\n checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.checkBox2:\n if (checked)\n {\n email_confirmation.setChecked(false);\n email_notification.setChecked(false);\n emailPref = \"No\";\n\n }\n else\n {\n emailPref = \"Yes\";\n email_confirmation.setChecked(true);\n email_notification.setChecked(true);\n }\n break;\n\n }\n }",
"boolean isCitySelected();",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == Constants.DATA_ENTERED) { //check if data entered\n if (resultCode == RESULT_OK) { //if the result code is ok\n boolean checked = data.getBooleanExtra(Constants.SELECT, false); //checked or not checked boolean\n\n //if checkbox is checked\n if (checked) {\n Toast.makeText(ActivityOne.this, Constants.AGREE, Toast.LENGTH_LONG).show(); //display toast on activity one\n } else {\n Toast.makeText(this, Constants.DISAGREE, Toast.LENGTH_LONG).show(); //display toast on activity one\n }\n }\n }\n }",
"@Override\r\n public void onClick(View view){\r\n int actualClicked = view.getId();\r\n\r\n for(SpecialPoint box: allCheckBoxes){\r\n int tempId = box.getCheckBox().getId();\r\n CheckBox currentBox = box.getCheckBox();\r\n\r\n if(tempId == actualClicked && currentBox.isChecked()){\r\n currentBox.setChecked(true);\r\n }else{\r\n currentBox.setChecked(false);\r\n }\r\n }\r\n }",
"public boolean isSelected_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isSelected()) { return true; } else { return false;} \r\n\t}",
"public void chk_element(WebDriver driver,String[] selObj, String cusObj){\n\t\t\tfor (int K = 0; K < selObj.length; K++) {\r\n\t\t\t\tWebElement elem = cmf.checkBox(cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\tdriver);\r\n\t\t\t\tif (!elem.isDisplayed()){\r\n\t\t\t\t\t((JavascriptExecutor) driver).executeScript(\r\n\t\t\t \"arguments[0].scrollIntoView();\", elem);\r\n\t\t\t\t}\r\n\t\t\t\tif (elem.getAttribute(\"checked\") == null) {\r\n\t\t\t\t\tcmf.clkElement(driver, cusObj + \"'\" + selObj[K] + \"']\",\r\n\t\t\t\t\t\t\tselObj[K], extent, test);\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\ttest.log(LogStatus.PASS, \"Region\", \"Element \" + selObj[K] + \" checked\");\r\n\t\t\t\t\tcmf.sleep(500);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"Element \" + EndUser.custom_region_obj + \"'\" + selObj[K]\r\n\t\t\t\t\t\t\t+ \"']\" + \" already checked\");\r\n\t\t\t\t\tLog.info(\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t\ttest.log(LogStatus.INFO, \"Region\",\r\n\t\t\t\t\t\t\t\"Element \" + selObj[K] + \" already checked\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}",
"public boolean IsSelected3(int i) {\n\t\treturn theSelected3[i];\n\t}",
"public boolean isSelected(){\r\n return selected;\r\n }",
"public void checkTos1()\n\t{\n\t\tdriver.findElement(_tosCheckbox1).click();\n\t\tlog.info(\"Clicked TOS\");\n\t}",
"boolean getCheckState();",
"@Override\n public boolean isValid() {\n return getComponent().manager.getSelectedNodes().length == 1;\n }",
"public boolean raceSelected(){\n\t\tif(btnDwarf.isEnabled() && btnElf.isEnabled() && btnHuman.isEnabled())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public boolean isSomethingSelected() {\r\n \t\treturn graph.getSelectionCell() != null;\r\n \t}",
"public boolean classSelected(){\n\t\tif(btnMage.isEnabled() && btnWarrior.isEnabled() && btnRanger.isEnabled())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"public boolean isSelected() {\n\t\treturn _booleanNode.isPartiallyTrue();\n\t}",
"public boolean IsSelected0(int i) {\n\t\treturn theSelected0[i];\n\t}",
"public boolean isSelected_click_ActivateCoupon_Button(){\r\n\t\tif(click_ActivateCoupon_Button.isSelected()) { return true; } else { return false;} \r\n\t}",
"public boolean isSelected() {\n \t\treturn selected;\n \t}",
"public boolean isSelected() { return selected; }",
"public static WebElement check_PACatfishBanner_2ndCatChkbxSelected(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tBoolean isChkbxSelected = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//*[@id='catfishAd']//li[2]/label/input\")).isSelected();\r\n \t\tAdd_Log.info(\"Is second category chkbx selected ::\" + isChkbxSelected);\r\n \t\t\r\n \t\tif(isChkbxSelected == true){\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_2ND_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_2ND_CAT_CHKBX_CHECKED, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"private boolean checkAnswerThree() {\n CheckBox correctAnswer1Q3 = findViewById(R.id.qs3Ans1);\n correctAnswer1Q3.setTextColor(Color.parseColor(\"green\"));\n return correctAnswer1Q3.isChecked();\n }",
"public boolean testSelected() {\n // test if set\n boolean set = Card.isSet(\n selectedCards.get(0).getCard(),\n selectedCards.get(1).getCard(),\n selectedCards.get(2).getCard()\n );\n\n // set currentlySelected to false and replace with new Cards (if applicable)\n for (BoardSquare bs : selectedCards)\n bs.setCurrentlySelected(false);\n\n // handle if set\n if (set) {\n if (!deck.isEmpty() && this.numCardsOnBoard() == 12) {\n for (BoardSquare bs : selectedCards)\n bs.setCard(deck.getTopCard());\n }\n else if (!deck.isEmpty() && this.numCardsOnBoard() < 12) {\n board.compressBoard(selectedCards);\n this.add3();\n }\n else {\n board.compressBoard(selectedCards);\n }\n }\n\n // clear ArrayList\n selectedCards.clear();\n\n // return bool\n return set;\n }",
"public static Boolean getButtonSelected(int x, int y){\n\t\treturn display[x][y].isSelected();\n\t}",
"public boolean isExtraTurnSelected() {\n\t\treturn isExtraTurnCheckBox.isSelected();\n\t}",
"public boolean isSelected() {\n return (state & STATE_SELECTED) != 0;\n }",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n li.setChecked(false);\n }\n //do something else\n kgButton = true;\n }",
"private int getCBAnswers() {\n CheckBox cbAns1 = findViewById(R.id.multiplication);\n CheckBox cbAns2 = findViewById(R.id.subtraction);\n CheckBox cbAns3 = findViewById(R.id.addition);\n CheckBox cbAns4 = findViewById(R.id.division);\n if (cbAns2.isChecked() && cbAns3.isChecked() && cbAns4.isChecked() && !cbAns1.isChecked()) {\n return 1;\n } else {\n return 0;\n }\n }",
"public boolean getSelection () {\r\n\tcheckWidget();\r\n\tif ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;\r\n\treturn (OS.PtWidgetFlags (handle) & OS.Pt_SET) != 0;\r\n}",
"public boolean isSelected() \n {\n return selected;\n }",
"public void onCheckboxClicked(View view, ScoutFormData sfd) {\n // Is the view now checked?\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.eCheck_StackYellow:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSYELLOW_COLUMN(\"1\");\n sfd.setEBONUSYELLOW_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSYELLOW_COLUMN(\"0\");\n sfd.setEBONUSYELLOW_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_StackTop:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOP_COLUMN(\"1\");\n sfd.setEBONUSTOP_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOP_COLUMN(\"0\");\n sfd.setEBONUSTOP_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_StackBottom:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSBOTTOM_COLUMN(\"1\");\n sfd.setEBONUSBOTTOM_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSBOTTOM_COLUMN(\"0\");\n sfd.setEBONUSBOTTOM_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_AbleCollect:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(\"1\");\n sfd.setEHPCOLLECT_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(\"0\");\n sfd.setEHPCOLLECT_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Stacker:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPSTACKER_COLUMN(\"1\");\n sfd.setEHPSTACKER_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPSTACKER_COLUMN(\"0\");\n sfd.setEHPSTACKER_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Herder:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPHERDER_COLUMN(\"1\");\n sfd.setEHPHERDER_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPHERDER_COLUMN(\"0\");\n sfd.setEHPHERDER_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_BinSpecialist:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPBIN_COLUMN(\"1\");\n sfd.setEHPBIN_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPBIN_COLUMN(\"0\");\n sfd.setEHPBIN_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_NoodleSpecialist:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPNOODLE_COLUMN(\"1\");\n sfd.setEHPNOODLE_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPNOODLE_COLUMN(\"0\");\n sfd.setEHPNOODLE_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Inbound:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPINBOUND_COLUMN(\"1\");\n sfd.setEHPINBOUND_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPINBOUND_COLUMN(\"0\");\n sfd.setEHPINBOUND_COLUMN(\"0\");\n }\n break;\n case R.id.eCheck_Other:\n if (checked) {\n Log.i(\"Stack Yellow\", \"Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPOTHER_COLUMN(\"1\");\n sfd.setEHPOTHER_COLUMN(\"1\");\n }\n else {\n Log.i(\"Stack Yellow\", \"Un-Checked\");\n //((ScoutFormActivity) getActivity()).getScoutForm().setEHPOTHER_COLUMN(\"0\");\n sfd.setEHPOTHER_COLUMN(\"0\");\n }\n break;\n }\n }",
"public void checkOrUnCheckAllCheckBox(boolean isCheck) {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // verify \"CheckAll\" check box is checked when all check box are check\n //// check all check box in ToDo page\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBox(eleToDoCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n\n if (!checkEmptyToDoCompleteListRow) {\n result = checkAllCheckBox(eleToDoCompleteCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n if (result) {\n NXGReports.addStep(\"Check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"Uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }",
"public void selectCheckBoxes(){\n fallSemCheckBox.setSelected(true);\n springSemCheckBox.setSelected(true);\n summerSemCheckBox.setSelected(true);\n allQtrCheckBox.setSelected(true);\n allMbaCheckBox.setSelected(true);\n allHalfCheckBox.setSelected(true);\n allCampusCheckBox.setSelected(true);\n allHolidayCheckBox.setSelected(true);\n fallSemCheckBox.setSelected(true);\n// allTraTrbCheckBox.setSelected(true);\n }",
"org.apache.xmlbeans.XmlBoolean xgetMultiple();",
"private boolean batCity() {\n RadioGroup radioGroupCity = (RadioGroup) findViewById(R.id.batman_city_group);\n RadioButton trueCheckRadioButton = (RadioButton) radioGroupCity.findViewById(radioGroupCity.getCheckedRadioButtonId());\n boolean checked = (trueCheckRadioButton.isChecked());\n\n switch (trueCheckRadioButton.getId()) {\n case R.id.city_true:\n if (checked) {\n return false;\n\n }\n case R.id.city_false:\n if (checked) {\n return true;\n }\n }\n\n return false;\n }",
"public boolean isSelectionChanged();",
"boolean hasBracksSelected();",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n kc.setChecked(false);\n }\n //do something else\n lbButton = true;\n\n }",
"@FXML\n private void handleCheckBoxAction(ActionEvent e)\n {\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n if (!checkBoxesHaveBeenClicked)\n {\n checkBoxesHaveBeenClicked = true;\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n }\n \n //ArrayList that will hold all the filtered events based on the selection of what terms are visible\n ArrayList<String> termsToFilter = new ArrayList();\n \n //Check each of the checkboxes and call the appropiate queries to\n //show only the events that belong to the term(s) the user selects\n \n //vaccance\n if (fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is selected\");\n termsToFilter.add(\"vaccance\");\n }\n \n if (!fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"vaccance\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n //travail\n if (springSemCheckBox.isSelected())\n {\n System.out.println(\"travail Sem checkbox is selected\");\n termsToFilter.add(\"travail\");\n }\n if (!springSemCheckBox.isSelected())\n {\n System.out.println(\"travail checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"travail\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //annivessaire\n if (summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is selected\");\n termsToFilter.add(\"annivessaire\");\n }\n if (!summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"annivessaire\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //formation\n if (allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is selected\");\n termsToFilter.add(\"formation\");\n }\n if (!allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"formation\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // certif\n if (allHalfCheckBox.isSelected())\n {\n System.out.println(\"certif checkbox is selected\");\n termsToFilter.add(\"certif\");\n }\n if (!allHalfCheckBox.isSelected())\n {\n System.out.println(\"importantcheckbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"certif\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // imporatnt\n if (allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is selected\");\n termsToFilter.add(\"\");\n }\n if (!allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"important\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n // urgent\n if (allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is selected\");\n termsToFilter.add(\"urgent\");\n }\n if (!allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"urgent\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n// // workshop\n if (allMbaCheckBox.isSelected())\n {\n System.out.println(\"Workshop checkbox is selected\");\n termsToFilter.add(\"workshop\");\n }\n if (!allMbaCheckBox.isSelected())\n {\n System.out.println(\"workshop checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"workshop\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n// \n// // All TRA/TRB\n// if (allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All TRA/TRB checkbox is selected\");\n// termsToFilter.add(\"TRA\");\n// termsToFilter.add(\"TRB\");\n// }\n// if (!allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All Holiday checkbox is now deselected\");\n// int auxIndex = termsToFilter.indexOf(\"TRA\");\n// int auxIndex2 = termsToFilter.indexOf(\"TRB\");\n// if (auxIndex != -1)\n// {\n// termsToFilter.remove(auxIndex);\n// }\n// if (auxIndex2 != -1)\n// {\n// termsToFilter.remove(auxIndex2);\n// }\n// }\n// \n \n System.out.println(\"terms to filter list: \" + termsToFilter);\n \n //Get name of the current calendar that the user is working on\n String calName = Model.getInstance().calendar_name;\n \n System.out.println(\"and calendarName is: \" + calName);\n \n if (termsToFilter.isEmpty())\n {\n System.out.println(\"terms are not selected. No events have to appear on calendar. Just call loadCalendarLabels method in the RepaintView method\");\n selectAllCheckBox.setSelected(false);\n loadCalendarLabels();\n }\n else\n {\n System.out.println(\"Call the appropiate function to populate the month with the filtered events\");\n //Get List of Filtered Events and store all events in an ArrayList variable\n ArrayList<String> filteredEventsList = databaseHandler.getFilteredEvents(termsToFilter, calName);\n \n System.out.println(\"List of Filtered events is: \" + filteredEventsList);\n \n //Repaint or reload the events based on the selected terms\n showFilteredEventsInMonth(filteredEventsList);\n }\n \n \n }",
"private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tRadioButton[] checbox=new RadioButton[3];\n\t\tchecbox[0]=less_thirty_check;\n\t\tchecbox[1]=thirty_fourty_check;\n\t\tchecbox[2]=great_fourty_check;\n\t\t\n\t\t\n\t\tRadioButton[] checkbox1=new RadioButton[3];\n\t\tcheckbox1[0]=health_check;\n\t\tcheckbox1[1]=diabetes_check;\n\t\tcheckbox1[2]=other_check;\n\t\t\n\t\t\n\t\tRadioButton[] check2=new RadioButton[6];\n\t\tcheck2[0]=guy_check;\n\t\tcheck2[1]=dad_check;\n\t\tcheck2[2]=girl_check;\n\t\tcheck2[3]=mom_check;\n\t\tcheck2[4]=grandad_check;\n\t\tcheck2[5]=grand_ma;\n\t\t\n\t\tif(Checkvalidation(checbox)){\t\t\t\t\n\t\t\tRadioButton checkbox=SelectedCheckBox(checbox);\n\t\t\tint check_id=checkbox.getId();\n\t\t\tswitch (check_id) {\n\t\t\tcase R.id.less_thirty_check:\n\t\t\t\tLog.d(\"sun\",\"less thirty check\");\n//\t\t\t\tAppsConstant.user_age=\"<30\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.thirty_fourty_check:\n\t\t\t\tLog.d(\"sun\",\"thirty fourty check\");\n//\t\t\t\tAppsConstant.user_age=\"30-45\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.great_fourty_check:\n\t\t\t\tLog.d(\"sun\",\"great fourty check\");\n//\t\t\t\tAppsConstant.user_age=\">45\";\n\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(getApplicationContext(), \"please select age\", Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tif(Checkvalidation(checkbox1)){\n\t\t\tRadioButton checkbox=SelectedCheckBox(checkbox1);\n\t\t\tint check_id=checkbox.getId();\n\t\t\tswitch (check_id) {\n\t\t\tcase R.id.health_check:\n\t\t\t\tLog.d(\"sun\",\"health_check\");\n//\t\t\t\tAppsConstant.user_health=\"health\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.diabetes_check:\n\t\t\t\tLog.d(\"sun\",\"diabetes_check\");\n//\t\t\t\tAppsConstant.user_health=\"diabetes\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.other_check:\n\t\t\t\tLog.d(\"sun\",\"other_check\");\n//\t\t\t\tAppsConstant.user_health=\"other\";\n\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(getApplicationContext(), \"please Select the health Problem\", Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tif(Checkvalidation(check2)){\n\t\t\tRadioButton checkbox=SelectedCheckBox(check2);\n\t\t\tint check_id=checkbox.getId();\n\t\t\tswitch (check_id) {\n\t\t\tcase R.id.guy_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Guy\");\n//\t\t\t\tAppsConstant.user_gender=\"guy\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.dad_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Dad\");\n//\t\t\t\tAppsConstant.user_gender=\"dad\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.girl_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Girl\");\n//\t\t\t\tAppsConstant.user_gender=\"girl\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.mom_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Mom\");\n//\t\t\t\tAppsConstant.user_gender=\"mom\";\n\t\t\t\tbreak;\n\n\t\t\tcase R.id.grandad_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-GrandDad\");\n//\t\t\t\tAppsConstant.user_gender=\"granddad\";\n\t\t\t\tbreak;\n\n\t\t\tcase R.id.grand_ma:\n\t\t\t\tLog.d(\"sun\",\"Gender:-GrandMaa\");\n//\t\t\t\tAppsConstant.user_gender=\"grandmaa\";\n\t\t\t\tbreak;\n\n\n\t\t\tdefault:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Guy\");\n//\t\t\t\tAppsConstant.user_gender=\"guy\";\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(getApplicationContext(), \"Please Select Your Gender\", Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t}\n\n\t}",
"private boolean checkMultipleUnitEdit() {\r\n\t\tboolean flag=false;\r\n\t\tfor(UIUnitType model:uiUnitType.getUnitValueList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"public void selectParticularCheckBox(String labelText){\r\n\t\t\r\n\t\t\t\tif(checkboxLabel.get(0).getText().contains(labelText)){\r\n\t\t\t\t\t\r\n\t\t\t\t\tcheckbox.get(2).click();\r\n\t\t\t\t\tReporter.log(labelText+\" Only selected\",true);\r\n\t\t\t\t}\r\n\t\t\t\telse if(checkboxLabel.get(1).getText().contains(labelText))\r\n\t\t\t\t{\r\n\t\t\t\t\tcheckbox.get(0).click();\r\n\t\t\t\t\tcheckbox.get(1).click();\r\n\t\t\t\t\tcheckbox.get(2).click();\r\n\t\t\t\t\tReporter.log(labelText+\" Only selected\",true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t}",
"public boolean isSpecialPointChecked(){\r\n for(SpecialPoint box: allCheckBoxes){\r\n CheckBox current = box.getCheckBox();\r\n if(current.isChecked()){\r\n theSpecialPoint = box;\r\n box.createUrl(latMid, lonMid);\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"private static boolean checkbox(WebElement element, String sLog, WebElement ajax, int nMaxWaitTime,\n\t\t\tboolean bException, CheckBox checkbox)\n\t{\n\t\t// Is check box enable/selected?\n\t\tboolean bEnabled = Framework.isElementEnabled(element);\n\t\tboolean bChecked = Framework.isElementSelected(element);\n\n\t\t// Does user want to skip taking action?\n\t\tif (checkbox.skip)\n\t\t{\n\t\t\tString sMessage = \"Check box for '\" + sLog + \"' was skipped. The check box was \";\n\t\t\tif (bEnabled)\n\t\t\t\tsMessage += \"enabled\";\n\t\t\telse\n\t\t\t\tsMessage += \"disabled\";\n\n\t\t\tif (bChecked)\n\t\t\t\tsMessage += \" and selected\";\n\t\t\telse\n\t\t\t\tsMessage += \" and not selected\";\n\n\t\t\tLogs.log.info(sMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Do we need to take action based on current state?\n\t\t\tboolean bTakeAction = false;\n\t\t\tif (checkbox.check)\n\t\t\t{\n\t\t\t\tif (bChecked)\n\t\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already selected\");\n\t\t\t\telse\n\t\t\t\t\tbTakeAction = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (bChecked)\n\t\t\t\t\tbTakeAction = true;\n\t\t\t\telse\n\t\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already unselected\");\n\t\t\t}\n\n\t\t\t// Only click the check box if it is necessary to make it the desired state by the user\n\t\t\tif (bTakeAction)\n\t\t\t{\n\t\t\t\treturn click(element, sLog, ajax, nMaxWaitTime, bException);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public void verifyCheckAllCheckBoxIsCheckOrUncheck(boolean isCheck) {\n waitForVisibleElement(eleCheckAllCheckBox, \"CheckAll check box\");\n if (isCheck) {\n if (!eleCheckAllCheckBox.isSelected()) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: CheckAll check box do not auto check in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return;\n }\n } else {\n if (eleCheckAllCheckBox.isSelected()) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: CheckAll check box do not auto uncheck in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return;\n }\n }\n if (isCheck) {\n NXGReports.addStep(\"'CheckAll' check box is check when check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"'CheckAll' check box is uncheck when uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }",
"public void onCheckboxClicked(View view) {\n boolean aprendido = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.checkboxAprendido:\n if (aprendido == true) {\n // Put some meat on the sandwich\n break;\n }\n }\n }",
"private void checkSorgente() {\n if (sorgente.getSelectedIndex() == 0) {\n rbtAcq.setEnabled(false);\n rbtVen.setEnabled(false);\n rbtEnt.setEnabled(false);\n rbtAcq.setSelected(false);\n rbtVen.setSelected(false);\n rbtEnt.setSelected(false);\n } else {\n rbtAcq.setEnabled(true);\n rbtVen.setEnabled(true);\n rbtEnt.setEnabled(true);\n rbtAcq.setSelected(false);\n rbtVen.setSelected(false);\n rbtEnt.setSelected(true);\n }\n }"
] |
[
"0.6782862",
"0.6742513",
"0.6335071",
"0.62928414",
"0.6269195",
"0.6262026",
"0.6262026",
"0.6262026",
"0.62154156",
"0.61821824",
"0.6164101",
"0.61300355",
"0.6121239",
"0.6092643",
"0.6061126",
"0.60117584",
"0.6011064",
"0.60057515",
"0.5992124",
"0.5936148",
"0.5932354",
"0.59114313",
"0.59114313",
"0.59114313",
"0.5893296",
"0.5874284",
"0.58351356",
"0.58343035",
"0.58309513",
"0.58309513",
"0.58249676",
"0.5816536",
"0.5780507",
"0.5777933",
"0.5754338",
"0.5751905",
"0.5745167",
"0.57431203",
"0.57431203",
"0.57427865",
"0.56791466",
"0.56788033",
"0.56531096",
"0.5640415",
"0.5639561",
"0.5630614",
"0.5630169",
"0.5591491",
"0.5583467",
"0.557829",
"0.5568517",
"0.5560574",
"0.5553384",
"0.5538907",
"0.5526394",
"0.55125016",
"0.5478483",
"0.5474379",
"0.5462931",
"0.5462673",
"0.54623705",
"0.5457412",
"0.54461104",
"0.5444399",
"0.54369986",
"0.5415332",
"0.5415217",
"0.5413332",
"0.5410555",
"0.54042447",
"0.5401694",
"0.5399061",
"0.5397949",
"0.5388542",
"0.5388476",
"0.53835815",
"0.5381728",
"0.5373364",
"0.5371842",
"0.53710425",
"0.53637475",
"0.5360564",
"0.53506076",
"0.53432775",
"0.533853",
"0.5335423",
"0.53292453",
"0.53252536",
"0.53206724",
"0.5317516",
"0.53134835",
"0.5313042",
"0.5310278",
"0.5307517",
"0.529921",
"0.5290434",
"0.52844757",
"0.5282743",
"0.527716",
"0.5268239"
] |
0.5594374
|
47
|
Checking the 6th question and returning true if checkbox 2 and 3 were selected
|
private boolean checkQuestion6() {
chkBox3_Q6 = (CheckBox) findViewById(R.id.chkBox3_Q6);
chkBox2_Q6 = (CheckBox) findViewById(R.id.chkBox2_Q6);
chkBox1_Q6 = (CheckBox) findViewById(R.id.chkBox1_Q6);
if (chkBox3_Q6.isChecked() && !chkBox1_Q6.isChecked() && chkBox2_Q6.isChecked()) {
return true;
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private boolean validateAnswer() {\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n int checkboxSelected = 0;\n\n if (checkbox1.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox2.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n if (checkbox3.isChecked()) {\n checkboxSelected = checkboxSelected + 1;\n }\n\n if (checkboxSelected == 2) {\n return true;\n }\n else{\n Toast.makeText(this, getString(R.string.message_two_correct), Toast.LENGTH_SHORT).show();\n return false;\n }\n }",
"private boolean checkQuestion6() {\n CheckBox answer1CheckBox = (CheckBox) findViewById(R.id.q_6_answer_1);\n CheckBox answer2CheckBox = (CheckBox) findViewById(R.id.q_6_answer_2);\n CheckBox answer3CheckBox = (CheckBox) findViewById(R.id.q_6_answer_3);\n if (answer1CheckBox.isChecked() && answer2CheckBox.isChecked() && answer3CheckBox.isChecked()) {\n return true;\n }\n return false;\n }",
"private boolean checkQuestion9() {\n chkBox1_Q9 = (CheckBox) findViewById(R.id.chkBox1_Q9);\n chkBox2_Q9 = (CheckBox) findViewById(R.id.chkBox2_Q9);\n chkBox3_Q9 = (CheckBox) findViewById(R.id.chkBox3_Q9);\n if (chkBox1_Q9.isChecked() && chkBox2_Q9.isChecked() && chkBox3_Q9.isChecked()) {\n return true;\n }\n return false;\n }",
"private boolean checkQuestion5() {\n chkBox1_Q5 = (CheckBox) findViewById(R.id.chkBox1_Q5);\n chkBox2_Q5 = (CheckBox) findViewById(R.id.chkBox2_Q5);\n chkBox3_Q5 = (CheckBox) findViewById(R.id.chkBox3_Q5);\n if (chkBox1_Q5.isChecked() && chkBox2_Q5.isChecked() && !chkBox3_Q5.isChecked()) {\n return true;\n }\n return false;\n }",
"public void onNextQuestionButton(View view) {\n CheckBox answerBtnA = (CheckBox) findViewById(R.id.checkbox_button_1);\n CheckBox answerBtnB = (CheckBox) findViewById(R.id.checkbox_button_2);\n CheckBox answerBtnC = (CheckBox) findViewById(R.id.checkbox_button_3);\n CheckBox answerBtnD = (CheckBox) findViewById(R.id.checkbox_button_4);\n\n checkedA = answerBtnA.isChecked();\n checkedB = answerBtnB.isChecked();\n checkedC = answerBtnC.isChecked();\n checkedD = answerBtnD.isChecked();\n\n /**\n * Check whether the User inserted the right number of answers (always 2) and\n * request them, if they had not been given\n */\n if (checkedA & checkedB | checkedA & checkedC | checkedA & checkedD | checkedB & checkedC |\n checkedB & checkedD | checkedC & checkedD){\n calculateMethod();\n } else if(checkedA | checkedB | checkedC | checkedD){\n Toast.makeText(this,R.string.noAnswer2,Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this,R.string.noAnswer,Toast.LENGTH_SHORT).show();\n }\n }",
"public void q4Submit(View view) {\n\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.q4option1cb);\n CheckBox checkBox2 = (CheckBox) findViewById(R.id.q4option2cb);\n CheckBox checkBox3 = (CheckBox) findViewById(R.id.q4option3cb);\n CheckBox checkBox4 = (CheckBox) findViewById(R.id.q4option4cb);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (checkBox1.isChecked() && checkBox2.isChecked() && checkBox3.isChecked() && !checkBox4.isChecked()) {\n if (isNotAnsweredQ4) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ4 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private void evaluateQuestions() {\n RadioGroup groupTwo = findViewById(R.id.radioGroupQ2);\n int groupTwoId = groupTwo.getCheckedRadioButtonId();\n\n // Get the ID of radio group 6 to ascertain if a radio button has been ticked\n RadioGroup groupSix = findViewById(R.id.radioGroupQ6);\n int groupSixId = groupSix.getCheckedRadioButtonId();\n\n // Get the ID of radio group 7 to ascertain if a radio button has been ticked\n RadioGroup groupSeven = findViewById(R.id.radioGroupQ7);\n int groupSevenId = groupSeven.getCheckedRadioButtonId();\n\n // Taking in the vale of any question that has been checked in question 3 and storing it\n CheckBox question3Option1 = findViewById(R.id.question_three_option1);\n boolean stateOfQuestion3_option1 = question3Option1.isChecked();\n CheckBox question3Option2 = findViewById(R.id.question_three_option2);\n boolean stateOfQuestion3Option2 = question3Option2.isChecked();\n CheckBox question3Option3 = findViewById(R.id.question_three_option3);\n boolean stateOfQuestion3Option3 = question3Option3.isChecked();\n CheckBox question3Option4 = findViewById(R.id.question_three_option4);\n boolean stateOfQuestion3Option4 = question3Option4.isChecked();\n\n // Taking in the value of any question that has been checked in question 4 and storing it\n CheckBox question4Option1 = findViewById(R.id.question_four_option1);\n boolean stateOfQuestion4Option1 = question4Option1.isChecked();\n CheckBox question4Option2 = findViewById(R.id.question_four_option2);\n boolean stateOfQuestion4Option2 = question4Option2.isChecked();\n CheckBox question4Option3 = findViewById(R.id.question_four_option3);\n boolean stateOfQuestion4Option3 = question4Option3.isChecked();\n CheckBox question4Option4 = findViewById(R.id.question_four_option4);\n boolean stateOfQuestion4Option4 = question4Option4.isChecked();\n\n // Taking in the vale of any question that has been checked in question 8 and storing it\n CheckBox question8Option1 = findViewById(R.id.question_eight_option1);\n boolean stateOfQuestion8Option1 = question8Option1.isChecked();\n CheckBox question8Option2 = findViewById(R.id.question_eight_option2);\n boolean stateOfQuestion8Option2 = question8Option2.isChecked();\n CheckBox question8Option3 = findViewById(R.id.question_eight_option3);\n boolean stateOfQuestion8Option3 = question8Option3.isChecked();\n CheckBox question8Option4 = findViewById(R.id.question_eight_option4);\n boolean stateOfQuestion8Option4 = question8Option4.isChecked();\n\n // Getting all EditText fields\n\n EditText questText1 = findViewById(R.id.question_one_field);\n String question1 = questText1.getText().toString();\n\n\n EditText questText5 = findViewById(R.id.question_five_field);\n String question5 = questText5.getText().toString();\n\n EditText questText9 = findViewById(R.id.question_nine_field);\n String question9 = questText9.getText().toString();\n\n // Variable parameters for calculateRadiobutton method\n\n RadioButton quest2_opt3 = findViewById(R.id.question_two_option3);\n boolean question2_option3 = quest2_opt3.isChecked();\n\n RadioButton quest6_opt1 = findViewById(R.id.question_six_option2);\n boolean question6_option2= quest6_opt1.isChecked();\n\n RadioButton quest7_opt1 = findViewById(R.id.question_seven_option1);\n boolean question7_option1 = quest7_opt1.isChecked();\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 3\n boolean question3 = stateOfQuestion3_option1 || stateOfQuestion3Option2 ||\n stateOfQuestion3Option3 || stateOfQuestion3Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 4\n boolean question4 = stateOfQuestion4Option1 || stateOfQuestion4Option2 || stateOfQuestion4Option3 ||\n stateOfQuestion4Option4;\n\n\n // Store all checked parameter to ascertain that at least one option was ticked in\n // question 8\n boolean question8 = stateOfQuestion8Option1 || stateOfQuestion8Option2 ||\n stateOfQuestion8Option3 || stateOfQuestion8Option4;\n\n // if no radio button has been checked in radio group 2 after submit button has been clicked\n if ( groupTwoId == -1) {\n Toast.makeText(this, \"Please pick an answer in question 2\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 6 after submit button has been clicked\n else if (groupSixId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 6\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no radio button has been clicked in radio group 7 after submit button has been clicked\n else if (groupSevenId == -1) {\n Toast.makeText(this, \"Please pick an answer to question 7\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 3 after submit button has been clicked\n else if (!question3) {\n Toast.makeText(this, \"Please select an answer to question 3\",\n Toast.LENGTH_SHORT).show();\n }\n\n // if no checkbox was clicked in question 4 after submit button has been clicked\n else if (!question4) {\n Toast.makeText(this, \"Please select an answer to question 4\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n // if no checkbox was clicked in question 8 after submit button has been clicked\n else if (!question8) {\n Toast.makeText(this, \"Please select an answer to question 8\",\n Toast.LENGTH_SHORT).show();\n }\n\n // check if the questions has been answered without hitting the reset button\n else if (checkSubmit > 0) {\n Toast.makeText(this, \"Press the reset button\",\n Toast.LENGTH_SHORT).show();\n } else {\n //Add one to checkSubmit variable to avoid the score from being recalculated and added to\n // the previous score if the submit button was pressed more than once.\n checkSubmit += 1;\n\n // calculate all checkboxes by calling calculateCheckboxes method\n calculateScoreForCheckBoxes( stateOfQuestion3_option1, stateOfQuestion3Option3,stateOfQuestion3Option4,\n stateOfQuestion4Option1, stateOfQuestion4Option2, stateOfQuestion4Option4,\n stateOfQuestion8Option1, stateOfQuestion8Option3);\n\n // calculate all radio buttons by calling calculateRadioButtons method\n calculateScoreForRadioButtons(question2_option3, question6_option2, question7_option1);\n\n // calculate all Text inputs by calling editTextAnswers method\n calculateScoreForEditTextAnswers(question1,question5, question9);\n\n displayScore(score);\n\n String grade;\n\n if (score < 10) {\n grade = \"Meh...\";\n } else if (score >=10 && score <=14) {\n grade = \"Average\";\n } else if ((score >= 15) && (19 >= score)) {\n grade = \"Impressive!\";\n } else {\n grade = \"Excellent!\";\n }\n\n // Display a toast message to show total score\n Toast.makeText(this, grade + \" your score is \" + score + \"\",\n Toast.LENGTH_SHORT).show();\n }\n }",
"private boolean checkboxQuestion() {\n CheckBox detectiveCheck = (CheckBox) findViewById(R.id.greatest_detective);\n CheckBox greatestCheck = (CheckBox) findViewById(R.id.dark_knight);\n CheckBox boyWonderCheck = (CheckBox) findViewById(R.id.boy_wonder);\n CheckBox manOfSteelCheck = (CheckBox) findViewById(R.id.man_of_steel);\n\n boolean detectiveCheckChecked = detectiveCheck.isChecked();\n boolean greatestCheckChecked = greatestCheck.isChecked();\n boolean boyWonderCheckChecked = boyWonderCheck.isChecked();\n boolean manOfSteelCheckChecked = manOfSteelCheck.isChecked();\n\n return detectiveCheckChecked && greatestCheckChecked && !boyWonderCheckChecked && !manOfSteelCheckChecked;\n\n }",
"private boolean checkAnswerOne() {\n CheckBox correctAnswer1Q1 = findViewById(R.id.qs1Ans1);\n CheckBox correctAnswer2Q1 = findViewById(R.id.qs1Ans3);\n correctAnswer1Q1.setTextColor(Color.parseColor(\"green\"));\n correctAnswer2Q1.setTextColor(Color.parseColor(\"green\"));\n return ((correctAnswer1Q1.isChecked()) && (correctAnswer2Q1.isChecked()));\n }",
"private boolean checkAnswerThree() {\n CheckBox correctAnswer1Q3 = findViewById(R.id.qs3Ans1);\n correctAnswer1Q3.setTextColor(Color.parseColor(\"green\"));\n return correctAnswer1Q3.isChecked();\n }",
"public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }",
"private void checkMultipleChoice(){\n \t\t\t\n \t\t\t// this is the answer string containing all the checked answers\n \t\t\tString answer = \"\";\n \t\t\t\t\n \t\t\tif(checkboxLayout.getChildCount()>=1){\n \t\t\t\n \t\t\t\t// iterate through the child check box elements of the linear view\n \t\t\t\tfor (int i = 0; i < checkboxLayout.getChildCount();i++){\n \t\t\t\t\t\n \t\t\t\t\tCheckBox choiceCheckbox = (CheckBox) checkboxLayout.getChildAt(i);\n \t\t\t\t\t\n \t\t\t\t\t// if that check box is checked, its answer will be stored\n \t\t\t\t\tif (choiceCheckbox.isChecked()){\n \t\t\t\t\t\t\n \t\t\t\t\t\tString choiceNum = choiceCheckbox.getTag().toString();\n \t\t\t\t\t\tString choiceText = choiceCheckbox.getText().toString();\n \t\t\t\t\t\t\n \t\t\t\t\t\t// append the answer to the answer text string\n \t\t\t\t\t\tif (i == checkboxLayout.getChildCount()-1)answer = answer + choiceNum +\".\" + choiceText;\n \t\t\t\t\t\telse{ answer = answer + choiceNum +\".\"+ choiceText + \",\"; }\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t//setting the response for that survey question\n \t\t\teventbean.setChoiceResponse(answer);\n \t\t\t\n \t\t\t}\n \t\t}",
"private int getCBAnswers() {\n CheckBox cbAns1 = findViewById(R.id.multiplication);\n CheckBox cbAns2 = findViewById(R.id.subtraction);\n CheckBox cbAns3 = findViewById(R.id.addition);\n CheckBox cbAns4 = findViewById(R.id.division);\n if (cbAns2.isChecked() && cbAns3.isChecked() && cbAns4.isChecked() && !cbAns1.isChecked()) {\n return 1;\n } else {\n return 0;\n }\n }",
"public void checkAllAnswers(View view) {\n finalScore = 0;\n\n boolean answerQuestion1 = false;\n boolean check1Quest1 = checkSingleCheckBox(R.id.jupiter_checkbox_view);\n boolean check2Quest1 = checkSingleCheckBox(R.id.mars_checkbox_view);\n boolean check3Quest1 = checkSingleCheckBox(R.id.earth_checkbox_view);\n boolean check4Quest1 = checkSingleCheckBox(R.id.venus_checkbox_view);\n\n if (!check1Quest1 && !check2Quest1 && !check3Quest1 && check4Quest1) {\n finalScore = scoreCounter(finalScore);\n answerQuestion1 = true;\n }\n\n boolean answerQuestion2 = false;\n boolean check1Quest2 = checkSingleCheckBox(R.id.nasa_checkbox_view);\n boolean check2Quest2 = checkSingleCheckBox(R.id.spacex_checkbox_view);\n boolean check3Quest2 = checkSingleCheckBox(R.id.nvidia_checkbox_view);\n boolean check4Quest2 = checkSingleCheckBox(R.id.astrotech_checkbox_view);\n\n if (check1Quest2 && check2Quest2 && !check3Quest2 && check4Quest2) {\n finalScore = scoreCounter(finalScore);\n answerQuestion2 = true;\n }\n\n boolean answerQuestion3 = false;\n boolean check1Quest3 = checkSingleCheckBox(R.id.moon_checkbox_view);\n boolean check2Quest3 = checkSingleCheckBox(R.id.sun_checkbox_view);\n boolean check3Quest3 = checkSingleCheckBox(R.id.comet_checkbox_view);\n boolean check4Quest3 = checkSingleCheckBox(R.id.asteroid_checkbox_view);\n\n if (check1Quest3 && !check2Quest3 && !check3Quest3 && !check4Quest3) {\n finalScore = scoreCounter(finalScore);\n answerQuestion3 = true;\n }\n\n boolean answerQuestion4 = false;\n boolean check1Quest4 = checkSingleCheckBox(R.id.yes_checkbox_view);\n boolean check2Quest4 = checkSingleCheckBox(R.id.no_checkbox_view);\n\n if (check1Quest4 && !check2Quest4) {\n finalScore = scoreCounter(finalScore);\n answerQuestion4 = true;\n }\n\n String question1Summary = createQuestionSummary(answerQuestion1, 1, getResources().getString(R.string.venus));\n String question2Summary = createQuestionSummary(answerQuestion2, 2, getResources().getString(R.string.nasa_spacex_astrotech));\n String question3Summary = createQuestionSummary(answerQuestion3, 3, getResources().getString(R.string.moon));\n String question4Summary = createQuestionSummary(answerQuestion4, 4, getResources().getString(R.string.yes));\n\n String quizSummary = createQuizSummary(finalScore);\n\n displayQuestionSummary(question1Summary, answerQuestion1, R.id.question1_summary);\n displayQuestionSummary(question2Summary, answerQuestion2, R.id.question2_summary);\n displayQuestionSummary(question3Summary, answerQuestion3, R.id.question3_summary);\n displayQuestionSummary(question4Summary, answerQuestion4, R.id.question4_summary);\n displayQuizSummary(quizSummary);\n\n }",
"public void checkAnswers(View v) {\n int correct = 0;\n\n //Question 1 answer\n RadioButton a1 = (RadioButton) findViewById(R.id.q1_a2);\n\n if (a1.isChecked()) {\n correct++;\n } else {\n TextView q1 = (TextView) findViewById(R.id.question_1);\n q1.setTextColor(Color.RED);\n }\n\n //Question 2 answer\n RadioButton a2 = (RadioButton) findViewById(R.id.q2_a2);\n\n if (a2.isChecked()) {\n correct++;\n } else {\n TextView q2 = (TextView) findViewById(R.id.question_2);\n q2.setTextColor(Color.RED);\n }\n\n //Question 3\n CheckBox a3_1 = (CheckBox) findViewById(R.id.q3_a1);\n CheckBox a3_2 = (CheckBox) findViewById(R.id.q3_a2);\n CheckBox a3_3 = (CheckBox) findViewById(R.id.q3_a3);\n\n if (a3_1.isChecked() && a3_2.isChecked() && a3_3.isChecked()) {\n correct++;\n } else {\n TextView q3 = (TextView) findViewById(R.id.question_3);\n q3.setTextColor(Color.RED);\n }\n\n //Question 4\n EditText a4 = (EditText) findViewById(R.id.q4_a);\n\n if (a4.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q4_a))) {\n correct++;\n } else {\n TextView q4 = (TextView) findViewById(R.id.question_4);\n q4.setTextColor(Color.RED);\n }\n\n //Question 5\n RadioButton a5 = (RadioButton) findViewById(R.id.q5_a3);\n\n if (a5.isChecked()) {\n correct++;\n } else {\n TextView q5 = (TextView) findViewById(R.id.question_5);\n q5.setTextColor(Color.RED);\n }\n\n //Question 6\n RadioButton a6 = (RadioButton) findViewById(R.id.q6_a1);\n\n if (a6.isChecked()) {\n correct++;\n } else {\n TextView q6 = (TextView) findViewById(R.id.question_6);\n q6.setTextColor(Color.RED);\n }\n\n //Question 7\n EditText a7 = (EditText) findViewById(R.id.q7_a);\n\n if (a7.getText().toString().equalsIgnoreCase(getResources().getString(R.string.q7_a))) {\n correct++;\n } else {\n TextView q7 = (TextView) findViewById(R.id.question_7);\n q7.setTextColor(Color.RED);\n }\n\n //Question 8\n RadioButton a8 = (RadioButton) findViewById(R.id.q8_a1);\n\n if (a8.isChecked()) {\n correct++;\n } else {\n TextView q8 = (TextView) findViewById(R.id.question_8);\n q8.setTextColor(Color.RED);\n }\n\n //Toast\n Context context = getApplicationContext();\n CharSequence text = \"Score: \" + correct + \"/8\";\n int duration = Toast.LENGTH_SHORT;\n Toast.makeText(context, text, duration).show();\n }",
"public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }",
"public void actionPerformed(ActionEvent e){\r\n if(r4.isSelected() || r3.isSelected() || r2.isSelected()){\r\n JOptionPane.showMessageDialog(f,\"Your answer is wrong.\");\r\n }\r\n if(r1.isSelected()){\r\n JOptionPane.showMessageDialog(f,\"Your answer is correct.\");\r\n }\r\n }",
"public void q6Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q6option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ6) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ6 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private boolean checkAnswerFour() {\n CheckBox correctAnswer1Q4 = findViewById(R.id.qs4Ans2);\n correctAnswer1Q4.setTextColor(Color.parseColor(\"green\"));\n return correctAnswer1Q4.isChecked();\n }",
"public void checkCorrect() {\n\t\t \n\t\t if(rb1.isSelected()) {\n\t\t\t if(rb1.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb2.isSelected()) {\n\t\t\t if(rb2.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb3.isSelected()) {\n\t\t\t if(rb3.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t\t else if(rb4.isSelected()) {\n\t\t\t if(rb4.getText() == answer) {\n\t\t\t\t showCorrectDialog();\n\t\t\t }\n\t\t\t else\n\t\t\t\t showIncorrectDialog();\n\t\t }\n\t }",
"public void q3Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q3option1);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ3) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ3 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private void calculateScoreForCheckBoxes(boolean question3_option1, boolean question3_option3,\n boolean question3_option4, boolean question4_option1,\n boolean question4_option2, boolean question4_option4,\n boolean question8_option1, boolean question8_option3) {\n // if user picks option 1 in question 3, add 1 to score.\n if (question3_option1) {\n score += 1;\n }\n\n // if user picks option 3 in question 3, add 1 to score.\n if (question3_option3) {\n score += 1;\n }\n\n // if user picks option 4 in question 3, add 1 to score.\n if (question3_option4) {\n score += 1;\n }\n\n // if user picks option 1 in question 4, add 1 to score.\n if (question4_option1) {\n score += 1;\n }\n\n // if user picks option 2 in question 4, add 1 to score.\n if (question4_option2) {\n score += 1;\n }\n\n // if user picks option 4 in question 4, add 1 to score.\n if (question4_option4) {\n score += 1;\n }\n // if user picks option 2 in question 4, add 1 to score.\n if (question8_option1) {\n score += 1;\n }\n // if user picks option 2 in question 4, add 1 to score.\n if (question8_option3) {\n score += 1;\n }\n\n }",
"private void checkAtLeastOneRuleIsSelected() {\n\t\tsufficientRulesSelected = false;\n\t\tint checked = 0;\n\t\tControl[] controlArray = rulesGroup.getChildren();\n\n\t\tfor (Control elem : controlArray) {\n\t\t\tif (elem instanceof Button) {\n\t\t\t\tif (((Button) elem).getSelection()) {\n\t\t\t\t\tchecked++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checked >= 1)\n\t\t\tsufficientRulesSelected = true;\n\t\tupdateFinishButton();\n\t}",
"private String getUserAnswer() {\n CheckBox checkBox1 = (CheckBox) findViewById(R.id.checkbox_1);\n CheckBox checkBox2 = (CheckBox) findViewById(R.id.checkbox_2);\n CheckBox checkBox3 = (CheckBox) findViewById(R.id.checkbox_3);\n CheckBox checkBox4 = (CheckBox) findViewById(R.id.checkbox_4);\n EditText inputText = (EditText) findViewById(R.id.input_text);\n RadioButton radioButtonA = (RadioButton) findViewById(R.id.radio_button_A);\n RadioButton radioButtonB = (RadioButton) findViewById(R.id.radio_button_B);\n RadioButton radioButtonC = (RadioButton) findViewById(R.id.radio_Button_C);\n RadioButton radioButtonD = (RadioButton) findViewById(R.id.radio_Button_D);\n\n if (radioButtonA.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonA.getText().toString();\n else if (radioButtonB.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonB.getText().toString();\n else if (radioButtonC.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonC.getText().toString();\n else if (radioButtonD.isChecked())\n userAnswer[currentQueNum - 1] = radioButtonD.getText().toString();\n\n //the below block of code can be modify if needed that, to record the state of checkbox\n //and compare with set down cases\n //but in this situation this is the only condition that a correct answer is chosen\n else if (checkBox1.isChecked() && checkBox2.isChecked() && checkBox3.isChecked() && !checkBox4.isChecked()) {\n userAnswer[currentQueNum - 1] = checkBox1.getText().toString() + \",\" + checkBox2.getText().toString() + \",\" + checkBox3.getText().toString();\n\n } else if (inputText.getText().toString().trim().length() != 0) {\n userAnswer[currentQueNum - 1] = inputText.getText().toString();\n inputText.setText(\"\");// this will set the text field back to empty for subsequent use\n } else\n userAnswer[currentQueNum - 1] = \"skipped\";//the string when user skipped question\n return userAnswer[currentQueNum - 1];\n }",
"private boolean checkAnswerTwo() {\n CheckBox correctAnswer1Q2 = findViewById(R.id.qs2Ans3);\n correctAnswer1Q2.setTextColor(Color.parseColor(\"green\"));\n return correctAnswer1Q2.isChecked();\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tif(i<4)\n\t\t{\n\t\t\n\t\tif(r1.isChecked())\n\t\t{\n\t\t\tans=\"true\";\n\t\t\t\n\t\t\n\t\t}\n\t\telse if(r2.isChecked())\n\t\t{\n\t\t\tans=\"false\";\n\t\t}\n\t\tif(ans.equalsIgnoreCase(ExamSupport.answers[i]))\n\t\t\t\n\t\t{\n\t\t\tresult=result+1;\n\t\t}\n\t\ti=i+1;\n\t\t//score.setText(\"YOUR SCORE: \"+result);\n\t\tquestions.setText(ExamSupport.questions[i]);\n\t\t\n\n\t}\n\t\telse if(i==4)\n\t\t{\n\t\t\t\n\t\t\tif(r1.isChecked())\n\t\t\t{\n\t\t\t\tans=\"true\";\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\telse if(r2.isChecked())\n\t\t\t{\n\t\t\t\tans=\"false\";\n\t\t\t}\n\t\t\tif(ans.equalsIgnoreCase(ExamSupport.answers[i]))\n\t\t\t\t\n\t\t\t{\n\t\t\t\tresult=result+1;\n\t\t\t}\n\t\t\tToast.makeText(this,result,Toast.LENGTH_LONG).show();\n\t}\n\t}",
"public void q7Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q7option4);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ7) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct1), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ7 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private boolean checkAnswered(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If no option selected, the question hasn't been answered\n if (checkedRadioButtonId == -1) {\n return false;\n }\n // If an option is selected, the question as been answered\n else{\n return true;\n }\n }",
"public void q5Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q5option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ5) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ5 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }",
"public void checkTwoBox(View view) {\n CheckBox firstcheck = (CheckBox) findViewById(R.id.optionQ3_1);\n CheckBox secondcheck = (CheckBox) findViewById(R.id.optionQ3_2);\n CheckBox thirdcheck = (CheckBox) findViewById(R.id.optionQ3_3);\n\n if (firstcheck.isChecked() && secondcheck.isChecked()) {\n thirdcheck.setChecked(false);\n }\n if (thirdcheck.isChecked() && secondcheck.isChecked()) {\n firstcheck.setChecked(false);\n }\n if (thirdcheck.isChecked() && firstcheck.isChecked()) {\n secondcheck.setChecked(false);\n }\n }",
"public void q2Submit(View view) {\n\n RadioButton radioButton = (RadioButton) findViewById(R.id.q2option3);\n\n //Nested if statements to check if the answer is correct or not, then to assign 2 points if it's correct.\n if (radioButton.isChecked()) {\n if (isNotAnsweredQ2) {\n display(pointCounter += 2);\n Toast.makeText(this, getString(R.string.correct2), Toast.LENGTH_SHORT).show();\n isNotAnsweredQ2 = false;\n }\n } else {\n Toast.makeText(this, getString(R.string.thinkAgain), Toast.LENGTH_SHORT).show();\n }\n }",
"private boolean checkQuestion(int number){\n String answer = questionsList.get(number).getAnswer();\n return answer.equals(\"true\");\n\n }",
"private int calculatePoints(boolean firstCheckBoxIsChecked, boolean secondCheckBoxIsChecked, String questionFourAnswered, int selectedIdQ2, int selectedIdQ3, boolean thirdCheckBoxIsChecked, boolean fourthCheckBoxIsChecked) {\n int basePoints = 0;\n int correctIdQ2 = R.id.question_two_answer_c;\n int correctIdQ3 = R.id.question_three_answer_b;\n\n //On question 1, checkboxes 1 & 2 are correct. If the user gets 1 correct answer, they get 1 point. If they get\n //2 correct answers, they get 2 points. If they get 1 correct answer & 1 incorrect answer, they still get 1 point.\n //For 2 correct & 1 incorrect answer, two points are given. If all boxes are ticked, no points are given.\n if (firstCheckBoxIsChecked && secondCheckBoxIsChecked) {\n if (!thirdCheckBoxIsChecked && !fourthCheckBoxIsChecked) {\n basePoints = basePoints + 2;\n } else {\n return basePoints;\n }\n } else if (secondCheckBoxIsChecked) {\n if (!thirdCheckBoxIsChecked && !fourthCheckBoxIsChecked) {\n basePoints = basePoints + 1;\n } else if (thirdCheckBoxIsChecked) {\n basePoints = basePoints + 1;\n } else if (fourthCheckBoxIsChecked) {\n basePoints = basePoints + 1;\n } else {\n return basePoints;\n }\n } else if (firstCheckBoxIsChecked) {\n if (!thirdCheckBoxIsChecked && !fourthCheckBoxIsChecked) {\n basePoints = basePoints + 1;\n } else if (thirdCheckBoxIsChecked) {\n basePoints = basePoints + 1;\n } else if (fourthCheckBoxIsChecked) {\n return basePoints = basePoints + 1;\n } else {\n return basePoints;\n }\n }\n\n //If the content input in the EditText field is the same as the correct answer provided, the user gets 1 point\n if (questionFourAnswered.contentEquals(getString(R.string.question_4_answer))) {\n basePoints = basePoints + 1;\n }\n //if the user selects the answer which has got the same id as the correct answer, the user gets one point\n if (selectedIdQ2 == correctIdQ2) {\n basePoints = basePoints + 1;\n }\n if (selectedIdQ3 == correctIdQ3) {\n basePoints = basePoints + 1;\n }\n return basePoints;\n }",
"public void checkAnswerOne() {\n RadioGroup ans1 = findViewById(R.id.radio_gr_q1);\n int radioButtonId = ans1.getCheckedRadioButtonId();\n\n if (radioButtonId == R.id.a2_q1) {\n points++;\n }\n }",
"private boolean checkSelected() {\n\t\tRadioButton c1 = (RadioButton)findViewById(R.id.ch_01Setting);\n\t\tRadioButton c2 = (RadioButton)findViewById(R.id.ch_02Setting);\n\t\tRadioButton c3 = (RadioButton)findViewById(R.id.ch_03Setting);\n\t\tRadioButton c4 = (RadioButton)findViewById(R.id.ch_04Setting);\n\t\tRadioButton c5 = (RadioButton)findViewById(R.id.ch_05Setting);\n\t\tRadioButton c6 = (RadioButton)findViewById(R.id.ch_06Setting);\n\t\tRadioButton c061 = (RadioButton)findViewById(R.id.ch_061Setting);\n\t\tRadioButton c7 = (RadioButton)findViewById(R.id.ch_07Setting);\n\t\tRadioButton c8 = (RadioButton)findViewById(R.id.ch_08Setting);\n\t\tRadioButton c9 = (RadioButton)findViewById(R.id.ch_09Setting);\n\t\tRadioButton c10 = (RadioButton)findViewById(R.id.ch_10Setting);\n\t\tRadioButton c11 = (RadioButton)findViewById(R.id.ch_11Setting);\n\t\tRadioButton c111 = (RadioButton)findViewById(R.id.ch_111Setting);\n\t\tRadioButton c12 = (RadioButton)findViewById(R.id.ch_12Setting);\n\t\tRadioButton c13 = (RadioButton)findViewById(R.id.ch_13Setting);\n\t\tRadioButton c131 = (RadioButton)findViewById(R.id.ch_131Setting);\n\t\tRadioButton c14 = (RadioButton)findViewById(R.id.ch_14Setting);\n\t\tRadioButton c15 = (RadioButton)findViewById(R.id.ch_15Setting);\n\t\tRadioButton c16 = (RadioButton)findViewById(R.id.ch_16Setting);\n\t\tRadioButton c17 = (RadioButton)findViewById(R.id.ch_17Setting);\n\t\tRadioButton c18 = (RadioButton)findViewById(R.id.ch_18Setting);\n\t\tRadioButton c19 = (RadioButton)findViewById(R.id.ch_19Setting);\n\t\tRadioButton c20 = (RadioButton)findViewById(R.id.ch_20Setting);\n\t\tRadioButton c21 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c22 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c23 = (RadioButton)findViewById(R.id.ch_23Setting);\n\t\tRadioButton c24 = (RadioButton)findViewById(R.id.ch_24Setting);\n\t\tRadioButton c25 = (RadioButton)findViewById(R.id.ch_25Setting);\n\t\tRadioButton c26 = (RadioButton)findViewById(R.id.ch_26Setting);\n\t\tRadioButton c27 = (RadioButton)findViewById(R.id.ch_27Setting);\n\t\tRadioButton c28 = (RadioButton)findViewById(R.id.ch_28Setting);\n\t\tRadioButton c29 = (RadioButton)findViewById(R.id.ch_29Setting);\n\t\tRadioButton c291 = (RadioButton)findViewById(R.id.ch_291Setting);\n\t\tRadioButton c30 = (RadioButton)findViewById(R.id.ch_30Setting);\n\t\tRadioButton c31 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c32 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c321 = (RadioButton)findViewById(R.id.ch_321Setting);\n\t\tRadioButton c322 = (RadioButton)findViewById(R.id.ch_322Setting);\n\t\t\t\n\t\t\n\t\t\n\t\treturn (c1.isChecked() || c2.isChecked() || c3.isChecked() || \n\t\t\t\tc4.isChecked() || c5.isChecked() || c6.isChecked() || \n\t\t\t\tc061.isChecked() || c7.isChecked() || c8.isChecked() ||\n\t\t\t\tc9.isChecked() || c10.isChecked() || c11.isChecked() ||\t\n\t\t\t\tc111.isChecked() ||\tc12.isChecked() || c13.isChecked() || \n\t\t\t\tc131.isChecked() ||\tc14.isChecked() || c15.isChecked() || \n\t\t\t\tc16.isChecked() || c17.isChecked() || c18.isChecked() || \n\t\t\t\tc19.isChecked() || c20.isChecked() || c21.isChecked() || \n\t\t\t\tc22.isChecked() || c23.isChecked() || c24.isChecked() || \n\t\t\t\tc25.isChecked() || c26.isChecked() || c27.isChecked() || \n\t\t\t\tc28.isChecked() || c29.isChecked() || c291.isChecked() ||\n\t\t\t\tc30.isChecked() || c31.isChecked() || c32.isChecked() || \n\t\t\t\tc321.isChecked() || c322.isChecked());\n\t}",
"public String selectedAnswer()\n {\n \n if(jrbOption1.isSelected())\n \n return\"Answer1\";\n else if(jrbOption2.isSelected())\n return\"Answer2\";\n else if(jrbOption3.isSelected())\n return\"Answer3\";\n else if(jrbOption4.isSelected())\n return\"Answer4\";\n else return null;\n}",
"public void questionThreeRadioButtons(View view){\n // Is the button now checked?\n boolean checked = ((RadioButton) view).isChecked();\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.question_3_radio_button_1:\n if (checked)\n break;\n case R.id.question_3_radio_button_2:\n if (checked)\n break;\n case R.id.question_3_radio_button_3:\n if (checked)\n break;\n case R.id.question_3_radio_button_4:\n if (checked)\n break;\n }\n }",
"public void submitAnswers(View view){\n\n //Find the correct answers for questions 1 & 2 and check if they have been selected\n CheckBox firstCheckBox = (CheckBox)findViewById(R.id.checkbox1);\n boolean firstCheckBoxIsChecked = firstCheckBox.isChecked();\n\n CheckBox secondCheckBox = (CheckBox)findViewById(R.id.checkbox2);\n boolean secondCheckBoxIsChecked = secondCheckBox.isChecked();\n\n CheckBox thirdCheckBox = (CheckBox)findViewById(R.id.checkbox3);\n boolean thirdCheckBoxIsChecked = thirdCheckBox.isChecked();\n\n CheckBox fourthCheckBox = (CheckBox)findViewById(R.id.checkbox4);\n boolean fourthCheckBoxIsChecked = fourthCheckBox.isChecked();\n\n //Find the EditText field, find out what has been typed in the field and convert it into a string\n EditText questionFourAnswer = (EditText)findViewById(R.id.question_four_field);\n String questionFourAnswered = questionFourAnswer.getText().toString().toLowerCase();\n\n //Find the RadioGroup for Question2 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion2 = (RadioGroup) findViewById(R.id.radio_group_q2);\n int selectedIdQ2 = radioGroupQuestion2.getCheckedRadioButtonId();\n\n //Find the RadioGroup for Question3 and find out which radioButton has been selected\n RadioGroup radioGroupQuestion3= (RadioGroup) findViewById(R.id.radio_group_q3);\n int selectedIdQ3 = radioGroupQuestion3.getCheckedRadioButtonId();\n\n //Calculate points, create a message to display users' score and display it as a toast message\n int points = calculatePoints(firstCheckBoxIsChecked, secondCheckBoxIsChecked, questionFourAnswered, selectedIdQ2, selectedIdQ3, thirdCheckBoxIsChecked, fourthCheckBoxIsChecked);\n String pointsMessage = createQuizSummary(points);\n Toast.makeText(getApplicationContext(), pointsMessage, Toast.LENGTH_SHORT).show();\n }",
"private boolean validateInputs(){\n if(jrTakeTest.isSelected()==false && jrViewScores.isSelected()==false && jrChangePassword.isSelected()==false)\n return false;\n return true;\n}",
"@Step(\"Select and assert checkboxes\")\n public void selectCheckBox() {\n //http://selenide.org/javadoc/3.5/com/codeborne/selenide/SelenideElement.html\n $(\"label:contains('Water')\").scrollTo();\n $(\"label:contains('Water')\").setSelected(true);\n $(\".label-checkbox:contains('Water') input\").shouldBe(checked);\n logList.add(CHECKBOX1.toString());\n $(\".label-checkbox:contains('Wind')\").scrollTo();\n $(\".label-checkbox:contains('Wind')\").setSelected(true);\n $(\".label-checkbox:contains('Wind') input\").shouldBe(checked);\n logList.add(CHECKBOX2.toString());\n }",
"void scoreQuestion(int questionNumber){\r\n switch(questionNumber){\r\n case 1:\r\n RadioButton radioButtonQ1 = (RadioButton) findViewById(R.id.soccer_question_1_correct_answer);\r\n if (radioButtonQ1.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 2:\r\n CheckBox checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_1);\r\n if(checkBoxQ2.isChecked()){\r\n return;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_2);\r\n if(checkBoxQ2.isChecked()){\r\n return;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_1);\r\n if(checkBoxQ2.isChecked()){\r\n playerScore += 5;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_2);\r\n if(checkBoxQ2.isChecked()){\r\n playerScore += 5;\r\n }\r\n break;\r\n case 3:\r\n RadioButton radioButtonQ3 = (RadioButton) findViewById(R.id.soccer_question_3_correct_answer);\r\n if (radioButtonQ3.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 4:\r\n RadioButton radioButtonQ4 = (RadioButton) findViewById(R.id.basketball_question_1_correct_answer);\r\n if (radioButtonQ4.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 5:\r\n RadioButton radioButtonQ5 = (RadioButton) findViewById(R.id.basketball_question_2_correct_answer);\r\n if (radioButtonQ5.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 6:\r\n EditText editTextQ6 = (EditText) findViewById(R.id.basketball_question_3);\r\n String answerQ6 = getString(R.string.basketball_question_3_correct_answer);\r\n if(answerQ6.equalsIgnoreCase(editTextQ6.getText().toString())){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 7:\r\n RadioButton radioButtonQ7 = (RadioButton) findViewById(R.id.volleyball_question_1_correct_answer);\r\n if (radioButtonQ7.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 8:\r\n RadioButton radioButtonQ8 = (RadioButton) findViewById(R.id.volleyball_question_2_correct_answer);\r\n if (radioButtonQ8.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 9:\r\n RadioButton radioButtonQ9 = (RadioButton) findViewById(R.id.tenis_question_1_correct_answer);\r\n if (radioButtonQ9.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 10:\r\n EditText editTextQ10 = (EditText) findViewById(R.id.boxe_question_1);\r\n String answerQ10 = getString(R.string.boxe_question_1_correct_answer);\r\n if(answerQ10.equalsIgnoreCase(editTextQ10.getText().toString())){\r\n playerScore += 10;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }",
"private void getAllQuestion(){\r\n\r\n if(ques.getText().toString().equals(\"\")||opt1.getText().toString().equals(\"\")||opt2.getText().toString().equals(\"\")||\r\n opt3.getText().toString().equals(\"\")||correct.getText().toString().equals(\"\")){\r\n Toast.makeText(getBaseContext(), \"Please fill all fields\", Toast.LENGTH_LONG).show();\r\n }\r\n else{\r\n\r\n int c = Integer.parseInt((correct.getText().toString()));\r\n if (c > 3) {\r\n Toast.makeText(getBaseContext(), \"Invalid Correct answer\", Toast.LENGTH_LONG).show();\r\n } else {\r\n\r\n setQuestions();\r\n }\r\n finishQuiz();\r\n }\r\n }",
"private void validateQuestion(){\n int checkedRadioButtonId = Question.getCheckedRadioButtonId();\n\n // If the correct question has been chosen, update the score & display a toast message\n if (checkedRadioButtonId == R.id.radio4_question1) {\n score = score + 2;\n }\n }",
"public void finishQuiz(View view){\n if(((RadioButton) findViewById(R.id.radio_new_york_city)).isChecked()) {\n score++;\n }\n\n //Anser for question 2\n if(((RadioButton) findViewById(R.id.radio_food_cart)).isChecked()) score++;\n\n //Anser for question 3\n if(((CheckBox) findViewById(R.id.check_chicken)).isChecked()\n && ((CheckBox) findViewById(R.id.check_gyro)).isChecked()\n && !((CheckBox) findViewById(R.id.check_pork)).isChecked()) score++;\n\n //Anser for question 4\n String answer4 = ((EditText) findViewById(R.id.edit_bread)).getText().toString().toLowerCase();\n if(answer4.equals(\"pita\")) score++;\n\n //Anser for question 5\n if(((CheckBox) findViewById(R.id.check_red)).isChecked()\n && ((CheckBox) findViewById(R.id.check_yellow)).isChecked()\n && !((CheckBox) findViewById(R.id.check_white)).isChecked()) score++;\n\n\n //Anser for question 6\n if(((RadioButton) findViewById(R.id.radio_large)).isChecked()) score++;\n\n //Display the Toast\n Context context = getApplicationContext();\n\n CharSequence text;\n if(score == 6) {\n text = \"Congrats! Your Score was \" + score + \" out of 6!\";\n } else {\n text = \"You only have \" + score + \" out of 6! Try again!\";\n }\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n //Resest score to 0\n\n score = 0;\n }",
"private boolean checkBoxSituation(int secondI, int secondJ) {\n int max = 0;\n if (secondI + 1 < 8) {\n if (checkBlueBox(secondI + 1, secondJ)) {\n max++;\n }\n }\n if (secondI - 1 > -1) {\n if (checkBlueBox(secondI - 1, secondJ)) {\n max++;\n }\n }\n if (secondJ + 1 < 8) {\n if (checkBlueBox(secondI, secondJ + 1)) {\n max++;\n }\n }\n if (secondJ - 1 > -1) {\n if (checkBlueBox(secondI, secondJ - 1)) {\n max++;\n }\n }\n if (max >= 3) {\n return true;\n }\n return false;\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateCheckboxField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the whether error message is getting displayed when the user doesnot marks Terms and conditions check box \"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.validateCheckboxTermsAndCnds(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}",
"private boolean checkQuestion(int number) {\n String answer = questionsList.get(number).getAnswer();\n return answer.equals(\"True\");\n }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\tint id=buttonView.getId();\n\t\tRadioButton[] checbox=new RadioButton[3];\n \t\tchecbox[0]=less_thirty_check;\n \t\tchecbox[1]=thirty_fourty_check;\n \t\tchecbox[2]=great_fourty_check;\n \t\t\n \t\t\n \t\tRadioButton[] checkbox1=new RadioButton[3];\n \t\tcheckbox1[0]=health_check;\n \t\tcheckbox1[1]=diabetes_check;\n \t\tcheckbox1[2]=other_check;\n \t\t\n \t\t\n \t\tRadioButton[] checkbox2=new RadioButton[6];\n \t\tcheckbox2[0]=guy_check;\n \t\tcheckbox2[1]=dad_check;\n \t\tcheckbox2[2]=girl_check;\n \t\tcheckbox2[3]=mom_check;\n \t\tcheckbox2[4]=grandad_check;\n \t\tcheckbox2[5]=grand_ma;\n \t\t\n \t\t\n \t\tswitch (id) {\n \t\tcase R.id.less_thirty_check:\n \t\t\tif(isChecked){\n \t\t\t\n \t\t\t\tRadioButton check=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check, checbox);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase R.id.thirty_fourty_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check1=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check1, checbox);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.great_fourty_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check2=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check2, checbox);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.health_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check3=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check3, checkbox1);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.diabetes_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check4=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check4, checkbox1);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.other_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check5=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check5, checkbox1);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.guy_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check6=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check6, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.dad_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check7=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check7, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.girl_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check8=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check8, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.mom_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check9=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check9, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.grandad_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check10=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check10, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.grand_ma:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check11=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check11, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n\n \t\tdefault:\n// \t\t\tCheckBox check12=(CheckBox) findViewById(id);\n// \t\t\tcheckCondition(check12, this.check);\n \t\t\tbreak;\n \t\t}\n\t}",
"private void checkSingleChoice(){\n \t\t\t\n \t\t\t// get selected radio button from radioGroup\n \t\t\tint selectedId = radioGroup.getCheckedRadioButtonId();\n \t\t\t\n \t\t\tRadioButton selectedButton = (RadioButton)getView().findViewById(selectedId);\n \t\t\t\n \t\t\tif(selectedButton!=null){\n \t\t\t\t\n \t\t\t\tString choice = selectedButton.getTag().toString();\n \t\t\t\tString choiceText = selectedButton.getText().toString();\n \t\t\t\t\n \t\t\t\t// TESTING ONLY\n \t\t\t\tint qid = eventbean.getQid();\n \t\t\t\tLog.v(\"schoice\",\"QID=\"+qid+\"/Choice=\"+choice);\n \t\t\t\t\n \t\t\t\t//setting the response for that survey question\n \t\t\t\teventbean.setChoiceResponse(choice+\".\"+choiceText);\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tRadioButton[] checbox=new RadioButton[3];\n\t\tchecbox[0]=less_thirty_check;\n\t\tchecbox[1]=thirty_fourty_check;\n\t\tchecbox[2]=great_fourty_check;\n\t\t\n\t\t\n\t\tRadioButton[] checkbox1=new RadioButton[3];\n\t\tcheckbox1[0]=health_check;\n\t\tcheckbox1[1]=diabetes_check;\n\t\tcheckbox1[2]=other_check;\n\t\t\n\t\t\n\t\tRadioButton[] check2=new RadioButton[6];\n\t\tcheck2[0]=guy_check;\n\t\tcheck2[1]=dad_check;\n\t\tcheck2[2]=girl_check;\n\t\tcheck2[3]=mom_check;\n\t\tcheck2[4]=grandad_check;\n\t\tcheck2[5]=grand_ma;\n\t\t\n\t\tif(Checkvalidation(checbox)){\t\t\t\t\n\t\t\tRadioButton checkbox=SelectedCheckBox(checbox);\n\t\t\tint check_id=checkbox.getId();\n\t\t\tswitch (check_id) {\n\t\t\tcase R.id.less_thirty_check:\n\t\t\t\tLog.d(\"sun\",\"less thirty check\");\n//\t\t\t\tAppsConstant.user_age=\"<30\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.thirty_fourty_check:\n\t\t\t\tLog.d(\"sun\",\"thirty fourty check\");\n//\t\t\t\tAppsConstant.user_age=\"30-45\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.great_fourty_check:\n\t\t\t\tLog.d(\"sun\",\"great fourty check\");\n//\t\t\t\tAppsConstant.user_age=\">45\";\n\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(getApplicationContext(), \"please select age\", Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tif(Checkvalidation(checkbox1)){\n\t\t\tRadioButton checkbox=SelectedCheckBox(checkbox1);\n\t\t\tint check_id=checkbox.getId();\n\t\t\tswitch (check_id) {\n\t\t\tcase R.id.health_check:\n\t\t\t\tLog.d(\"sun\",\"health_check\");\n//\t\t\t\tAppsConstant.user_health=\"health\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.diabetes_check:\n\t\t\t\tLog.d(\"sun\",\"diabetes_check\");\n//\t\t\t\tAppsConstant.user_health=\"diabetes\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.other_check:\n\t\t\t\tLog.d(\"sun\",\"other_check\");\n//\t\t\t\tAppsConstant.user_health=\"other\";\n\t\t\t\tbreak;\n\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(getApplicationContext(), \"please Select the health Problem\", Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tif(Checkvalidation(check2)){\n\t\t\tRadioButton checkbox=SelectedCheckBox(check2);\n\t\t\tint check_id=checkbox.getId();\n\t\t\tswitch (check_id) {\n\t\t\tcase R.id.guy_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Guy\");\n//\t\t\t\tAppsConstant.user_gender=\"guy\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.dad_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Dad\");\n//\t\t\t\tAppsConstant.user_gender=\"dad\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.girl_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Girl\");\n//\t\t\t\tAppsConstant.user_gender=\"girl\";\n\t\t\t\tbreak;\n\t\t\tcase R.id.mom_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Mom\");\n//\t\t\t\tAppsConstant.user_gender=\"mom\";\n\t\t\t\tbreak;\n\n\t\t\tcase R.id.grandad_check:\n\t\t\t\tLog.d(\"sun\",\"Gender:-GrandDad\");\n//\t\t\t\tAppsConstant.user_gender=\"granddad\";\n\t\t\t\tbreak;\n\n\t\t\tcase R.id.grand_ma:\n\t\t\t\tLog.d(\"sun\",\"Gender:-GrandMaa\");\n//\t\t\t\tAppsConstant.user_gender=\"grandmaa\";\n\t\t\t\tbreak;\n\n\n\t\t\tdefault:\n\t\t\t\tLog.d(\"sun\",\"Gender:-Guy\");\n//\t\t\t\tAppsConstant.user_gender=\"guy\";\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tToast.makeText(getApplicationContext(), \"Please Select Your Gender\", Toast.LENGTH_SHORT).show();\n\t\t\treturn;\n\t\t}\n\n\t}",
"public String checkNewQuestions() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString question = \"\";\n\n\t\tquestion += testGenerator.getQuestionText(questionNo);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 1);\n\t\tquestion += testGenerator.getAnswerText(questionNo, 2);\n\n\t\tif(numAnswers >= 3) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 3);\n\t\t} \n\t\tif(numAnswers == 4) {\n\t\t\tquestion += testGenerator.getAnswerText(questionNo, 4);\n\t\t}\n\t\treturn question;\n\t}",
"private boolean checkBox() {\n if(ToSCheckBox.isSelected()) { return true; }\n else {\n errorMessage.setText(\"Please check that you have read and agree to \" +\n \"the Terms of Service agreement.\");\n return false;\n }\n }",
"private int getNumberCorrect() {\n RadioButton rb1 = (RadioButton) findViewById(R.id.question_1_correct);\n RadioButton rb2 = (RadioButton) findViewById(R.id.question_2_correct);\n RadioButton rb3 = (RadioButton) findViewById(R.id.question_3_correct);\n RadioButton rb4 = (RadioButton) findViewById(R.id.question_4_correct);\n boolean q5Answer = checkQuestion5();\n boolean q6answer = checkQuestion6();\n ToggleButton tb7 = (ToggleButton) findViewById(R.id.question_7);\n ToggleButton tb8 = (ToggleButton) findViewById(R.id.question_8);\n boolean bool8 = !tb8.isChecked();\n ToggleButton tb9 = (ToggleButton) findViewById(R.id.question_9);\n ToggleButton tb10 = (ToggleButton) findViewById(R.id.question_10);\n\n boolean answers[] = new boolean[]{rb1.isChecked(), rb2.isChecked(), rb3.isChecked(), rb4.isChecked(),\n q5Answer, q6answer, tb7.isChecked(), bool8, tb9.isChecked(),\n tb10.isChecked()};\n return countCorrectAnswers(answers);\n }",
"public void checkScore(View view) {\n //Question Nr. 1 radio button\n RadioButton true1AnswerOne = (RadioButton) findViewById(R.id.q1a1);\n Boolean is1OneTrue = true1AnswerOne.isChecked();\n if (is1OneTrue) {\n\n }\n\n RadioButton true1AnswerTwo = (RadioButton) findViewById(R.id.q1a2);\n Boolean is1TwoTrue = true1AnswerTwo.isChecked();\n if (is1TwoTrue) {\n\n }\n\n RadioButton true1AnswerThree = (RadioButton) findViewById(R.id.q1a3);\n Boolean is1ThreeTrue = true1AnswerThree.isChecked();\n if (is1ThreeTrue) {\n score = score + 2;\n }\n\n RadioButton true1AnswerFour = (RadioButton) findViewById(R.id.q1a4);\n Boolean is1FourTrue = true1AnswerFour.isChecked();\n if (is1FourTrue) {\n score++;\n }\n\n //Question Nr. 2 radio button\n RadioButton true2AnswerOne = (RadioButton) findViewById(R.id.q2a1);\n Boolean is2OneTrue = true2AnswerOne.isChecked();\n if (is2OneTrue) {\n\n }\n\n RadioButton true2AnswerTwo = (RadioButton) findViewById(R.id.q2a2);\n Boolean is2TwoTrue = true2AnswerTwo.isChecked();\n if (is2TwoTrue) {\n\n }\n\n RadioButton true2AnswerThree = (RadioButton) findViewById(R.id.q2a3);\n Boolean is2ThreeTrue = true2AnswerThree.isChecked();\n if (is2ThreeTrue) {\n score++;\n }\n\n RadioButton true2AnswerFour = (RadioButton) findViewById(R.id.q2a4);\n Boolean is2FourTrue = true2AnswerFour.isChecked();\n if (is2FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 3 radio button\n RadioButton true3AnswerOne = (RadioButton) findViewById(R.id.q3a1);\n Boolean is3OneTrue = true3AnswerOne.isChecked();\n if (is3OneTrue) {\n\n }\n\n RadioButton true3AnswerTwo = (RadioButton) findViewById(R.id.q3a2);\n Boolean is3TwoTrue = true3AnswerTwo.isChecked();\n if (is3TwoTrue) {\n\n }\n\n RadioButton true3AnswerThree = (RadioButton) findViewById(R.id.q3a3);\n Boolean is3ThreeTrue = true3AnswerThree.isChecked();\n if (is3ThreeTrue) {\n score++;\n }\n\n RadioButton true3AnswerFour = (RadioButton) findViewById(R.id.q3a4);\n Boolean is3FourTrue = true3AnswerFour.isChecked();\n if (is3FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 4 radio button\n RadioButton true4AnswerOne = (RadioButton) findViewById(R.id.q4a1);\n Boolean is4OneTrue = true4AnswerOne.isChecked();\n if (is4OneTrue) {\n\n }\n\n RadioButton true4AnswerTwo = (RadioButton) findViewById(R.id.q4a2);\n Boolean is4TwoTrue = true4AnswerTwo.isChecked();\n if (is4TwoTrue) {\n\n }\n\n RadioButton true4AnswerThree = (RadioButton) findViewById(R.id.q4a3);\n Boolean is4ThreeTrue = true4AnswerThree.isChecked();\n if (is4ThreeTrue) {\n score++;\n }\n\n RadioButton true4AnswerFour = (RadioButton) findViewById(R.id.q4a4);\n Boolean is4FourTrue = true4AnswerFour.isChecked();\n if (is4FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 5 radio button\n RadioButton true5AnswerOne = (RadioButton) findViewById(R.id.q5a1);\n Boolean is5OneTrue = true5AnswerOne.isChecked();\n if (is5OneTrue) {\n\n }\n\n RadioButton true5AnswerTwo = (RadioButton) findViewById(R.id.q5a2);\n Boolean is5TwoTrue = true5AnswerTwo.isChecked();\n if (is5TwoTrue) {\n score = score + 2;\n }\n\n RadioButton true5AnswerThree = (RadioButton) findViewById(R.id.q5a3);\n Boolean is5ThreeTrue = true5AnswerThree.isChecked();\n if (is5ThreeTrue) {\n score++;\n }\n\n RadioButton true5AnswerFour = (RadioButton) findViewById(R.id.q5a4);\n Boolean is5FourTrue = true5AnswerFour.isChecked();\n if (is5FourTrue) {\n\n }\n\n //Question Nr. 6 radio button\n RadioButton true6AnswerOne = (RadioButton) findViewById(R.id.q6a1);\n Boolean is6OneTrue = true6AnswerOne.isChecked();\n if (is6OneTrue) {\n score = score + 2;\n }\n\n RadioButton true6AnswerTwo = (RadioButton) findViewById(R.id.q6a2);\n Boolean is6TwoTrue = true6AnswerTwo.isChecked();\n if (is6TwoTrue) {\n score++;\n }\n\n RadioButton true6AnswerThree = (RadioButton) findViewById(R.id.q6a3);\n Boolean is6ThreeTrue = true6AnswerThree.isChecked();\n if (is6ThreeTrue) {\n\n }\n\n RadioButton true6AnswerFour = (RadioButton) findViewById(R.id.q6a4);\n Boolean is6FourTrue = true6AnswerFour.isChecked();\n if (is6FourTrue) {\n\n }\n\n //Question Nr. 7 check box\n CheckBox trueAnswerSeven1 = (CheckBox) findViewById(R.id.trueq7a1);\n Boolean isSeven1True = trueAnswerSeven1.isChecked();\n CheckBox trueAnswerSeven2 = (CheckBox) findViewById(R.id.trueq7a2);\n Boolean isSeven2True = trueAnswerSeven2.isChecked();\n CheckBox trueAnswerSeven3 = (CheckBox) findViewById(R.id.trueq7a3);\n Boolean isSeven3True = trueAnswerSeven3.isChecked();\n CheckBox trueAnswerSeven4 = (CheckBox) findViewById(R.id.trueq7a4);\n Boolean isSeven4True = trueAnswerSeven4.isChecked();\n if (isSeven1True) {\n score++;\n }\n\n if (isSeven2True) {\n score++;\n }\n\n if (isSeven3True) {\n score++;\n }\n\n if (isSeven4True) {\n score++;\n }\n\n //Question Nr. 8 edit text\n EditText trueAnswerEight = (EditText) findViewById(R.id.q8a1);\n String isEightTrue = trueAnswerEight.getText().toString();\n if (isEightTrue.equals(\"Love You\")) {\n score++;\n }\n\n //Text of the message after the Check your score button is clicked.\n if (score < 6) {\n Toast.makeText(this, \"You scored \" + score + \" points out of 17. One of you might be caught in so called \\\"Passion trap\\\" (search for it in the internet). You both need to work on your relationships to improve the balance.\", Toast.LENGTH_LONG).show();\n } else if (score < 12) {\n Toast.makeText(this, \"Good! You scored \" + score + \" points out of 17! Your relationship probably needs a bit of work to take it from good to great. Search for \\\"Relationship balance or Passion trap in the internet.\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this, \"Congratulations! You scored \" + score + \" points out of 17! You seem to have a good and balanced relationship with your partner.\", Toast.LENGTH_LONG).show();\n }\n score = 0;\n }",
"public void saveQuestion(){\n\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tString setAnswerBox = Integer.toString(numAnswers);\n\n\t\ttestGenerator.setQuestionText(questionNo, ques.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 1, ans1.getText());\n\t\ttestGenerator.setAnswerText(questionNo, 2, ans2.getText());\n\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 1, answer1.isSelected());\n\t\ttestGenerator.setIsAnswerCorrect(questionNo, 2, answer2.isSelected());\n\n\t\tif((setAnswerBox.equals(\"3\")) || setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 3, ans3.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 3, answer3.isSelected());\n\t\t}\n\n\t\tif(setAnswerBox.equals(\"4\")) {\n\t\t\ttestGenerator.setAnswerText(questionNo, 4, ans4.getText()); \t\n\t\t\ttestGenerator.setIsAnswerCorrect(questionNo, 4, answer4.isSelected());\n\t\t}\n\t}",
"public int questionOne() {\n RadioButton answerOne = findViewById ( R.id.q1_a1 );\n\n if (answerOne.isChecked ()) {\n score = 1;\n } else score = 0;\n return score;\n }",
"private void calculateScoreForRadioButtons(boolean question2_option3, boolean question6_option2,\n boolean question7_option1) {\n\n\n // if user picks option 3 in question 2, add 1 to score.\n if (question2_option3) {\n score += 1;\n }\n\n\n\n // if user picks option 1 in question 6, add 1 to score.\n if (question6_option2) {\n score += 1;\n }\n\n\n // if user picks option 1 in question 7, add 1 to score.\n if (question7_option1) {\n score += 1;\n }\n\n // calculate the total value of score\n }",
"private int calculatePoints() {\n //Variable que tiene la vista\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n //Variable de puntos ganados\n int questionPoints = 0;\n\n //Condicion para calcular puntaje\n if(checkbox1.isChecked() && checkbox3.isChecked() && !checkbox2.isChecked()){\n questionPoints = 2;\n }\n else{\n questionPoints = 0;\n }\n\n //Devolver puntaje obtenido\n return questionPoints;\n\n }",
"public boolean isMultiple()\n {\n \tif (questionNumber == 0) {\n \t\treturn false;\n \t}\n int counter = 0;\n List<Answer> answers = test.getQuestions().get(questionNumber-1).getAnswers();\n for (Answer answer : answers) {\n if (answer.getCorrect()) {\n ++counter;\n if (counter > 1) {\n return true;\n }\n }\n }\n return false;\n }",
"public void questionFourRadioButtons(View view){\n // Is the button now checked?\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.question_4_radio_button_1:\n if (checked)\n // Incorrect answer\n break;\n case R.id.question_4_radio_button_2:\n if (checked)\n // Correct answer, add one point\n break;\n case R.id.question_4_radio_button_3:\n if (checked)\n // Incorrect answer\n break;\n case R.id.question_4_radio_button_4:\n if (checked)\n // Incorrect answer\n break;\n }\n }",
"private int calculateResultQ4(boolean radioButton1) {\n int result = 0;\n if (radioButton1) {\n result = 1;\n }\n return result;\n }",
"public void verifyCheckboxesAndInputsAreWorking(){\r\n driver.switchTo().defaultContent();\r\n //clicking random checkboxes\r\n WebElement checkbox1 = driver.findElement(By.xpath(randomCheckboxOneXpathLocator));\r\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", checkbox1);\r\n checkbox1.click();\r\n\r\n WebElement checkbox2 = driver.findElement(By.xpath(randomCheckboxTwoXpathLocator));\r\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", checkbox2);\r\n checkbox2.click();\r\n driver.findElement(By.xpath(randomInputAreaXpathLocator)).sendKeys(\"This is a test message.\");\r\n }",
"public void onCheckBoxClicked(View view) {\n\n switch (view.getId()) {\n\n case R.id.checkbox_answer1:\n answer1Clicked = true;\n break;\n case R.id.checkbox_answer2:\n answer2Clicked = true;\n break;\n case R.id.checkbox_answer3:\n answer3Clicked = true;\n break;\n case R.id.checkbox_answer4:\n answer4Clicked = true;\n break;\n }\n\n }",
"private void getUserIsSoldChoice() {\n int checkedChipId = mBinding.chipGroupIsSold.getCheckedChipId();\n if (checkedChipId == R.id.chip_yes_sold) {\n mChipIsSoldInput = 1;\n } else if (checkedChipId == R.id.chip_no_sold) {\n mChipIsSoldInput = 0;\n } else {\n mChipIsSoldInput = 10;\n }\n }",
"public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }",
"private void setCheckBoxChecked() {\n grupoRespuestasUnoMagnitudes.check(radioChecked[0]);\n grupoRespuestasDosMagnitudes.check(radioChecked[1]);\n grupoRespuestasTresMagnitudes.check(radioChecked[2]);\n grupoRespuestasCuatroMagnitudes.check(radioChecked[3]);\n grupoRespuestasCincoMagnitudes.check(radioChecked[4]);\n grupoRespuestasSeisMagnitudes.check(radioChecked[5]);\n grupoRespuestasSieteMagnitudes.check(radioChecked[6]);\n grupoRespuestasOchoMagnitudes.check(radioChecked[7]);\n grupoRespuestasNueveMagnitudes.check(radioChecked[8]);\n grupoRespuestasDiezMagnitudes.check(radioChecked[9]);\n }",
"private void detectCorrectAnswer() {\n switch (chapterSection) {\n case 5:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"baybayin\")) {\n ansCorrect = true;\n }\n break;\n case 6:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabundukan\")) {\n ansCorrect = true;\n }\n break;\n case 7:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"lungsod\")) {\n ansCorrect = true;\n }\n break;\n case 8:\n if (typedAnswer.toString().toLowerCase().contentEquals(\"kabukiran\")) {\n ansCorrect = true;\n }\n break;\n }\n }",
"boolean isSetMultiple();",
"public void submitAnswers(View view) {\n\n //Initializing the correct answers in RadioGroups\n questionOneAnswerThree = findViewById(R.id.questionOneAnswerThreeButton);\n questionTwoAnswerFour = findViewById(R.id.questionTwoAnswerFourButton);\n questionThreeAnswerOne = findViewById(R.id.questionThreeAnswerOneButton);\n questionFourAnswerTwo = findViewById(R.id.questionFourAnswerTwoButton);\n questionFiveAnswerFour = findViewById(R.id.questionFiveAnswerFourButton);\n questionSixAnswerTwo = findViewById(R.id.questionSixAnswerTwoButton);\n questionSevenAnswerOne = findViewById(R.id.questionSevenAnswerOneButton);\n\n //Calculating score questions 1-7\n if (questionOneAnswerThree.isChecked()) {\n score++;\n }\n\n if (questionTwoAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionThreeAnswerOne.isChecked()) {\n score++;\n }\n\n if (questionFourAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionFiveAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionSixAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionSevenAnswerOne.isChecked()) {\n score++;\n }\n\n // +1 for correct answer\n if (questionEightAnswer.getText().toString().equals(\"1999\")) {\n score++;\n }\n\n //Calculating score if 3 correct answers are checked and 1 incorrect answer is unchecked\n if (questionNineAnswerOne.isChecked() && questionNineAnswerTwo.isChecked() && !questionNineAnswerThree.isChecked() && questionNineAnswerFour.isChecked()) {\n score++;\n }\n\n if (!questionTenAnswerOne.isChecked() && questionTenAnswerTwo.isChecked() && questionTenAnswerThree.isChecked() && questionTenAnswerFour.isChecked()) {\n score++;\n }\n\n //Toast message with score\n Toast.makeText(this, \"Your score: \" + score + \" out of 10 correct!\", Toast.LENGTH_LONG).show();\n\n score = 0;\n }",
"public boolean IsSelected3(int i) {\n\t\treturn theSelected3[i];\n\t}",
"public void setMultChoices() {\r\n Random randomGenerator = new Random();\r\n int howManyAnswer = randomGenerator.nextInt(6) + 1;\r\n for (int i = 0; i < howManyAnswer; i++) {\r\n int multipleAnswer = randomGenerator.nextInt(6);\r\n checkDuplicate(studentAnswer, multipleAnswer);\r\n\r\n }\r\n }",
"public void answerCheck(boolean userChoice) {\n\n if (userChoice && mIndex == 0) {\n\n\n //textDisplay.setText(storyId);\n topButton.setText(R.string.T3_Ans1);\n bottomButton.setText(R.string.T3_Ans2);\n //Toast.makeText(getApplicationContext(),\"mIndex\"+storyId,Toast.LENGTH_SHORT).show();\n mIndex = 2;\n } else if (userChoice && mIndex == 2) {\n mIndex = 5;\n topButton.setVisibility(View.GONE);\n bottomButton.setVisibility(View.GONE);\n //Toast.makeText(getApplicationContext(),\"mIndex\"+mIndex,Toast.LENGTH_SHORT).show();\n } else if (!userChoice && mIndex == 0) {\n mIndex = 1;\n //textDisplay.setText(R.string.T2_Story);\n topButton.setText(R.string.T2_Ans1);\n bottomButton.setText(R.string.T2_Ans2);\n //Toast.makeText(getApplicationContext(), \"mIndex\" + mIndex, Toast.LENGTH_SHORT).show();\n } else if (userChoice && mIndex == 1) {\n //textDisplay.setText(R.string.T6_End);\n mIndex = 5;\n topButton.setVisibility(View.GONE);\n bottomButton.setVisibility(View.GONE);\n //Toast.makeText(getApplicationContext(), \"mIndex\" + mIndex, Toast.LENGTH_SHORT).show();\n } else if (!userChoice && mIndex == 1) {\n mIndex = 3;\n topButton.setVisibility(View.GONE);\n bottomButton.setVisibility(View.GONE);\n } else if (!userChoice && mIndex == 2) {\n mIndex = 4;\n topButton.setVisibility(View.GONE);\n bottomButton.setVisibility(View.GONE);\n\n }\n\n }",
"boolean getIsChecked();",
"public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }",
"public boolean checarRespuesta(Opcion[] opciones) {\n boolean correcta = false;\n\n for (int i = 0; i < radios.size(); i++) {\n if (radios.get(i).isSelected() && opciones[i].isCorrecta()) {\n System.out.println(\"Ya le atinaste\");\n correcta = true;\n break;\n }\n }\n\n return correcta;\n }",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"private boolean verifyTwoFormRadios( int state1, int state2, int state3, int state4, int state5, int state6 ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n XPropertySet[] radios = new XPropertySet[6];\n radios[0] = getRadioModel( \"group 1\", \"a\", m_primaryForm );\n radios[1] = getRadioModel( \"group 1\", \"b\", m_primaryForm );\n radios[2] = getRadioModel( \"group 1\", \"c\", m_primaryForm );\n radios[3] = getRadioModel( \"group 2\", \"a\", m_secondaryForm );\n radios[4] = getRadioModel( \"group 2\", \"b\", m_secondaryForm );\n radios[5] = getRadioModel( \"group 2\", \"c\", m_secondaryForm );\n\n return verifySixPack( radios, \"radio buttons on different forms do not work properly!\",\n state1, state2, state3, state4, state5, state6 );\n }",
"private void calculateScore() {\n EditText editText1 = (EditText) findViewById(R.id.edit_text1);\n String answer1 = editText1.getText().toString().toLowerCase().trim();\n if (answer1.equals( getResources().getText(R.string.answer1))) {\n score += 3;\n } else {\n //show false\n }\n\n RadioGroup radioGroup2 = (RadioGroup) findViewById(R.id.radio_group2);\n int checkedRadioButtonId2 = radioGroup2.getCheckedRadioButtonId();\n if (checkedRadioButtonId2 == R.id.rb21) {\n score += 1;\n } else {\n //show false\n }\n\n CheckBox checkBox3b = (CheckBox) findViewById(R.id.cb32);\n CheckBox checkBox3d = (CheckBox) findViewById(R.id.cb34);\n if (checkBox3b.isChecked() && checkBox3d.isChecked()) {\n score += 2;\n } else {\n //show false\n }\n\n RadioGroup radioGroup4 = (RadioGroup) findViewById(R.id.radio_group4);\n int checkedRadioButtonId4 = radioGroup4.getCheckedRadioButtonId();\n if (checkedRadioButtonId4 == R.id.rb41) {\n score += 1;\n } else {\n //show false\n }\n }",
"boolean isChecked();",
"boolean isChecked();",
"public static boolean radioIsChecked() throws Exception { \n\t\tWebElement[] radioCheck= Elements.selectRadioButtonElement();\n\t\tboolean\tradioBtn=false; ;\n\t\tfor(int i=0; i<4;i++) {\n\t\t\ttry {\n\t\t\t\tif(radioCheck[i].isSelected()==true) {\n\t\t\t\t\tradioBtn=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\n\t\treturn radioBtn;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"F://Web Drivers/chromedriver.exe\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.get(\"http://qaclickacademy.com/practice.php\");\n\t\t\n\t\t\n\t\tdriver.findElement(By.id(\"checkBoxOption1\")).click();\n\t\tSystem.out.println(driver.findElement(By.id(\"checkBoxOption1\")).isSelected());\n\t\tAssert.assertTrue(driver.findElement(By.id(\"checkBoxOption1\")).isSelected());\n\t\t\n//\t\tdriver.findElement(By.id(\"checkBoxOption1\")).click();\n//\t\tSystem.out.println(driver.findElement(By.id(\"checkBoxOption1\")));\n//\t\tAssert.assertFalse(driver.findElement(By.id(\"checkBoxOption1\")).isSelected());\n//\t\t\n\n\t\t\n\t\t//How to get the Count of number of check boxes present in the page\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(driver.findElements(By.xpath(\"//input[@type='checkbox']\")).size());\n\t\t\n\t\t\n\t\t\n\t}",
"public void checkOrUnCheckAllCheckBox(boolean isCheck) {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // verify \"CheckAll\" check box is checked when all check box are check\n //// check all check box in ToDo page\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBox(eleToDoCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has not complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n\n if (!checkEmptyToDoCompleteListRow) {\n result = checkAllCheckBox(eleToDoCompleteCheckboxRow, isCheck);\n if (result == false) {\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: can not check on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: can not uncheck on all check box has complete status in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return;\n }\n }\n if (result) {\n NXGReports.addStep(\"Check all check box in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"Uncheck all check box in ToDo page\", LogAs.PASSED, null);\n }\n }",
"@Override\n public void onClick(View v) {\n\n if(radio_g.getCheckedRadioButtonId()==-1)\n {\n Toast.makeText(getApplicationContext(), \"Please select one choice\", Toast.LENGTH_SHORT).show();\n return;\n }\n RadioButton uans = (RadioButton) findViewById(radio_g.getCheckedRadioButtonId());\n String ansText = uans.getText().toString();\n// Toast.makeText(getApplicationContext(), ansText, Toast.LENGTH_SHORT).show();\n if(ansText.equals(answers[flag])) {\n correct++;\n }\n else {\n wrong++;\n }\n\n flag++;\n if(flag<questions.length)\n {\n textView.setText(questions[flag]);\n rb1.setText(opt[flag*4]);\n rb2.setText(opt[flag*4 +1]);\n rb3.setText(opt[flag*4 +2]);\n rb4.setText(opt[flag*4 +3]);\n }\n else\n {\n marks=correct;\n Intent in = new Intent(getApplicationContext(),Cpp_Result.class);\n startActivity(in);\n }\n radio_g.clearCheck();\n }",
"boolean hasCorrectAnswer();",
"public void verifyAllCheckBoxIsCheckOrUnCheck(boolean isCheck) {\n try {\n boolean result = true;\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n if (!checkEmptyToDoListRow) {\n result = checkAllCheckBoxIsCheckOrUnCheck(eleToDoCheckboxRow, isCheck);\n }\n if (!checkEmptyToDoCompleteListRow) {\n if (result)\n checkAllCheckBoxIsCheckOrUnCheck(eleToDoCompleteCheckboxRow, isCheck);\n }\n Assert.assertTrue(result, \"All checkbox do not check/uncheck\");\n if (isCheck) {\n NXGReports.addStep(\"All check box are check in ToDo page\", LogAs.PASSED, null);\n } else {\n NXGReports.addStep(\"All check box are uncheck in ToDo page\", LogAs.PASSED, null);\n }\n\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n if (isCheck) {\n NXGReports.addStep(\"TestScript Failed: All check box are not check in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n } else {\n NXGReports.addStep(\"TestScript Failed: All check box are not uncheck in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }\n }",
"public boolean checarRespuesta(Opcion[] opciones) {\n boolean correcta = false;\n for (int i = 0; i < radios.size(); i++) {\n if (radios.get(i).isSelected() && opciones[i].isCorrecta()) {\n System.out.println(\"Respuesta correcta\");\n correcta = true;\n break;\n }\n }\n return correcta;\n }",
"private CheckBox getCheckbox_recommended() {\n\t\treturn checkbox_recommended;\n\t}",
"public boolean isCompleted(int exercise) {\n String reps;\n boolean complete = true;\n if(exercise == 0)\n reps = \"3\";\n else if(exercise == 4 || exercise == 7)\n reps = \"20\";\n else if(exercise == 3 || exercise == 6)\n reps = \"15\";\n else\n reps = \"12\";\n\n for(int i = 0; i < bsButtons[exercise].length; i++) {\n if(bsButtons[exercise][i].getText().toString().equals(reps)) {\n complete = true;\n }\n else {\n complete = false;\n break;\n }\n }\n return complete;\n }",
"public boolean isAnswered() {\n\t\tfor (boolean b : this.checked) {\n\t\t\tif (b)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Click(R.id.bt_answer3)\n void clickAnswer3() {\n selectedAnswer = questionList.get(questionProgress - 1).getAnswers().get(2);\n showResult();\n }",
"public void submit (View view) {\n score = 0;\n optionOne = findViewById(R.id.option_one);\n int idOne = optionOne.getCheckedRadioButtonId();\n //to check if the radio group was not checked so as to alert the user\n if (idOne == -1) {\n TextView targetView = findViewById(R.id.question_one);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_one_err, Toast.LENGTH_SHORT).show();\n return;\n }\n // And if it is checked, score is updated\n if (idOne == R.id.option_one_d) {\n score += 1;\n }\n\n optionTwo = findViewById(R.id.option_two);\n int idTwo = optionTwo.getCheckedRadioButtonId();\n if (idTwo == -1) {\n TextView targetView = findViewById(R.id.question_two);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_two_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (idTwo == R.id.option_two_b) {\n score += 1;\n }\n\n optionThree = findViewById(R.id.option_three);\n int idThree = optionThree.getCheckedRadioButtonId();\n if (idThree == -1) {\n TextView targetView = findViewById(R.id.question_three);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_three_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (idThree == R.id.option_three_c) {\n score += 1;\n }\n\n questionFourAns = findViewById(R.id.question_four_ans);\n //To check if the edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(questionFourAns.getText().toString().trim())) {\n TextView targetView = findViewById(R.id.question_four);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_four_err, Toast.LENGTH_SHORT).show();\n return;\n }\n //Else, score is updated\n if (questionFourAns.getText().toString().equalsIgnoreCase(getString(R.string.question_four_correct_ans))) {\n score += 1;\n }\n\n questionFiveAns = findViewById(R.id.question_five_ans);\n if (TextUtils.isEmpty(questionFiveAns.getText().toString().trim())) {\n TextView targetView = findViewById(R.id.question_five);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_five_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (questionFiveAns.getText().toString().equalsIgnoreCase(getString(R.string.question_five_correct_ans))) {\n score += 1;\n }\n\n optionSixA = findViewById(R.id.option_six_a);\n optionSixB = findViewById(R.id.option_six_b);\n optionSixC = findViewById(R.id.option_six_c);\n optionSixD = findViewById(R.id.option_six_d);\n optionSixE = findViewById(R.id.option_six_e);\n boolean sixA = optionSixA.isChecked();\n boolean sixB = optionSixB.isChecked();\n boolean sixC = optionSixC.isChecked();\n boolean sixD = optionSixD.isChecked();\n boolean sixE = optionSixE.isChecked();\n //To check if none of the checkboxes is checked so as to alert the user\n if (!sixA && !sixB && !sixC && !sixD && !sixE) {\n TextView targetView = findViewById(R.id.question_six);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_six_err, Toast.LENGTH_SHORT).show();\n return;\n }\n // Else update score\n if (!sixA && sixB && !sixC && sixD && !sixE) {\n score += 1;\n }\n\n optionSevenA = findViewById(R.id.option_seven_a);\n optionSevenB = findViewById(R.id.option_seven_b);\n optionSevenC = findViewById(R.id.option_seven_c);\n optionSevenD = findViewById(R.id.option_seven_d);\n optionSevenE = findViewById(R.id.option_seven_e);\n boolean sevenA = optionSevenA.isChecked();\n boolean sevenB = optionSevenB.isChecked();\n boolean sevenC = optionSevenC.isChecked();\n boolean sevenD = optionSevenD.isChecked();\n boolean sevenE = optionSevenE.isChecked();\n if (!sevenA && !sevenB && !sevenC && !sevenD && !sevenE) {\n TextView targetView = findViewById(R.id.question_seven);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_seven_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (!sevenA && sevenB && !sevenC && !sevenD && sevenE) {\n score += 1;\n }\n\n optionEightA = findViewById(R.id.option_eight_a);\n optionEightB = findViewById(R.id.option_eight_b);\n optionEightC = findViewById(R.id.option_eight_c);\n optionEightD = findViewById(R.id.option_eight_d);\n optionEightE = findViewById(R.id.option_eight_e);\n boolean eightA = optionEightA.isChecked();\n boolean eightB = optionEightB.isChecked();\n boolean eightC = optionEightC.isChecked();\n boolean eightD = optionEightD.isChecked();\n boolean eightE = optionEightE.isChecked();\n if (!eightA && !eightB && !eightC && !eightD && !eightE) {\n TextView targetView = findViewById(R.id.question_eight);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_eight_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (!eightA && !eightB && !eightC && eightD && !eightE) {\n score += 1;\n }\n\n optionNineA = findViewById(R.id.option_nine_a);\n optionNineB = findViewById(R.id.option_nine_b);\n optionNineC = findViewById(R.id.option_nine_c);\n optionNineD = findViewById(R.id.option_nine_d);\n optionNineE = findViewById(R.id.option_nine_e);\n boolean nineA = optionNineA.isChecked();\n boolean nineB = optionNineB.isChecked();\n boolean nineC = optionNineC.isChecked();\n boolean nineD = optionNineD.isChecked();\n boolean nineE = optionNineE.isChecked();\n if (!nineA && !nineB && !nineE && !nineC && !nineD) {\n TextView targetView = findViewById(R.id.question_nine);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_nine_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (nineA && nineB && nineE && !nineC && !nineD) {\n score += 1;\n }\n\n optionTenA = findViewById(R.id.option_ten_a);\n optionTenB = findViewById(R.id.option_ten_b);\n optionTenC = findViewById(R.id.option_ten_c);\n optionTenD = findViewById(R.id.option_ten_d);\n optionTenE = findViewById(R.id.option_ten_e);\n boolean tenA = optionTenA.isChecked();\n boolean tenB = optionTenB.isChecked();\n boolean tenC = optionTenC.isChecked();\n boolean tenD = optionTenD.isChecked();\n boolean tenE = optionTenE.isChecked();\n if (!tenA && !tenB && !tenC && !tenD && !tenE) {\n TextView targetView = findViewById(R.id.question_ten);\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(this, R.string.quest_ten_err, Toast.LENGTH_SHORT).show();\n return;\n }\n if (tenA && !tenB && !tenC && !tenD && !tenE) {\n score += 1;\n }\n\n // Displays a toast for the score\n Toast.makeText(MainActivity.this, getString(R.string.result, score), Toast.LENGTH_LONG).show();\n // Displays a toast message based on the user's performance\n if (score > 7) {\n Toast.makeText(MainActivity.this, getString(R.string.fabulous), Toast.LENGTH_SHORT).show();\n } else if (score >= 5 && score <= 7) {\n Toast.makeText(MainActivity.this, getString(R.string.good_job), Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(MainActivity.this, getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n }\n\n // Sets the switch view visible and ensures it's off\n mySwitch = findViewById(R.id.switch1);\n mySwitch.setChecked(false);\n mySwitch.setVisibility(View.VISIBLE);\n mySwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\n /** This method allows the user to receive a mail of the result if the switch is on\n * It also ensures that the name and email fields are filled and then sends an intent\n * to a mail app with a summary of the result\n */\n @Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {\n // When the switch is on\n if (isChecked) {\n name = findViewById(R.id.name_editText);\n String nameOfUser = name.getText().toString();\n email = findViewById(R.id.email_editText);\n String[] address = {email.getText().toString()};\n String msg = returnMessage();\n //To check if the name edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(name.getText().toString().trim())) {\n TextView targetView = name;\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(MainActivity.this, R.string.name_err, Toast.LENGTH_SHORT).show();\n mySwitch.setChecked(false);\n return;\n }\n //To check if the email edit text field is empty so as to alert the user\n if (TextUtils.isEmpty(email.getText().toString().trim())) {\n TextView targetView = name;\n targetView.getParent().requestChildFocus(targetView, targetView);\n Toast.makeText(MainActivity.this, R.string.email_err, Toast.LENGTH_SHORT).show();\n mySwitch.setChecked(false);\n return;\n }\n // Sends an intent to a mail app with the necessary details\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\"));\n intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.result_email_subject, nameOfUser));\n intent.putExtra(Intent.EXTRA_EMAIL, address);\n intent.putExtra(Intent.EXTRA_TEXT, msg);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n }\n });\n }",
"public void submitAnswers(View view) {\n boolean oneAnswer = oneCorrectAnswer1985.isChecked();\n boolean twoAnswer = twoCorrectAnswerWalterPayton.isChecked();\n boolean threeAnswer = threeCorrectAnswerMike.isChecked();\n boolean fourAnswer = fourCorrectAnswerJay.isChecked();\n String fiveAnswer = fiveCorrectAnswerDecatur.getText().toString().trim();\n boolean sixAnswer = !sixWrongAnswerGeorge.isChecked() && !sixWrongAnswerLovie.isChecked() && sixCorrectAnswerJohn.isChecked() && sixCorrectAnswerMarc.isChecked();\n\n\n score = calculateTotal(oneAnswer, twoAnswer, threeAnswer, fourAnswer, fiveAnswer, sixAnswer);\n String totalMessage = submitAnswersScore(score);\n\n Context context = getApplicationContext();\n CharSequence text = totalMessage;\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }",
"private void setRadioButtonState() {\n if (selectedAnswerOne.equals(\"ONE\")) {\n questionOneAnswerOne.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"TWO\")) {\n questionOneAnswerTwo.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"THREE\")) {\n questionOneAnswerThree.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"FOUR\")) {\n questionOneAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerTwo.equals(\"ONE\")) {\n questionTwoAnswerOne.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"TWO\")) {\n questionTwoAnswerTwo.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"THREE\")) {\n questionTwoAnswerThree.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"FOUR\")) {\n questionTwoAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerThree.equals(\"ONE\")) {\n questionThreeAnswerOne.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"TWO\")) {\n questionThreeAnswerTwo.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"THREE\")) {\n questionThreeAnswerThree.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"FOUR\")) {\n questionThreeAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerFour.equals(\"ONE\")) {\n questionFourAnswerOne.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"TWO\")) {\n questionFourAnswerTwo.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"THREE\")) {\n questionFourAnswerThree.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"FOUR\")) {\n questionFourAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerFive.equals(\"ONE\")) {\n questionFiveAnswerOne.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"TWO\")) {\n questionFiveAnswerTwo.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"THREE\")) {\n questionFiveAnswerThree.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"FOUR\")) {\n questionFiveAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerSix.equals(\"ONE\")) {\n questionSixAnswerOne.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"TWO\")) {\n questionSixAnswerTwo.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"THREE\")) {\n questionSixAnswerThree.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"FOUR\")) {\n questionSixAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerSeven.equals(\"ONE\")) {\n questionSevenAnswerOne.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"TWO\")) {\n questionSevenAnswerTwo.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"THREE\")) {\n questionSevenAnswerThree.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"FOUR\")) {\n questionSevenAnswerFour.setChecked(true);\n }\n }",
"Boolean getPartiallyCorrect();",
"private boolean checkCheckBoxAnswer(int resourceId, boolean correctAnswer){\n CheckBox answerOption = findViewById(resourceId);\n return answerOption.isChecked() == correctAnswer;\n }",
"private void updateQuestion(){\n mchoice1.setChecked(false);\n mchoice2.setChecked(false);\n mchoice3.setChecked(false);\n mchoice4.setChecked(false);\n\n if (mQuestonNumber < mQuizLibrary.getLength()){\n //menset setiap textview dan radiobutton untuk diubah jadi pertanyaan\n sQuestion.setText(mQuizLibrary.getQuestion(mQuestonNumber));\n //mengatur opsi sesuai pada optional A\n mchoice1.setText(mQuizLibrary.getChoice(mQuestonNumber, 1)); //Pilihan Ganda ke 1\n //mengatur opsi sesuai pada optional B\n mchoice2.setText(mQuizLibrary.getChoice(mQuestonNumber, 2)); //Pilihan Ganda ke 2\n //mengatur opsi sesuai pada optional C\n mchoice3.setText(mQuizLibrary.getChoice(mQuestonNumber, 3)); //Pilihan Ganda ke 3\n //mengatur opsi sesuai pada optional D\n mchoice4.setText(mQuizLibrary.getChoice(mQuestonNumber, 4)); //Pilihan Ganda ke 4\n\n manswer = mQuizLibrary.getCorrect(mQuestonNumber);\n //untuk mengkoreksi jawaban yang ada di class QuizBank sesuai nomor urut\n mQuestonNumber++; //update pertanyaan\n }else{\n Toast.makeText(Quiz.this, \"ini pertanyaan terakhir\", Toast.LENGTH_LONG).show();\n Intent i = new Intent (Quiz.this, HighestScore.class);\n i.putExtra(\"score\", mScore); //UNTUK MENGIRIM NILAI KE activity melalui intent\n startActivity(i);\n }\n }"
] |
[
"0.7745535",
"0.7615688",
"0.7369624",
"0.723597",
"0.7229003",
"0.7156864",
"0.7105936",
"0.7087547",
"0.70468444",
"0.70299536",
"0.7006322",
"0.6981928",
"0.68958414",
"0.6752096",
"0.6689938",
"0.65819097",
"0.65721107",
"0.65717316",
"0.65591943",
"0.6467309",
"0.6417194",
"0.6416756",
"0.63449436",
"0.6334821",
"0.6319678",
"0.63104576",
"0.6303683",
"0.6270943",
"0.6247025",
"0.6238267",
"0.6237209",
"0.6181918",
"0.6159807",
"0.61583245",
"0.6151411",
"0.6136316",
"0.6134206",
"0.61338854",
"0.6115784",
"0.6087867",
"0.6079647",
"0.60423154",
"0.6041413",
"0.60373086",
"0.60316867",
"0.60031575",
"0.5996624",
"0.59638685",
"0.5959643",
"0.59545875",
"0.5934187",
"0.59322447",
"0.5923751",
"0.5915246",
"0.5899377",
"0.58936125",
"0.5881732",
"0.5874821",
"0.5864746",
"0.5854094",
"0.58466166",
"0.57913685",
"0.5789457",
"0.5784968",
"0.5769965",
"0.57618654",
"0.5750133",
"0.57307434",
"0.57241654",
"0.571164",
"0.57023984",
"0.5696619",
"0.56864816",
"0.56654394",
"0.56653523",
"0.565923",
"0.5649013",
"0.5649013",
"0.5649013",
"0.56476307",
"0.5642859",
"0.56371474",
"0.56371474",
"0.5629716",
"0.5624849",
"0.5618585",
"0.56028605",
"0.55979073",
"0.55895835",
"0.55884844",
"0.5579071",
"0.5578553",
"0.5567771",
"0.5566893",
"0.5566186",
"0.55626607",
"0.55626494",
"0.55601764",
"0.55512625",
"0.5536463"
] |
0.75681674
|
2
|
/ 1 / \ 2 2
|
public static void main(String[] args) {
BinaryTree btree1 = new BinaryTree(1);
btree1.left = new BinaryTree(2);
btree1.right = new BinaryTree(2);
System.out.println(isSymmetric(btree1));
/*
* 1
/ \
2 2
\
3
*/
BinaryTree btree2 = new BinaryTree(1);
btree2.left = new BinaryTree(2);
btree2.right = new BinaryTree(2);
btree2.left.right = new BinaryTree(3);
System.out.println(isSymmetric(btree2));
/*
* 1
/ \
2 2
/ \ / \
4 3 3 4
*/
BinaryTree btree3 = new BinaryTree(1);
btree3.left = new BinaryTree(2);
btree3.right = new BinaryTree(2);
btree3.left.left = new BinaryTree(4);
btree3.left.right = new BinaryTree(3);
btree3.right.left = new BinaryTree(3);
btree3.right.right = new BinaryTree(4);
System.out.println(isSymmetric(btree3));
/*
* 1
/ \
2 2
/ \ / \
3 4 3 4
*/
BinaryTree btree4 = new BinaryTree(1);
btree4.left = new BinaryTree(2);
btree4.right = new BinaryTree(2);
btree4.left.left = new BinaryTree(3);
btree4.left.right = new BinaryTree(4);
btree4.right.left = new BinaryTree(3);
btree4.right.right = new BinaryTree(4);
System.out.println(isSymmetric(btree4));
/*
* 1
/ \
2 2
/ \
3 3
*/
BinaryTree btree5 = new BinaryTree(1);
btree5.left = new BinaryTree(2);
btree5.right = new BinaryTree(2);
btree5.left.left = new BinaryTree(3);
btree5.right.right = new BinaryTree(3);
System.out.println(isSymmetric(btree5));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private int rightChild(int i){return 2*i+2;}",
"private int parent(int i){return (i-1)/2;}",
"private int leftChild(int i){return 2*i+1;}",
"public void divide() {\n\t\t\n\t}",
"private int first_leaf() { return n/2; }",
"LengthScalarDivide createLengthScalarDivide();",
"public static BinaryExpression divide(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public static int Main()\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint i;\n\t\tint j;\n\t\tx = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\ty = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i = 1;x / i > 0;i = i * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\tfor (j = 1;y / j > 0;j = j * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\ti = i / 2;\n\t\tj = j / 2; //i,j????2?????\n\t\tif (i > j)\n\t\t{\n\t\t\tx = x * j / i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ty = y * i / j;\n\t\t}\n\t\twhile (x != y)\n\t\t{\n\t\t\tx = x / 2;\n\t\t\ty = y / 2;\n\t\t}\n\t\tSystem.out.print(x);\n\n\n\n\n\n\n\t}",
"public LongNum div2(LongNum divided){\n LongNum res = divided.copy();\n for(int i = res.size()-1;i>=0;i--){\n if(i!=0)res.set(i-1,res.get(i-1)+(res.get(i)%2)*base);\n res.set(i , Math.floorDiv(res.get(i),2));\n }\n return res;\n }",
"BaseNumber divide(BaseNumber operand);",
"@Override\n\tpublic float dividir(float op1, float op2) {\n\t\treturn op1 / op2;\n\t}",
"public static void main(String[] args) {\n\n\n\n System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) - (1 / 7) + (1 / 9) - (1 / 11)));\n\n System.out.println(4 * (1.0 - (1/3) + (1/5) - (1/7)\n + (1 / 9) - (1/11) + (1/13)));\n }",
"@Override\r\n\tpublic void div(int x, int y) {\n\t\t\r\n\t}",
"protected int parent(int i) { return (i - 1) / 2; }",
"@Override\npublic void div(int a, int b) {\n\t\n}",
"static int incBy1AndMul(int x, int y)\r\n\t{\r\n\t\treturn Math.multiplyExact((x+1), y);\r\n\t}",
"private int ls(final int x) {\n assert(! leaf(x));\n return 2*x+1;\n }",
"static String division (String s1, String s2) {\r\n if (s2==null || s2.length()==0) return s1;\r\n return product (s1, invert(s2));\r\n }",
"public static void main(String args[]) {\n\tSystem.out.println(\"1 2 + 4 * 4 2 - + = \" + execute(\"1 2 + 4 * 4 2 - +\"));\r\n\t\r\n\t// (1 + 4) * (3 + 7) / 5 == 10\r\n\t/*System.out.println(\"1 4 + 3 7 + * 5 / = \" \r\n\t\t\t + execute(\"1 4 + 3 7 + * 5 /\"));\r\n\t\r\n\t// 10 + 2 == 12\r\n\tSystem.out.println(\"10 2 + = \" \r\n\t\t\t + execute(\"10 2 +\"));\r\n\t\r\n\t// 10 / 2 == 5\r\n\tSystem.out.println(\"10 2 / = \"\r\n\t\t\t + execute(\"10 2 /\"));*/\r\n }",
"private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }",
"public void testORDINARY_DIV2() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 11, \"pale\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}",
"private int rs(final int x) {\n assert(! leaf(x));\n return Math.min(2*x+2, n);\n }",
"public void division() {\n\t\tx=1;\n\t\ty=0;\n\t\tz=x/y;\n\t\t\t\t\n\t}",
"public static void main(String[] args) {\n System.out.println(32>>2);// 0010 0000>>2= 0000 1000=8\n\n System.out.println(32/4);//32除以2的2次幂\n\n System.out.println(8<<2);// 0000 1000<<2=0010 0000=32\n System.out.println(8*4);//8 乘以2的2次幂\n\n System.out.println(2<<2);//2*2(2)=8\n\n System.out.println(-32>>>2);//32除以2的2次幂\n\n\n }",
"public StatementParse mulDivTransform(StatementParse node) {\n // This function is called on _every_ multiply and divide node.\n StatementParse node1 = node.getChildren().get(0);\n StatementParse node2 = node.getChildren().get(1);\n if (!(node1 instanceof IntegerParse) || !(node2 instanceof IntegerParse)){\n return node;\n }\n int value1 = ((IntegerParse) node1).getValue();\n int value2 = ((IntegerParse) node2).getValue();\n int result;\n if (node.getName().equals(\"*\")){\n result = value1 * value2;\n } else{ // div node\n if (value2 == 0) return node;\n result = value1 / value2;\n }\n\n IntegerParse newNode = new IntegerParse(result);\n if (node.isNegative()) newNode.setNegative(true);\n return newNode;\n }",
"public static BinaryExpression divide(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"static int parent(int i)\n {\n return (i-1)/2;\n }",
"private boolean slash() {\r\n return MARK(OPERATOR) && CHAR('/') && gap();\r\n }",
"@Test\n\t\tpublic void applyRecusivelyHyp() {\n\t\t\tassertSuccess(\" ;H; ;S; s⊆ℤ ;; r∈s ↔ s |- ⊥\",\n\t\t\t\t\trm(\"\", ri(\"\", ri(\"\", rm(\"2.1\", empty)))));\n\t\t}",
"public static BinaryExpression divideAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }",
"public static void main001(String[] args) {\n\t\tint numberOne\t= 20;\n\t\tint numberTwo\t= 3;\n\t\tint result;\n\n\t\t// +\n\t\tresult\t= numberOne + numberTwo;\n\t\tSystem.out.println(numberOne + \" + \" + numberTwo + \" = \" + result);\n\n\t\t// -\n\t\tresult\t= numberOne - numberTwo;\n\t\tSystem.out.println(numberOne + \" - \" + numberTwo + \" = \" + result);\n\n\t\t// *\n\t\tresult\t= numberOne * numberTwo;\n\t\tSystem.out.println(numberOne + \" * \" + numberTwo + \" = \" + result);\n\n\t\t// /\n\t\t// 20 / 3 = 6 du 2\n\t\tresult\t= numberOne / numberTwo;\n\t\tSystem.out.println(numberOne + \" / \" + numberTwo + \" = \" + result);\n\n\n\t\t// %\n\t\tresult\t= numberOne % numberTwo;\n\t\tSystem.out.println(numberOne + \" % \" + numberTwo + \" = \" + result);\n\t}",
"public abstract String division();",
"private int rightchild(int i) {\n return (2 * i) + 2;\n }",
"int div(int num1, int num2) {\n\t\treturn num1/num2;\n\t}",
"protected int right(int i) { return 2 * i + 2; }",
"public static int division(int x, int y) {\n\t\treturn x/y;\n\t}",
"static void pyramid(){\n\t}",
"static int valDiv2 (){\n return val/2;\n }",
"public int division(int a, int b) {\n return a / b;\n }",
"public static void main(String[] args) {\nint a=10;\nSystem.out.println(a);\na+=2;\nSystem.out.println(a);\na-=2;\nSystem.out.println(a);\na*=2;\nSystem.out.println(a);\na/=2;\nSystem.out.println(a);\na%=2;\nSystem.out.println(a);\n\t}",
"public int reversePairs2_2(int[] nums) {\n int res = 0;\n Node root = null;\n for (int i = 0; i < nums.length; i++) {\n int num = nums[i];\n if (num < Integer.MIN_VALUE / 2) {\n res += i;\n } else {\n if (root == null) {\n root = new Node(num);\n } else {\n res += root.count((long)num * 2);\n root.add(num);\n }\n }\n }\n return res;\n }",
"public int division(int x,int y){\n System.out.println(\"division methods\");\n int d=x/y;\n return d;\n\n }",
"private void mul() {\n\n\t}",
"private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }",
"public static void main(String[] args) {\n\t\tint num = 10 + 20 -5;\n\t\t\n\t\tnum = 10 + 20/5; // 14\n\t\t\n\t\t// division goes first!\n\t\tnum = (10+20) /5 ; // 6\n\t\t\n\t\tint i = 6+3*10/6;\n\t\t// i = 6+5\n\n\t}",
"int main()\n{\n int n,p=0,n2=2;\n cin>>n;\n if(n>0)\n cout<<p<<\" \";\n for(int i=1;i<n;i++)\n {\n p=p+n2;\n cout<<p<<\" \";\n if(i%2==1)\n \tn2=n2+4;\n }\n \n}",
"public static void main(String[] args) {\n\t\tSystem.out.println(divide(10, 5));\n\n\t\tSystem.out.println(divide(10, 0));\n\t}",
"public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}",
"protected int left(int i ) { return 2 * i + 1; }",
"public void testSUBORDINARY_DIV2() throws Exception {\n\t\tObject retval = execLexer(\"SUBORDINARY_DIV\", 29, \"pale\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"SUBORDINARY_DIV\", expecting, actual);\n\t}",
"private static int rightChild(int i) {\n\t\treturn 2*i + 2;\n\t}",
"private int right(int parent) {\n\t\treturn parent*2+2;\n\t}",
"public int division(){\r\n return Math.round(x/y);\r\n }",
"private static int rightChild(int i) {\n\t\treturn 2 * i + 2;\n\t}",
"public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}",
"public void testORDINARY_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 10, \"fess\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}",
"public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}",
"public static void main(String[] args) { \n\n int x = 3;\n int y = 2;\n\n x += y; // x = x + y => 5;\n System.out.println(\"X = :\" + x);\n\n x -= y; // x = x - y => 3;\n System.out.println(\"X = :\" + x);\n\n x *= y; // x = x * y => 6;\n System.out.println(\"X = :\" + x);\n\n x /= y; // x = x / y => 3;\n System.out.println(\"X = :\" + x);\n\n x %= y; // x = x % y => 1;\n System.out.println(\"X = :\" + x);\n }",
"private static int getDividingIndex(String fullPath) {\n int baseEnd = fullPath.lastIndexOf(\"/\");\n if (fullPath.substring(0, baseEnd).endsWith(COMMAND_PATH)) {\n baseEnd = fullPath.substring(0, baseEnd).lastIndexOf(\"/\");\n }\n return baseEnd;\n }",
"private int rightChild(int index) {\n return index * 2 + 1;\n }",
"@Override\r\n\tpublic int umul(int a,int b) {\n\t\treturn a/b;\r\n\t}",
"static int recursiva2(int n)\n\t\t{\n\t\t\tif (n==0)\n\t\t\treturn 10; \n\t\t\tif (n==1)\n\t\t\treturn 20;\n\t\t\tif (n==2)\n\t\t\treturn 30;\n\t\t\t\n\t\t\treturn recursiva2(n-1) + recursiva2 (n-2) * recursiva2 (n-3); \n\t\t}",
"public static void main (String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n if(n%2==1)\n {\n n=n/2;\n n++;\n }\n else\n {\n n=n/2;\n }\n for(int i=1;i<=n;i++)\n {\n for(int k=1;k<=i-1;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<=((2*n-1)-2*(i-1));j++)\n {\n if(j==1||j==((2*n-1)-2*(i-1)))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n for(int i=2;i<=n;i++)\n {\n for(int k=1;k<=n-i;k++)\n {\n System.out.print(\" \");\n }\n for(int j=1;j<i*2;j++)\n {\n if(j==1||j==(i*2-1))\n System.out.print(\"*\");\n else\n System.out.print(\" \");\n }\n System.out.println();\n }\n\t}",
"private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }",
"@Override\n\tpublic double divide(double in1, double in2) {\n\t\treturn 0;\n\t}",
"public void testORDINARY_DIV4() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 13, \"cross\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}",
"public static void main(String[] args) {\n\t\tint a = 2;\n\t\tint b = 10;\n\t\tint c = a-(a/b)*b;\n\t\tSystem.out.println(c);\n\t\tint result = a;\n\t\twhile(result-b>=0){\n\t\t\tresult-=b;\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"result:\"+result);\n\t}",
"public static void main(String[] args) {\n\t\tint length = 9;\n\t\tint counter = 1;\n\t\t\tfor ( int x = (length+1)/2; x<=length;x++){\n\t\t\t\tfor (int j = x-counter; j>=0; j--){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\tfor (int i =1;i<=counter;i++){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t\tcounter+=2;\n\t\t\t}\n\t\t\tcounter = length-2;\n\t\t\t\n\t\t\t// length = 9, counter is 7 , j = 1, i = 7, x=8\n\t\t\tfor ( int x = (length-1); x>=(length+1)/2; x--){\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tfor (int j = 1; j<=x-counter; j++){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tfor (int i =counter;i>=1;i--){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\tcounter-=2;\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}",
"public T div(T first, T second);",
"public static int countRec2(int x , int y)\r\n\t{\n\t\tif (y == 0)\r\n\t\t\treturn x;\r\n\t\telse{\r\n\t\t\tif (y > 0) \r\n\t\t\t\treturn (countRec2(x, y - 1) + 1);\r\n\t\t\telse\r\n\t\t\t\treturn (countRec2(x, y + 1) - 1);\r\n\t\t}\r\n\t}",
"private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}",
"AngleScalarDivide createAngleScalarDivide();",
"public static void main(String[] args) {\n\t\t\n\t\tint a = (20-3)*(3-9)/3;\n\t\tint b = 20-3*3-9/3;\n\t\t\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(b);\n\n\t}",
"public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}",
"public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"public void testSUBORDINARY_DIV1() throws Exception {\n\t\tObject retval = execLexer(\"SUBORDINARY_DIV\", 28, \"pall\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"SUBORDINARY_DIV\", expecting, actual);\n\t}",
"public static void main(String[] args) {\nint i,space,rows,k=0;\n Scanner sc=new Scanner(System.in);\nSystem.out.print(\"Enter number of rows\");\nrows=sc.nextInt();\nfor(i=1;i<=rows;i++)\n{\n\tfor(space=1;space<=(rows-i);space++)\n\t{\n\t\tSystem.out.print(\" \");\n\t}\n\twhile(k !=(2*i-1))\n\t{\n\t\tSystem.out.print(\"* \");\n\t\tk++;\n\t}\n\tk=0;\n\tSystem.out.println();\n}\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tdivideByZero(2);\n\n\t}",
"public static void main(String[] args) {\n\t\tint a=20;\n\t\tint b=0;\n\t\tint c=a/b;\n\t\tSystem.out.println(c);\n\t\tSystem.out.println(\"division=\"+c);\n\t\tSystem.out.println(c);\n\n\t}",
"public Divide(Node l, Node r) {\r\n\t\tsuper(l, r);\r\n\t}",
"private int parent(int i) {\r\n\t\tif (i % 2 == 0) {\r\n\t\t\treturn i / 2 - 1;\r\n\t\t}\r\n\t\treturn i / 2;\r\n\t}",
"@Override\r\n\tpublic int call(int a, int b) {\n\t\treturn a/b;\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint i=10;\n\t\tint j=++i;\n\t\tint g=2;\n\t\tg *= j;\n\t\t\n\t\tfor(int h=0; h<10;h++) {\n\t\t//System.out.println(i+j);\n\t\tSystem.out.println(g);\n\t\t}\n\t}",
"@Test\n\tpublic void divisionTest() {\n\t\tMathOperation division = new Division();\n\n\t\tassertEquals(0, division.operator(ZERO, FIVE).intValue());\n\t\tassertEquals(4, division.operator(TWENTY, FIVE).intValue());\n\t}",
"@Override\n\tpublic void visit(DivisionListNode node) {\n\t\tstackPair.push(new Pair<>(\"/\", 2));\n\t\tnode.getNext().accept(this);\n\t}",
"private int leftchild(int i) {\n return (2 * i) + 1;\n }",
"public static int telop(int x, int y){\r\n return x + y;\r\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(div(2,0));\n\t}",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"public void testORDINARY_DIV8() throws Exception {\n\t\tObject retval = execLexer(\"ORDINARY_DIV\", 17, \"bend sinister\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"ORDINARY_DIV\", expecting, actual);\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\ta= a*b;//36\r\n\t\tb=a/b;//9\r\n\t\ta=a/b;//4\r\n\t\t\r\n\t\tSystem.out.println(\"a=\"+a);\r\n\t\t\r\n\t\tSystem.out.println(\"b=\"+b);\r\n\t}",
"if(x%2)\r\n\r\n\tpublic static void main(String[] args) {\r\n\r\n\t\t\r\n\t}",
"protected static int parent(int i){\n return (i-1)/2;\n }",
"public int root2(){\n\t\t\tRandom r1=new Random();\n\t\t\tint r2= r1.nextInt((9) + 1) + 1;\n\t\t\treturn r2;\n\t}",
"private static int path1(int n) {\n int[] path = new int[n+1];\n path[0] = 0;\n path[1] = 1;\n path[2] = 2;\n for (int i=3;i<=n;i++) {\n path[i] = path[i-1] + path[i-2];\n }\n return path[n];\n }",
"@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}",
"public static void main(String[] args) {\n \n int num = 5;\n\n for(int i=1; i<=num; i++){\n\n for (int x=1; x<=i; x++){\n System.out.print(\" \");\n }\n for(int y = i; y<=num; y++ ) System.out.print(\"*\");\n\n System.out.println();\n }\n }",
"private void handleIndivisible() {\n\t\n}",
"public String toString(){ return \"DIV\";}",
"public static int next(int n)\n { \n int x = 0;\n if(n%2 == 0)\n {\n return n/2;\n }\n else\n {\n return (3*n)+1;\n }\n }",
"public static void main(String[] args) {\n\t\tfinal double d = 1 / 2; \n\t\tSystem.out.println(d); \n\t}"
] |
[
"0.5802931",
"0.57830036",
"0.57177615",
"0.5564141",
"0.5354098",
"0.5311531",
"0.52758396",
"0.5268713",
"0.52555203",
"0.5255421",
"0.5237614",
"0.51919836",
"0.5186965",
"0.5178512",
"0.5141727",
"0.51358914",
"0.5135747",
"0.5128278",
"0.51273",
"0.5095059",
"0.50897986",
"0.50628376",
"0.506265",
"0.50511473",
"0.50403655",
"0.5030181",
"0.5025643",
"0.5022476",
"0.50200766",
"0.5006082",
"0.5005887",
"0.49978864",
"0.49973392",
"0.4996602",
"0.49594378",
"0.4943565",
"0.49302715",
"0.49235407",
"0.49215513",
"0.4918696",
"0.4915634",
"0.49151754",
"0.49070057",
"0.4906323",
"0.48896477",
"0.48884937",
"0.48878485",
"0.4887519",
"0.4883809",
"0.48795652",
"0.48784328",
"0.48712373",
"0.48708206",
"0.4865338",
"0.48562965",
"0.48472986",
"0.48447293",
"0.4831222",
"0.48257503",
"0.48195934",
"0.48146045",
"0.48139584",
"0.48075902",
"0.47983924",
"0.47943184",
"0.47929612",
"0.4792112",
"0.47878206",
"0.4782121",
"0.47800428",
"0.47740993",
"0.47740698",
"0.4769371",
"0.4765617",
"0.47626194",
"0.47585353",
"0.47542787",
"0.4740224",
"0.47399843",
"0.47395414",
"0.47316766",
"0.4731642",
"0.4721765",
"0.4721623",
"0.47211152",
"0.4716286",
"0.4712033",
"0.47091258",
"0.47025016",
"0.46996254",
"0.46955746",
"0.4691483",
"0.46906036",
"0.46900374",
"0.4688528",
"0.46872595",
"0.4671455",
"0.46695462",
"0.46667716",
"0.4665278",
"0.46630943"
] |
0.0
|
-1
|
Handles the HTTP GET method.
|
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
processRequest(request, response);
} catch (ParseException ex) {
Logger.getLogger(Controlador.class.getName()).log(Level.SEVERE, null, ex);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}",
"void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }",
"public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}",
"@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}",
"public Result get(Get get) throws IOException;",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }",
"@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }",
"@Override\npublic void get(String url) {\n\t\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}",
"@NonNull\n public String getAction() {\n return \"GET\";\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }",
"@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }",
"@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }",
"public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }",
"public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}",
"@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}",
"public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}",
"public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}",
"private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }",
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}",
"private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}"
] |
[
"0.7589609",
"0.71665615",
"0.71148175",
"0.705623",
"0.7030174",
"0.70291144",
"0.6995984",
"0.697576",
"0.68883485",
"0.6873811",
"0.6853569",
"0.6843572",
"0.6843572",
"0.6835363",
"0.6835363",
"0.6835363",
"0.68195957",
"0.6817864",
"0.6797789",
"0.67810035",
"0.6761234",
"0.6754993",
"0.6754993",
"0.67394847",
"0.6719924",
"0.6716244",
"0.67054695",
"0.67054695",
"0.67012346",
"0.6684415",
"0.6676695",
"0.6675696",
"0.6675696",
"0.66747975",
"0.66747975",
"0.6669016",
"0.66621476",
"0.66621476",
"0.66476154",
"0.66365504",
"0.6615004",
"0.66130257",
"0.6604073",
"0.6570195",
"0.6551141",
"0.65378064",
"0.6536579",
"0.65357745",
"0.64957607",
"0.64672184",
"0.6453189",
"0.6450501",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.64067316",
"0.6395873",
"0.6379907",
"0.63737476",
"0.636021",
"0.6356937",
"0.63410467",
"0.6309468",
"0.630619",
"0.630263",
"0.63014317",
"0.6283933",
"0.62738425",
"0.62680805",
"0.62585783",
"0.62553537",
"0.6249043",
"0.62457556",
"0.6239428",
"0.6239428",
"0.62376446",
"0.62359244",
"0.6215947",
"0.62125194",
"0.6207376",
"0.62067443",
"0.6204527",
"0.6200444",
"0.6199078",
"0.61876005",
"0.6182614",
"0.61762017",
"0.61755335",
"0.61716276",
"0.6170575",
"0.6170397",
"0.616901"
] |
0.0
|
-1
|
Handles the HTTP POST method.
|
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
processRequest(request, response);
} catch (ParseException ex) {
Logger.getLogger(Controlador.class.getName()).log(Level.SEVERE, null, ex);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public String post();",
"@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }",
"protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}",
"public void postData() {\n\n\t}",
"@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public abstract boolean handlePost(FORM form, BindException errors) throws Exception;",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}",
"public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }",
"protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}",
"public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }",
"@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
] |
[
"0.73289514",
"0.71383566",
"0.7116213",
"0.7105215",
"0.7100045",
"0.70236707",
"0.7016248",
"0.6964149",
"0.6889435",
"0.6784954",
"0.67733276",
"0.67482096",
"0.66677034",
"0.6558593",
"0.65582114",
"0.6525548",
"0.652552",
"0.652552",
"0.652552",
"0.65229493",
"0.6520197",
"0.6515622",
"0.6513045",
"0.6512626",
"0.6492367",
"0.64817846",
"0.6477479",
"0.64725804",
"0.6472099",
"0.6469389",
"0.6456206",
"0.6452577",
"0.6452577",
"0.6452577",
"0.6450273",
"0.6450273",
"0.6438126",
"0.6437522",
"0.64339423",
"0.64253825",
"0.6422238",
"0.6420897",
"0.6420897",
"0.6420897",
"0.6407662",
"0.64041835",
"0.64041835",
"0.639631",
"0.6395677",
"0.6354875",
"0.63334197",
"0.6324263",
"0.62959254",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6280875",
"0.6272104",
"0.6272104",
"0.62711537",
"0.62616795",
"0.62544584",
"0.6251865",
"0.62274224",
"0.6214439",
"0.62137586",
"0.621211",
"0.620854",
"0.62023044",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61638993",
"0.61603814",
"0.6148914",
"0.61465937",
"0.61465937",
"0.614548",
"0.6141879",
"0.6136717",
"0.61313903",
"0.61300284",
"0.6124381",
"0.6118381",
"0.6118128",
"0.61063534",
"0.60992104",
"0.6098801",
"0.6096766"
] |
0.0
|
-1
|
Returns a short description of the servlet.
|
@Override
public String getServletInfo() {
return "Short description";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }",
"@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}",
"@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }"
] |
[
"0.87634975",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8531295",
"0.8531295",
"0.85282224",
"0.85282224",
"0.85282224",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8516995",
"0.8512296",
"0.8511239",
"0.8510324",
"0.84964365"
] |
0.0
|
-1
|
Get the list of all users
|
public static List<User> getUsersList(){
WSResponse response = null;
List<User> resultList = new ArrayList<User>();
try{
Promise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_USERS_URL)
.setContentType(Urls.CONTENT_TYPE_JSON)
.get();
response = result.get(10000);
Gson gson = new Gson();
User[] users = gson.fromJson(response.getBody(), User[].class);
for(int i=0; i<users.length; i++){
resultList.add(users[i]);
}
} catch(Exception exception){
Controller.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);
}
return resultList;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List getAllUsers();",
"public List<User> getAllUsers();",
"List<User> getAllUsers();",
"List<User> getAllUsers();",
"@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}",
"java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();",
"List<User> getUsers();",
"List<User> getUsers();",
"public List<User> getAllUsers() {\n return users;\n }",
"public List<User> getAll() {\n\t\treturn service.getAll();\n\t}",
"Iterable<User> getAllUsers();",
"public void getAllUsers() {\n\t\t\n\t}",
"public List<User> getUsers();",
"public List<User> listAll() throws Exception;",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }",
"@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}",
"@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}",
"@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}",
"@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}",
"public String[] listUsers();",
"@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}",
"public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}",
"public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}",
"public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}",
"@Nonnull\n List<User> getUsers();",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"java.util.List<com.rpg.framework.database.Protocol.User> \n getUsersList();",
"@Override\n\tpublic ArrayList<User> getAll() {\n\t\treturn this.users;\n\t}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}",
"@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"public List<User> getAll() {\n\t\treturn null;\n\t}",
"public List<User> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}",
"@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }",
"public static ArrayList<Userdatas> getAllUsersList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_ALL_USERS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Userdatas> anagList = (ArrayList<Userdatas>) rpp.parameters[0];\n\t\treturn anagList;\n\t}",
"public ArrayList<User> getAllUsers() {\n return profile.getAllUsers();\n }",
"public List<User> list() {\n\t\treturn userDao.list();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public ArrayList<User> getAllUsers() {\n return allUsers;\n }",
"List<KingdomUser> getAllUsers();",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}",
"@Override\n\tpublic List<ERS_USERS> getAll() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn userDAO.findAllUsers();\r\n\t}",
"@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}",
"public List<String> getAll() {\r\n List<String> listOfUser = new ArrayList<>();\r\n for(User user : userRepository.findAll()){\r\n listOfUser.add(user.toString());\r\n }\r\n return listOfUser;\r\n }",
"public static List<User> all() \n {\n return find.all();\n }",
"@Override\n\tpublic ArrayList<User> findAll() {\n\t\t\n\t\treturn userDao.querydAll();\n\t}",
"@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}",
"public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"@Override\n\tpublic List<User> getUsers() {\n\t\treturn mongoTemplate.findAll(User.class);\n\t}",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"public List<User> getAllUser() {\n\t\treturn null;\r\n\t}",
"public List<User> getAllUsers() {\n\t\treturn null;\n\t}",
"List<KingdomUser> getUsers();",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"public List<User> getUserList();",
"public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}",
"@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}",
"public synchronized List<User> getAllUsers() {\r\n\t\treturn new ArrayList<User>(mapping.values());\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"public List<User> getAllUsers() {\n\t\tTypedQuery<User> query = em.createNamedQuery(\"User.findAll\", User.class);\n\n\t\tList<User> result = query.getResultList();\n\t\tlog(\"got all users, result size: \" + result.size());\n\t\treturn result;\n\t}",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}",
"@GetMapping(value = URL)\n @ResponseBody\n public List<Users> listAll() {\n return usersService.listAll();\n }",
"@Override\n\tpublic List<User> getAll() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<User> getAll() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}",
"public List<TestUser> getAllUsers(){\n\t\tSystem.out.println(\"getting list of users..\");\n\t\tList<TestUser> user=new ArrayList<TestUser>();\n\t\tuserRepositary.findAll().forEach(user::add);\n\t\t//System.out.println(\"data: \"+userRepositary.FindById(\"ff80818163731aea0163731b190c0000\"));\n\t\treturn user;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@GetMapping(path = \"/all\")\n public @ResponseBody\n Iterable<User> getAllUsers() {\n LOG.info(\"Displays all the users from the database\");\n return userRepository.findAll();\n }",
"public List<User> getAllUsers() {\n\t\treturn userDao.getAllUsers();\n\t}",
"@GetMapping(\"/\")\n\tpublic ResponseEntity<List<UsersDTO>> listAllusers(){\n\t\tList<UsersDTO> users = userJpaRepository.findAll();\n\t\tif(users.isEmpty()) {\n\t\t\treturn new ResponseEntity<List<UsersDTO>>(HttpStatus.NO_CONTENT);\n\t\t}\n\t\treturn new ResponseEntity<List<UsersDTO>>(users, HttpStatus.OK);\n\t}",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"public List<User> retrieveAllUsers() {\n\t\treturn (List<User>) userRepository.findAll();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Override\n public ObservableList<User> getAllUsers() {\n return controller.getAllUsers();\n }",
"@Override\r\n\tpublic List<User> getUsers() {\n\t\tList<User> userlist=dao.getUsers();\r\n\t\treturn userlist;\r\n\t}",
"public List<Utilizator> listUsers();",
"public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }",
"@RequestMapping(method = RequestMethod.GET)\n\tpublic List<User> getAll() {\n\t\tList<User> users = dao.getAll();\n\t\treturn users;\n\t}",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\tList<User> users = null;\n\t\ttry {\n\t\t\tusers = client.queryForList(\"selectAllUser\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn users;\n\n\t}",
"public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }",
"@GetMapping\n public ResponseEntity<List<UserEntity>> getAllUsers() {\n return ResponseEntity.ok(uService.getAllUsers());\n }",
"public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;",
"@GetMapping\n public List<User> getAll() {\n return userService.getAll();\n }",
"public List<YuserVO> getAllUsers() {\n\t\tList<YuserVO> list = null;\n\t\t\ttry {\n\t\t\t\tlist = userDao.getAllUsers();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.out.println(\"get users failed ..................................\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\treturn list;\n\t}",
"@Override\n\tpublic List<User> findAll() {\n\t\treturn this.userMapper.findAll();\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}",
"@Override\r\n\tpublic void getAllUser() {\n\t\tSystem.out.println(users);\r\n\t\t\r\n\t}",
"@GetMapping(path = \"\")\n\tpublic @ResponseBody Iterable<ApplicationUser> getAllUsers() {\n\t\treturn userService.getUsers();\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\r\n\tpublic List<Map<String, Object>> findAllUser() {\n\t\treturn userMapper.findAllUser();\r\n\t}",
"public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }",
"public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}"
] |
[
"0.9007936",
"0.87763155",
"0.8589943",
"0.8589943",
"0.84754455",
"0.84595",
"0.84541154",
"0.84541154",
"0.8427308",
"0.8414903",
"0.8397057",
"0.83358514",
"0.83300424",
"0.83283424",
"0.8326811",
"0.8305557",
"0.8301624",
"0.82903135",
"0.8277038",
"0.82739943",
"0.8272744",
"0.82570875",
"0.8255668",
"0.82485473",
"0.82407224",
"0.8240058",
"0.82366705",
"0.823541",
"0.823452",
"0.82344306",
"0.8229322",
"0.8212674",
"0.8210757",
"0.8209644",
"0.8203355",
"0.81917477",
"0.8190683",
"0.81884396",
"0.8177216",
"0.8170771",
"0.8152683",
"0.8132651",
"0.8130143",
"0.8126769",
"0.8125423",
"0.81034005",
"0.81023854",
"0.8097149",
"0.8086238",
"0.8076498",
"0.80755496",
"0.80748945",
"0.8070611",
"0.80684143",
"0.80661017",
"0.8061361",
"0.8059768",
"0.80571896",
"0.8047271",
"0.8046062",
"0.80406785",
"0.803911",
"0.80380565",
"0.8036126",
"0.8035341",
"0.80351114",
"0.8031856",
"0.8031521",
"0.8027863",
"0.8027667",
"0.80226904",
"0.80226904",
"0.8019189",
"0.80157673",
"0.8005982",
"0.80057156",
"0.8003582",
"0.7992767",
"0.79914534",
"0.7985172",
"0.7982918",
"0.79827124",
"0.79826623",
"0.79810566",
"0.7972549",
"0.79724586",
"0.79705614",
"0.7969627",
"0.7965053",
"0.7962726",
"0.79611933",
"0.7955627",
"0.7955369",
"0.79544795",
"0.7950974",
"0.79497874",
"0.79481953",
"0.7946319",
"0.79456943",
"0.7942766",
"0.79401946"
] |
0.0
|
-1
|
Delete the user with the given id
|
public static void deleteUser(String id){
WSResponse response = null;
try{
Promise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.DELETE_USER_URL+id)
.delete();
response = result.get(10000);
if(response.getStatus() == StatusCodes.OK){
User user = new Gson().fromJson(response.getBody(), User.class);
Controller.flash().put(Messages.SUCCESS, Messages.SUCCESS_DELETED + user.firstName + " " + user.lastName);
} else{
Controller.flash().put(Messages.ERROR, Messages.ERROR_DELETE);
}
} catch(Exception exception){
Controller.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void deleteUserById(Long id);",
"void deleteUserById(Integer id);",
"public void deleteUser(int id) {\r\n userRepo.deleteById(id);\r\n }",
"public void deleteUser(Integer id) throws BadRequestException;",
"public void deleteUser(int id) {\n\t\tuserRepository.delete(id);\r\n\t}",
"public void deleteUser(long id){\n userRepository.deleteById(id);\n }",
"public void deleteUserById(int id){\n userListCtrl.deleteUser(id);\n }",
"void deleteUser(int id);",
"@Override\n\tpublic void deleteUser(int id) {\n\t\tuserMapper.deleteUser(id);\n\t}",
"public void deleteUser(Integer id) {\n UserModel userModel;\n try {\n userModel = userRepository.findById(id).orElseThrow(IOException::new);\n }\n catch (IOException e) {\n System.out.println(\"User not found\");\n userModel = null;\n }\n userRepository.delete(userModel);\n }",
"@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}",
"public void deleteUser(final Long id) {\n userRepository.deleteById(id);\n }",
"public void deleteUser(Long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\t\t\trepository.deleteById(id);\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\t}",
"@Override\r\n\tpublic void deleteByIdUser(int id) {\n\t\tuserReposotory.deleteById(id);\r\n\t}",
"public void delete(int id){\n\t\tuserRepository.delete(id);\n\t}",
"@Override\n\tpublic int deleteUser(Integer id) {\n\t\treturn userDao.deleteUser(id);\n\t}",
"@Override\r\n\tpublic int delete(int id) {\n\t\treturn userDAO.DeleteUser(id);\r\n\t}",
"@Override\n\tpublic void deleteUser(String id) throws Exception {\n\t\t\n\t}",
"public void deleteUser(int id) {\n\t\tet.begin();\n\t\tem.remove(em.find(User.class, id));\n\t\tet.commit();\n\t}",
"public void deleteUser(int id){\r\n\t\tconfigDao.deleteUserById(id);\r\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\tsession.delete(\"users.delete\",id);\n\t}",
"public int deleteUser(int id) {\n\t\treturn userMapper.deleteUser(id);\r\n\t}",
"@Override\n\tpublic void delete(int id) {\n\t\tuserDao.delete(id);\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\tuserDao.delete(id);\n\t\t\n\t}",
"public void deleteUser(String id) {\n\t\tSystem.out.println(\"deleteUser\");\n\t\t personDAO.deleteUser(id);\n\t}",
"void removeUser(Long id);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete RfpUser : {}\", id);\n rfpUserRepository.deleteById(id);\n }",
"@DeleteMapping(\"/users/{id}\")\n\tpublic void deleteUser(@PathVariable int id) {\n\t\tuserService.deleteById(id);\n\t\t\n\t\t\n\t}",
"public void delete(Long id) {\n\t\tlog.debug(\"Request to delete ResourceUser : {}\", id);\n\t\tresourceUserRepository.deleteById(id);\n\t}",
"public void deleteUser(int id) {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n stmt.executeUpdate(\"delete from users where id_user = \" + id);\n int idx = 0;\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n idx = i;\n }\n }\n allUsers.remove(idx);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"User deleted\", null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }",
"@DeleteMapping(\"/{id}\")\n public void delete(@PathVariable(\"id\") final int id) {\n userService.delete(id);\n }",
"@DeleteMapping(\"/user/{id}\")\n\tpublic ResponseEntity<User> deleteUser(@PathVariable(\"id\") int id) {\n\t\tUser currentUser = userDao.getUserById(id);\n\t\tif (currentUser == null) {\n\t\t\treturn new ResponseEntity<User>(HttpStatus.NOT_FOUND);\n\t\t} else {\n\n\t\t\tuserDao.delete(currentUser);\n\t\t\treturn new ResponseEntity<User>(HttpStatus.NO_CONTENT);\n\t\t}\n\n\t}",
"public void deleteUser(long userId);",
"@Transactional\n\tpublic void delete(Long id) {\n\t\tuserRepo.deleteByUserId(id);\n\t}",
"@Override\r\n\tpublic boolean delete(int id) {\r\n\t\treturn executeAndIsModified(DELETE_USER, id);\r\n\t}",
"public void deleteUserById(Long userId);",
"void deleteUser(String userId);",
"@Override\n\tpublic int delUser(Integer id)throws Exception {\n\t\treturn userMapper.delUser(id);\n\t}",
"@DeleteMapping(\"/delete/{id}\")\n\tpublic void delete(@PathVariable int id) {\n\t\tuserService.delete(id);\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete AppUser : {}\", id);\n appUserRepository.deleteById(id);\n }",
"public int delete(int id) {\n\t\treturn this.userDao.delete(id);\n\t}",
"@Override\n\tpublic int deleteByPrimaryKey(Integer id) {\n\t\treturn userMapper.deleteByPrimaryKey(id);\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete ExtraUser : {}\", id);\n extraUserRepository.delete(id);\n }",
"@Override\r\n\tpublic int deleteByPrimaryKey(Integer id) {\n\t\treturn userDao.deleteByPrimaryKey(id);\r\n\t}",
"@Override\n\tpublic ApplicationResponse deleteUser(String id) {\n\t\tOptional<UserEntity> userEntity = repository.findById(id);\n\t\tif (userEntity.isPresent()) {\n\t\t\trepository.deleteById(id);\n\t\t\treturn new ApplicationResponse(true, \"Success\", null);\n\t\t} else {\n\t\t\tthrow new UserNotFoundException(\"User not found\");\n\t\t}\n\t}",
"@Override\n\tpublic boolean deleteUserById(int id) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void deleteItem(Long id) {\n\t\tUser user = new User();\n\t\tuser.setId(id);\n\t\tuserRepository.delete(user);\n\t\tSystem.out.println(\"user deleted with succes !\");\n\t}",
"public int delete(int id) {\n\t\treturn this.userDao.deleteByPrimaryKey(id);\r\n\t}",
"@Override\n\tpublic boolean deleteUser(Integer id) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic User delete(String id) {\n\t\treturn null;\r\n\t}",
"@DeleteMapping(path=\"/{id}\")\n\tpublic ResponseEntity<Integer> deleteUserById(@PathVariable(\"id\") Integer id) {\n\t\tes.deleteById(id);\n\t\treturn new ResponseEntity<>(id, HttpStatus.OK);\n\t}",
"@RequestMapping(value = \"{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable Long id)\n {\n userRepo.deleteById(id);\n }",
"@Transactional\n public String deleteUser(Long id) {\n UserDto userDto = getUser(id);\n\n if (userDto.getId() != 0) {\n userRepository.deleteById(id);\n return \"User deleted successfully!\";\n } else {\n return \"User not found\";\n }\n }",
"@Override\n\tpublic User delete(Integer id) {\n\t\treturn null;\n\t}",
"@Override\n public void deleteUser(Integer id){\n try {\n runner.update(con.getThreadConnection(),\"delete from user where id=?\",id);\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n e.printStackTrace();\n }\n }",
"void deleteUser(String deleteUserId);",
"public void delete(String id){\n\t\tSystem.out.println(\"deleting user details..\");\n\n\t\tif(userRepositary.existsById(id)){\n\t\t\tuserRepositary.deleteById(id);\n\t\t}else{\n\t\t\tSystem.out.println(\"data doesn't exists for this id: \"+id);\n\t\t}\n\t}",
"@Override\n\tpublic boolean delUser(int id) {\n\t\tString sql=\"delete from users where id=?\";\n\t\tList<Object> params=new ArrayList<Object>();//泛型\n\t\tparams.add(id);\n\t\treturn this.MysqlUpdate(sql, params);\n\t}",
"@Override\n\tpublic int delete(String id) {\n\t\tint i= sysUserDao.delete(id);\n\t\treturn i;\n\t}",
"@DeleteMapping(\"/{id}\")\n\tpublic ResponseEntity<UsersDTO> deleteUser(@PathVariable(\"id\") final Long id) {\n\t\tOptional<UsersDTO> user = userJpaRepository.findById(id);\n\t\tif(! user.isPresent()) {\n\t\t\treturn new ResponseEntity<UsersDTO>(new CustomErrorType(\"Unable to delete. \"\n\t\t\t\t\t+ \"User with id :\" + id +\" not found.\"), HttpStatus.NOT_FOUND);\t\n\t\t}\n\t\tuserJpaRepository.deleteById(id);\n\t\treturn new ResponseEntity<UsersDTO>(HttpStatus.NO_CONTENT);\n\t}",
"public void deleteUser(long id) throws AccessException {\r\n BasicUserDetails authenticatedUser = (BasicUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n if(authenticatedUser.getId() != id)\r\n throw new AccessException(\"Cannot delete user different than the authenticated user\");\r\n\r\n if(userRepo.findById(id) == null) {\r\n throw new NoSuchElementException(\"No such user with \" + id + \" exist\");\r\n } else {\r\n userRepo.deleteById(id);\r\n }\r\n }",
"@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/users/{id}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<AppUser> deleteUser(@PathVariable Long id) {\n\t\tAppUser appUser = appUserRepository.findOne(id);\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tString loggedUsername = auth.getName();\n\t\tif (appUser == null) {\n\t\t\treturn new ResponseEntity<AppUser>(HttpStatus.NO_CONTENT);\n\t\t} else if (appUser.getUsername().equalsIgnoreCase(loggedUsername)) {\n\t\t\tthrow new RuntimeException(\"You cannot delete your account\");\n\t\t} else {\n\t\t\tappUserRepository.delete(appUser);\n\t\t\treturn new ResponseEntity<AppUser>(appUser, HttpStatus.OK);\n\t\t}\n\n\t}",
"public void deleteUser(Integer uid);",
"public int deleteByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n int rows = getSqlMapClientTemplate().delete(\"spreader_tb_user.ibatorgenerated_deleteByPrimaryKey\", key);\r\n return rows;\r\n }",
"public int deleteUser(int id) {\n\t\t\t String deleteQuery=\"delete from registration_customer_data where id='\"+id+\"' \";\n\t\t\t return template.update(deleteQuery); \n\t\t\n\t\t}",
"@DeleteMapping(\"{id}\")\n @ResponseBody\n public void deleteById(@PathVariable Long id) throws NotFoundException {\n userService.deleteById(id);\n }",
"public void deleteById(String id) {\n delete(getUser(id));\n }",
"public DeleteUser(int id) {\n\t\tsuper();\n\t\tthis.id = id;\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete HotelUser : {}\", id);\n hotelUserRepository.delete(id);\n }",
"@Override\r\n\tpublic void delete(int userId) {\n\t\ttheUserRepository.deleteById(userId);\r\n\t}",
"@DeleteMapping(\"/users/{id}\")\n\t@ResponseBody\n\tpublic ResponseEntity<UserIdDTO> deleteUserById(@PathVariable(name = \"id\") Integer id) throws BadRequestException {\n\n\t\tUserIdDTO userdeleated = userService.deleteUserBYID(id);\n\n\t\treturn new ResponseEntity<>(userdeleated, HttpStatus.OK);\n\n\t}",
"@Override\n public void removeUser(int id) {\n Session session = this.sessionFactory.getCurrentSession();\n User u = (User) session.load(User.class, new Integer(id));\n if(null != u){\n session.delete(u);\n }\n logger.info(\"User deleted successfully, User details=\"+u);\n }",
"@CrossOrigin(origins = \"*\")\r\n\t@DeleteMapping(\"/user/{id}\")\r\n\tpublic ResponseEntity<Users> deleteUser(@PathVariable(value=\"id\")Long id){\r\n\t\tUsers user = usersDAO.findById(id);\r\n\t\tif(user==null) {\r\n\t\t\t\r\n\t\t\treturn ResponseEntity.notFound().build();\r\n\t\t}\r\n\t\tusersDAO.deleteAll(user);\r\n\t\t\r\n\t\treturn ResponseEntity.ok().build();\r\n\t\t\r\n\t}",
"public void deleteUser(int id) throws Exception {\n\t\tSession session = null;\n \t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"delete from sys_user where emp_id=\"+id;\n\t\t\tSQLQuery sqlQuery=session.createSQLQuery(sql);\n\t\t\tsqlQuery.executeUpdate();\n\t\t\tsession.flush();\n\t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}",
"@DELETE(\"/api/users/{id}\")\n public void deleteUserById(@Path(\"id\") Integer id,Callback<User> callback);",
"public void removeuserById(Long id) throws SQLException{\n String SQL = \"DELETE FROM user WHERE id = ? \";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setLong(1, id);\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"remoção do usuário concluída com sucesso!\");\n else System.out.println(\"ID não encontrado, verifique novamente...\");\n ps.close();\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete FiestaUserSync : {}\", id);\n fiestaUserSyncRepository.delete(id);\n }",
"@Override\n\t@Transactional\n\tpublic void deleteUser(Long id) {\n\n\t\tUserEntity u = userRepository.findById(id).orElseThrow(() -> {\n\t\t\tlogger.warn(DataErrorMessages.USER_NO_CONTENT);\n\t\t\tthrow new UserNoContentException(DataErrorMessages.USER_NO_CONTENT);\n\t\t});\n\n\t\tfor (RolEntity r : u.getRoles())\n\t\t\tr.getUsers().remove(u);\n\n\t\tuserRepository.delete(u);\n\n\t}",
"public boolean delUser(int id) throws Exception {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void deleteUser(Long userId) {\n\t\tusersRepo.deleteById(userId);\n\n\t}",
"@RequestMapping(value=\"/users/{id}\",method=RequestMethod.DELETE)\n public ResponseEntity<User> deleteUser(@PathVariable(\"id\") String id){\n \n User user=userService.delete(Integer.parseInt(id));\n if(user==null)\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n else \n return new ResponseEntity<User>(user, HttpStatus.OK);\n \n }",
"@Override\n public boolean deleteUser(String id) {\n \n if (!id.equals(ROOT_USER) && identityService.findUserById(id) != null) {\n this.identityService.deleteUser(id);\n return true;\n } else {\n return false;\n }\n }",
"@Delete({\n \"delete from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);",
"@Override\n\tpublic void delete_User(String user_id) {\n\t\tuserInfoDao.delete_User(user_id);\n\t}",
"public void deleteUser(int userid) {\n\t\t\n\t}",
"@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}",
"public void deleteUser(Long id) throws UserException {\n try {\n userDAO.deleteUser(id);\n } catch (UserException e) {\n log.error(\" Exception type in service impl \" + e.getExceptionType());\n throw new UserException(e.getExceptionType());\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n }",
"@ApiMethod(name = \"removeUser\")\n\tpublic void removeUser(@Named(\"id\") Long id) {\n\t\tEntityManager mgr = getEntityManager();\n\t\ttry {\n\t\t\tUser user = mgr.find(User.class, id);\n\t\t\tmgr.remove(user);\n\t\t} finally {\n\t\t\tmgr.close();\n\t\t}\n\t}",
"@Override\n public void removeUserById(long id) {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n User user = (User) session.get(User.class, id);\n session.delete(user);\n tx.commit();\n session.close();\n }",
"void DeleteCompteUser(int id);",
"@Override\n\tpublic void deleteUser(int userId) {\n\t\tuserDao.deleteUser(userId);\n\t}",
"@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}",
"@Override\r\n\tpublic int deleteByPrimaryKey(Integer id) {\n\t\treturn adminUserMapper.deleteByPrimaryKey(id);\r\n\t}",
"@Override\n\tpublic int del(int id) {\n\t\treturn usersDAO.del(id);\n\t}",
"public Boolean deleteUser (long id){\n User user_to_be_deleted = userRepository.findById(id);\n if(user_to_be_deleted != null){\n userRepository.delete(user_to_be_deleted);\n return userRepository.existsById(id);\n }else{\n throw new UnknownUserException(\"This user doesn't exist and can therefore not be deleted\");\n }\n\n }",
"public void deleteUser(User user) {\n update(\"DELETE FROM user WHERE id = ?\",\n new Object[] {user.getId()});\n }",
"@Override\r\n\tpublic int deleteUser(String userId) {\n\t\treturn userMapper.deleteUser(userId);\r\n\t}",
"boolean delete(int id, int userId);",
"Integer removeUserByUserId(Integer user_id);",
"@DeleteMapping(path=\"{id}\")\n public void deleteUserById(@PathVariable(\"id\") int id){\n ReviewDAOService.deleteUserById(id);\n }"
] |
[
"0.90023315",
"0.89317465",
"0.8810221",
"0.8767512",
"0.87133664",
"0.8678416",
"0.86493033",
"0.8639611",
"0.86376804",
"0.86307263",
"0.8595817",
"0.8564324",
"0.8547114",
"0.85276335",
"0.8523065",
"0.8475695",
"0.8474869",
"0.84574264",
"0.84295076",
"0.84169763",
"0.8403355",
"0.8393341",
"0.83750224",
"0.83616847",
"0.8355413",
"0.834919",
"0.8345038",
"0.83210826",
"0.82881284",
"0.8268218",
"0.82618517",
"0.8251232",
"0.8244721",
"0.8224703",
"0.821008",
"0.8209151",
"0.8203931",
"0.815267",
"0.81472963",
"0.81321347",
"0.8124619",
"0.8106681",
"0.8083668",
"0.80804026",
"0.8073762",
"0.8064975",
"0.8056903",
"0.80538356",
"0.80448025",
"0.80331886",
"0.8029376",
"0.8023696",
"0.80001944",
"0.7988257",
"0.79802877",
"0.7962168",
"0.79412496",
"0.79378587",
"0.78899205",
"0.7865523",
"0.786016",
"0.78413635",
"0.78397727",
"0.7835467",
"0.7826784",
"0.78117514",
"0.78049904",
"0.78011316",
"0.77985525",
"0.7795613",
"0.77795947",
"0.7779162",
"0.77620393",
"0.77482283",
"0.77473754",
"0.7739153",
"0.7731444",
"0.77085936",
"0.7707645",
"0.7703557",
"0.77026045",
"0.7701929",
"0.7700361",
"0.76866925",
"0.7686",
"0.76847774",
"0.7683427",
"0.76810735",
"0.7674458",
"0.7669088",
"0.7659755",
"0.76571405",
"0.7656901",
"0.76567346",
"0.7655479",
"0.76337063",
"0.762389",
"0.76123226",
"0.76046574",
"0.7599385"
] |
0.8287465
|
29
|
Get user by id
|
public static User getUser(String id){
WSResponse response = null;
User user = null;
try{
Promise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.GET_ONE_USER+id)
.setContentType(Urls.CONTENT_TYPE_JSON)
.get();
response = result.get(10000);
user = new Gson().fromJson(response.getBody(), User.class);
} catch(Exception exception){
Controller.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);
}
return user;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"User getUserById(int id);",
"User getUser(Long id);",
"User getUserById(Long id);",
"User getUserById(Long id);",
"public User getUserFromId(final long id) {\n LOG.info(\"Getting user with id {}\", id);\n return userRepo.get(id);\n }",
"@Override\r\n\tpublic User getUserById(int id) {\n\t\treturn userMapper.selById(id);\r\n\t}",
"@Override\r\n public IUser getUserByUserId(String id)\r\n {\r\n EntityManager em = getEntityManager();\r\n\r\n try\r\n {\r\n return em.find(User.class, id);\r\n }\r\n finally\r\n {\r\n em.close();\r\n }\r\n }",
"public User getUser(String id) {\n return repository.getUser(id).get(0);\n }",
"public User read(String id);",
"@Override\r\n\tpublic User getUserByID(int id) {\n\t\treturn userMapper.getUserByID(id);\r\n\t}",
"public User getUserById(String id){\n\t\tUser e;\n\t\tfor (int i = 0 ; i < users.size() ; i++){\n\t\t\te = users.get(i);\n\t\t\tif (e.getId().equals(id))\n\t\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}",
"public User getUser(long id){\n User user = userRepository.findById(id);\n if (user != null){\n return user;\n } else throw new UserNotFoundException(\"User not found for user_id=\" + id);\n }",
"@Override\n\tpublic User getUser(int id) {\n\t\treturn userRepository.findById(id);\n\t}",
"public User user(long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\t\t\treturn user.get();\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\n\t}",
"@Override\n\tpublic User getUserById(int id) {\n\t\treturn userDao.getUserById(id);\n\t}",
"public User getById(int id) {\n\t\treturn userDao.getById(id);\n\t}",
"public User getUserById(String id) {\n // return userRepo.findById(id);\n\n return null;\n }",
"public User getUserById(Long id) throws Exception;",
"UserDetails get(String id);",
"@Override\n\tpublic User getOne(Integer id) {\n\t\treturn userDao.getOne(id);\n\t}",
"public User getUserById(int id) {\n\t\treturn userDao.getUserById(id);\r\n\t}",
"@Override\r\n\tpublic User user(int id) {\r\n\t\tMap<String,String> map = getOne(SELECT_USERS+ WHERE_ID, id);\r\n\t\tif(map!= null){\r\n\t\t\treturn IMappable.fromMap(User.class, map);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@RequestMapping(method=RequestMethod.GET, value=\"{id}\")\n\tpublic User getUser(@PathVariable Long id) {\n\t\treturn RestPreconditions.checkFound(repo.findByUserId(id));\n\t}",
"public User getUserById(int id) {\n System.out.println(id + this.userDao.selectId(id).getUsername());\n\n return this.userDao.selectId(id);\n }",
"@Override\n\tpublic User selectUserById(int id) {\n\t\tUser user = null;\n\t\ttry {\n\t\t\tuser = (User) client.queryForObject(\"selectUserById\", id);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn user;\n\n\t}",
"public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }",
"public Users getUser(Integer id) {\r\n\t\treturn usDao.findById(id, true);\r\n\r\n\t}",
"private User getUser(Long id) {\n\t\tEntityManager mgr = getEntityManager();\n\t\tUser user = null;\n\t\ttry {\n\t\t\tuser = mgr.find(User.class, id);\n\t\t} finally {\n\t\t\tmgr.close();\n\t\t}\n\t\treturn user;\n\t}",
"public User getUser(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n User user = null;\n try {\n tx = session.beginTransaction();\n\n // Add restriction to get user with username\n Criterion emailCr = Restrictions.idEq(id);\n Criteria cr = session.createCriteria(User.class);\n cr.add(emailCr);\n user = (User)cr.uniqueResult();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return user;\n }",
"User get(Key id);",
"public User getUser(long id) {\n\t\tUser user = null;\n\t\t\n\t\tString queryString = \n\t\t\t \"PREFIX sweb: <\" + Config.NS + \"> \" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \" +\n\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \" +\n\t\t\t \"PREFIX foaf: <http://xmlns.com/foaf/0.1/>\" +\n\t\t\t \"select * \" +\n\t\t\t \"where { \" +\n\t\t\t \t\"?user sweb:id \" + id + \".\" +\n\t\t\t \"} \\n \";\n\n\t Query query = QueryFactory.create(queryString);\n\t \n\t QueryExecution qe = QueryExecutionFactory.create(query, this.model);\n\t ResultSet results = qe.execSelect();\n\t \n\t while(results.hasNext()) {\n\t \tQuerySolution solution = results.nextSolution() ;\n\t Resource currentResource = solution.getResource(\"user\");\n\n\t user = this.buildUserFromResource(currentResource);\n\t \n\t user.setTweets(this.getTweetsByUserId(id));\n\t user.setVisited(this.getVenuesVisitedByUserId(id));\n\t user.setInContact(this.getInContactForUserId(id));\n\t }\n\t \n\t return user;\n\t}",
"public User getUser(Long id) {\n\t\treturn userRepo.findByUserId(id);\n\t}",
"@Override\r\n\tpublic User findByIdUser(Integer id) {\n\t\treturn userReposotory.findById(id).get();\r\n\t}",
"public User getUser(int id) {\n\t\treturn null;\n\t}",
"public User findById(Long id){\n return userRepository.findOne(id);\n }",
"public static User findUserById(int id) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserById = \"SELECT * FROM public.member \"\n + \"WHERE id = '\" + id + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserById);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"public User getUser(Integer id) {\n\t\treturn null;\n\t}",
"public static User findUser(int id) {\r\n return null;\r\n }",
"public User findById(int id) {\n\t\treturn userRepository.findOne(id);\n\t}",
"@Override\n\tpublic User getUserById(String id) {\n\t\tUser user = null;\n\t\tConnection connection = null;\n\t\ttry{\n\t\t\tconnection = BaseDao.getConnection();\n\t\t\tuser = userMapper.getUserById(connection,id);\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tuser = null;\n\t\t}finally{\n\t\t\tBaseDao.closeResource(connection, null, null);\n\t\t}\n\t\treturn user;\n\t}",
"User findUserById(Long id) throws Exception;",
"User findUserById(int id);",
"public User getUser(String id) {\n\t\treturn null;\r\n\t}",
"public User getUser(Integer id)\n\t{\n\t\t// Create an user -1 for when it isn't in the list\n\t\tUser searchUser = new User();\n\t\t// Index: User's position in the list\n\t\tint index = this.getUserById(id.intValue());\n\t\t// If the user is in the list execute the action\n\t\tif(index != -1)\n\t\t{\n\t\t\tsearchUser = this.usersList.get(index);\n\t\t}\n\t\t\n\t\treturn searchUser;\n\t}",
"@Override\n\tpublic User findUserById(int id) {\n\t\treturn userDao.findUserById(id);\n\t}",
"public User getUserById(int id) {\n\t\treturn em.find(User.class, id);\n\t}",
"public User getById(int id) {\n\t\t return (User)sessionFactory.getCurrentSession().get(User.class, id);\n\t}",
"User find(long id);",
"@Override\r\n\tpublic Userinfo findbyid(int id) {\n\t\treturn userDAO.searchUserById(id);\r\n\t}",
"public User findById(Long id) {\n return genericRepository.find(User.class, id);\n }",
"public User getUserById(Integer id) {\n\t\treturn userMapper.selectByPrimaryKey(id);\n\t}",
"public User findUserById(int id);",
"public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n return null;\n }",
"public User getUserFromID(String id) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"_id\", new ObjectId(id));\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"@Override\r\n\tpublic User findById(int id) {\n\t\treturn userDAO.findById(id);\r\n\t}",
"@Override\n\tpublic User findByUserid(Serializable id) {\n\t\treturn this.userDao.findById(id);\n\t}",
"@GetMapping(\"/users/{id}\")\n\tpublic User retrieveUser(@PathVariable int id) {\n\t\tUser user = userService.findById(id).get();\n\t\tif (user == null) {\n\t\t\tthrow new UserNotFoundException(\"id - \" + id);\n\t\t}\n\t\treturn user;\n\t}",
"User findOne(Long id);",
"public User findById(String id) {\n\t\treturn userDao.findById(id);\n\t}",
"@Override\r\n\tpublic User getById(Integer id) {\n\t\treturn null;\r\n\t}",
"private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }",
"public User getUser(int id) {\n User user = null;\n Session session = null;\n try {\n session = openSession();\n user = (User) session.get(User.class, id);\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return user;\n }",
"public User findOneUser(int id) {\n\t\treturn userMapper.findOneUser(id);\r\n\t}",
"Optional<User> findUser(int id) throws ServiceException;",
"@Override\r\n\tpublic TbUser findUserById(Long id) {\n\t\tTbUser tbUser = tbUserMapper.selectByPrimaryKey(id);\r\n\t\treturn tbUser;\r\n\t}",
"@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}",
"@Override\n public TechGalleryUser getUser(final Long id) throws NotFoundException {\n TechGalleryUser userEntity = userDao.findById(id);\n // if user is null, return a not found exception\n if (userEntity == null) {\n throw new NotFoundException(i18n.t(\"No user was found.\"));\n } else {\n return userEntity;\n }\n }",
"@Override\r\n\tpublic LocalUser get(int id) {\n\t\treturn userDao.get(id);\r\n\t}",
"@Override\n public User getUserById(int id) {\n Session session = this.sessionFactory.getCurrentSession(); \n User u = (User) session.load(User.class, new Integer(id));\n logger.info(\"User loaded successfully, User details=\"+u);\n return u;\n }",
"public User findUserById(Long id) {\n \tOptional<User> u = userRepository.findById(id);\n \t\n \tif(u.isPresent()) {\n return u.get();\n \t} else {\n \t return null;\n \t}\n }",
"public User getUserById(Serializable id) {\n\t\treturn (User)this.userDao.getEntryById(id);\r\n\t}",
"User getOne(long id) throws NotFoundException;",
"public User findUser(int id) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where id = ?\");\n\t\t\tps.setInt(1, id);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(id, rs.getString(2), rs.getString(3), rs.getString(5),\n\t\t\t\t\t\trs.getDate(6));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic User findUser(int id) {\n\n\t\tUser user = em.find(User.class, id);\n\n\t\treturn user;\n\t}",
"@Override\n\tpublic User getByid(String id) {\n\t\treturn null;\n\t}",
"public User findById(int id) {\n\t\tString sql = \"SELECT * FROM VIDEOGAMESTORES.USERS WHERE ID=\" +id;\n\t\n\t\ttry {\n\t\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(sql);\n\t\t\twhile(srs.next())\n\t\t\t{\n\t\t\t\t// Add a new User to the list for every row that is returned\n\t\t\t\treturn new User(srs.getString(\"USERNAME\"), srs.getString(\"PASSWORD\"), srs.getString(\"EMAIL\"),\n\t\t\t\t\t\tsrs.getString(\"FIRST_NAME\"), srs.getString(\"LAST_NAME\"), srs.getInt(\"GENDER\"), srs.getInt(\"USER_PRIVILEGE\"), srs.getInt(\"ID\"));\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public User findById(Long id);",
"public PrototypeUser getUserById(Long id) {\n\t\treturn userDao.findById(id);\r\n\t}",
"public User getUser(int id) {\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t\n\t\tCursor cursor = db.query(TABLE_USERS, new String[] { KEY_USER_ID, \n\t\t\t\tKEY_PASSWORD, KEY_EMAIL }, KEY_USER_ID + \" = ?\",\n\t\t\t\tnew String[] { String.valueOf(id) }, null, null, null, null);\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\t\t\n\t\tString password = cursor.getString(cursor.getColumnIndex(KEY_PASSWORD));\n\t\tString email = cursor.getString(cursor.getColumnIndex(KEY_EMAIL));\n\t\tUser user = new User(\n\t\t\t\tpassword,\n\t\t\t\temail,\n\t\t\t\tInteger.parseInt(cursor.getString(0)) );\n\t\t// return user\n\t\treturn user;\n\t\t}",
"User findById(Long id);",
"public Users getUserById(int id) {\n\t\treturn userMapper.findUserById(id);\n\t}",
"@Override\n\tpublic AppUser getUserById(int id) {\n\t\tAppUser user = store.get(id);\n return user;\n\t\t\n\t}",
"public Function<Session, User> get(long id) {\n return this.functionTransaction(\n session -> session.get(User.class, id)\n );\n }",
"public User getById(@NotBlank String id){\n System.out.println(\"Sukses mengambil data User.\");\n return null;\n }",
"@Override\n\tpublic User findById(String id) {\n\t\tUser u= em.find(User.class, id);\n\t\tSystem.out.println(u);\n\t\treturn u;\n\t}",
"public User getUser(long id) {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User where idUser = :id \");\n\t\tquery.setParameter(\"id\", id);\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list.get(0);\n\t\t\n\t}",
"public User findById(long id) {\n return store.findById(id);\n }",
"public User getUserData(String id);",
"@Override\n\tpublic User findUserByUserId(long id) {\n\t\treturn userDao.getUserByUserId(id);\n\t}",
"@Override\n public UserInfo findById(int id) {\n TypedQuery<UserInfo> query = entityManager.createNamedQuery(\"findUserById\", UserInfo.class);\n query.setParameter(\"id\", id);\n return query.getSingleResult();\n }",
"public UserTO getUser (String id);",
"public User findUser(int id)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (id == (users.get(i).getId()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public User findUserById (long id){\n if(userRepository.existsById(id)){\n return this.userRepository.findById(id);\n }else{\n throw new UnknownUserException(\"This user doesn't exist in our database\");\n }\n }",
"public static User findById(final String id) {\n return find.byId(id);\n\n }",
"public User getUserById(Long userId);",
"@GetMapping(\"/{id}\")\n public User get(@PathVariable(\"id\") final int id) {\n return userService.get(id);\n }",
"@GetMapping(\"/{id}\")\n\tpublic User getUserById(@PathVariable long id) throws ResourceNotFoundException {\n\t\t\n\t\treturn userRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"User not found for this Id :: \"+id));\n\t\t\n\t}",
"@Override\r\n public Dorm findById(Integer id) {\n return userMapper.findById(id);\r\n }",
"@GetMapping(\"/list/{id}\")\n\tpublic User one(@PathVariable int id) {\n\t\treturn userService.findOne(id);\n\t}",
"public UserModel getUser(Integer id) {\n UserModel userModel = userRepository.findById(id).get();\n return userModel;\n }"
] |
[
"0.8498947",
"0.8476453",
"0.83555573",
"0.83555573",
"0.8294966",
"0.82713556",
"0.8260994",
"0.82565147",
"0.82430416",
"0.82427704",
"0.822458",
"0.81916654",
"0.816067",
"0.8137545",
"0.8109001",
"0.81073654",
"0.8105982",
"0.8090787",
"0.8089314",
"0.80797035",
"0.8077204",
"0.80757034",
"0.8062585",
"0.80431867",
"0.804261",
"0.8041399",
"0.80399776",
"0.80335695",
"0.8026605",
"0.8004542",
"0.79972875",
"0.7980933",
"0.797985",
"0.797707",
"0.7965381",
"0.7953468",
"0.79488176",
"0.79361033",
"0.79346025",
"0.79203236",
"0.7918665",
"0.7916554",
"0.791337",
"0.7903608",
"0.7899762",
"0.78954184",
"0.78907967",
"0.78900754",
"0.7889213",
"0.78882456",
"0.78831005",
"0.7882934",
"0.7882147",
"0.7879568",
"0.78783166",
"0.786824",
"0.78460896",
"0.78416723",
"0.78379834",
"0.7836671",
"0.7833419",
"0.782095",
"0.7814031",
"0.7809676",
"0.77966964",
"0.77954435",
"0.7794858",
"0.7789879",
"0.7788457",
"0.77848655",
"0.7780226",
"0.7776128",
"0.77684283",
"0.77682894",
"0.7765853",
"0.77560806",
"0.77549946",
"0.77506274",
"0.7750091",
"0.7746215",
"0.7738312",
"0.7729644",
"0.7724446",
"0.77234983",
"0.7710397",
"0.77089006",
"0.7706859",
"0.7700105",
"0.7699871",
"0.76918834",
"0.76834595",
"0.7683096",
"0.7676872",
"0.7675701",
"0.7666895",
"0.7664368",
"0.76631504",
"0.7645901",
"0.7642856",
"0.7641376"
] |
0.7903562
|
44
|
Get course members list
|
public static List<User> getCourseMembers(Course course){
List<User> result = new ArrayList<User>();
List<User> usersList = getUsersList();
if((usersList != null) && (course != null) && (course.members_ids != null)){
for(User user : usersList){
if(course.members_ids.contains(user._id)){
result.add(user);
}
}
}
return result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }",
"public ArrayList <Course> getCourseList ()\n\n {\n\n // Returns courseList when called.\n return courseList;\n\n }",
"public List<User> getMembers() {\n return members;\n }",
"public List<String> getMembers() {\n return this.members;\n }",
"public LinkedList<Course> getCourseList() {\n return courseList;\n }",
"public ArrayList getCourses();",
"public ImmutableList<Member> getMembers() {\n return ImmutableList.copyOf(members);\n }",
"@Get\n public String getMembers(){\n ArrayList<String> members = new ArrayList<>();\n try {\n members.addAll(controller.getMembers(getQueryValue(\"id\")));\n }catch(MenuException e){\n System.out.println(e.getMessage());\n }\n return new YaGson().toJson(members, ArrayList.class);\n }",
"public List<Member> members() {\n return list;\n }",
"public static List<Course> createCourseList() {\n List<Course> courses = new ArrayList<Course>();\n courses.add(createCourse(\"12345\"));\n courses.add(createCourse(\"67890\"));\n return courses;\n }",
"@Override\npublic ArrayList<String> courses() {\n\tArrayList<String> studentCourses = new ArrayList<String>();\n\tstudentCourses.add(\"CMPE - 273\");\n\tstudentCourses.add(\"CMPE - 206\");\n\tstudentCourses.add(\"CMPE - 277\");\n\tSystem.out.println(this.name+\" has take these courses\");\n\tfor(int i = 0 ; i < studentCourses.size() ; i++){\n\t\tSystem.out.println( studentCourses.get(i));\n\t}\n\treturn null;\n}",
"public final ArrayList<Account> getMemberList()\n\t{\n\t\treturn members;\n\t}",
"public ArrayList<String> getMembers() {\n if(!members.isEmpty()){\n return new ArrayList(members.keySet());\n }else{\n return null;\n }\n }",
"public List<String> getListCourseId();",
"public List<String> getMemberList()\n\t{\n\t\treturn source.getMemberList();\n\t}",
"public ArrayList<String> getRequestedCourses()\n\t{\n\t\treturn requestedCourses;\n\t}",
"private void listCourses() {\n Call<List<Course>> callListCourses = mService.listCourses(new HashMap<String, String>() {{\n put(\"wstoken\", mToken);\n put(\"wsfunction\", \"core_course_get_courses\");\n put(\"moodlewsrestformat\", \"json\");\n }});\n callListCourses.enqueue(new Callback<List<Course>>() {\n @Override\n public void onResponse(Call<List<Course>> call, Response<List<Course>> response) {\n List<Course> courses = response.body();\n mCourseAdapter.updateCourses(courses);\n }\n\n @Override\n public void onFailure(Call<List<Course>> call, Throwable t) {\n Log.e(\"ListCourses\", t.getMessage());\n }\n });\n }",
"@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }",
"public ArrayList getMembers()\n\t{\n\t\treturn this.members;\n\t}",
"public List<Course> getCourses() {\n\t\tList<Course> courses = new ArrayList<Course>();\n\t\tfor (Registration reg : registrations) {\n\t\t\tcourses.add(reg.getIndex().getCourse());\n\t\t}\n\t\treturn courses;\n\t}",
"public ArrayList<String> getCourseList() {\r\n\t\treturn courseList;\r\n\t}",
"public Collection<AccessUser> getMembers()\n {\n return username_to_profile.values();\n }",
"public ArrayList<Member> getMemberWholeList() {\n\t\t return dao.selectMemberwholeList();\r\n\t}",
"public List<Models.Course> showCourses() {\n List<Models.Course> results = em.createNativeQuery(\"select cr.* from course cr, courseparticipant cpa, participant p where cr.coursecode = cpa.coursecode and cpa.participantid = p.participantid and p.userid = ?\", Models.Course.class).setParameter(1, user.getUserid()).getResultList();\n\n // Display the output\n String output = \"\";\n\n output = addChat(results.size() + \" courses were found.\");\n\n for (Models.Course course : results) {\n output += \"<div class='result display' onclick=\\\"window.location.href='Course?id=\" + course.getCoursecode() + \"'\\\">\\n\"\n + \" <div class='top'>\\n\"\n + \" <img class='icon' src='https://www.flaticon.com/svg/static/icons/svg/717/717874.svg'>\\n\"\n + \" <div class='text'>\\n\"\n + \" <a class='type'>COURSE</a>\\n\"\n + \" <a class='name'>\" + course.getTitle() + \"</a>\\n\"\n + \" <a class='subname'>\" + course.getCoursecode() + \"</a>\\n\"\n + \" </div>\\n\"\n + \" </div>\\n\"\n + \" </div>\";\n }\n\n servlet.putInJsp(\"result\", output);\n return results;\n }",
"Collection<User> getInstructors() throws DataAccessException;",
"public ArrayList<Member> getAllMembers() {\n return memberDAO.getAllMembers();\n }",
"@Override\r\n\tpublic List<Courses> getCourses() {\n\t\treturn coursesdao.findAll();\r\n\t}",
"public ArrayList<Member> getMembers()\n {\n ArrayList<Member> members = new ArrayList<>();\n String sql = \"SELECT [mem_id]\\n\" +\n \" ,[mem_name]\\n \" +\n \" ,[mem_address]\\n\" +\n \" ,[mem_mobile]\\n\" +\n \" ,[mem_registered_date]\\n\" +\n \" ,[mem_active]\\n\" +\n \" FROM [lib_member_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int mem_id = rs.getInt(\"mem_id\");\n String mem_name = rs.getString(\"mem_name\");\n String mem_address = rs.getString(\"mem_address\");\n String mem_mobile = rs.getString(\"mem_mobile\");\n Date mem_registered_date = rs.getDate(\"mem_registered_date\");\n boolean mem_active = rs.getBoolean(\"mem_active\"); \n \n Member s = new Member(mem_id,mem_name, mem_address, mem_mobile, mem_registered_date,mem_active);\n members.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return members;\n }",
"@Override\n\tpublic List<String> getNameOfCourses() {\n\t\tconn = DBUtils.connectToDb();\n\t\tString query = \"select course_name from course;\";\n\t\tst = DBUtils.getStatement(conn);\n\t\tList<String> list = null;\n\t\ttry {\n\n\t\t\trs = st.executeQuery(query);\n\t\t\tif (rs != null) {\n\t\t\t\tlist = new ArrayList<String>();\n\t\t\t\twhile (rs.next())\n\t\t\t\t\tlist.add(rs.getString(1));\n\t\t\t}\n\t\t\tDBUtils.closeConnections();\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 list;\n\t}",
"public List<DN> getMembers() {\n\t\treturn members;\n\t}",
"public List getCoursesToSelect() {\n return coursesToSelect;\n }",
"public List<Course> getAllCourses() {\n return allCourses;\n }",
"public Collection members() {\n return this.<Collection>get(\"members\");\n }",
"@ResponseBody\n @RequestMapping(value=\"/usercourses\", method=RequestMethod.GET)\n public LinkedList<Completed> usersCourses(@RequestParam(\"ID\") String id){\n dbManager.initializeDatabase();\n int ID=Integer.parseInt(id);\n LinkedList<Completed> usersCurrent=dbManager.getUsersCourseList(ID);\n dbManager.closeDatabase();\n return usersCurrent;\n }",
"@GetMapping(\"/courses\")\r\n\tpublic List<Courses> getCourses() {\r\n\t\treturn this.cs.getCourses();\r\n\r\n\t}",
"public static ArrayList<Course> getAll() {\n return courses;\n }",
"public String getMembers() {\r\n \t\tString members = _creator;\r\n \t\tfor (String member : _otherMembersList) {\r\n \t\t\tmembers.concat(\", \" + member);\r\n \t\t}\r\n \t\treturn members;\r\n \t}",
"@Override\n\tpublic List<Course> findAllCourses() {\n\t\tList<Course> list = cd.findAllCourses();\n\t\tif (null == list)\n\t\t\tlist = new ArrayList<Course>();\n\t\treturn list;\n\t}",
"public String[] getCourses();",
"public String getCourses() {\n return courses;\n }",
"public List<XmlsonMember> getMembers() {\n\t\treturn Collections.unmodifiableList(members);\n\t}",
"@Override\n\tpublic List<AdmissionCommiteeMember> viewAllCommiteeMembers() {\n\t\treturn repository.findAll();\n\t}",
"public List peersFromCourse(Course course) throws SQLException {\n List listOfStudents = new ArrayList<>();\n String query = \"SELECT * FROM registration WHERE courseID = \\\"\"\n + retrieveCourseValue(course, \"courseID\") + \"\\\";\";\n Statement myStatement = null;\n ResultSet myResultSet = null;\n\n myStatement = studentConn.createStatement();\n myResultSet = myStatement.executeQuery(query);\n\n while (myResultSet.next()) {\n Student student = convertRegistrationRowToStudent(myResultSet);\n listOfStudents.add(student);\n }\n return listOfStudents;\n }",
"public List<Group> getCourseGroups(Course course);",
"public ArrayList<Entry> getMembers(){\n return members;\n }",
"public List<Course> getCourse() {\n\t\treturn null;\n\t}",
"protected ArrayList<Long> getRoomMembers() {\n\treturn roomMembers;\n }",
"public ArrayList<Course> getCoursesInField(){\r\n\t\treturn CourseFieldController.getFieldCourses(this);\r\n\t}",
"public String[] getMembers(String client, String cisId);",
"public List<Member> selectMemberList(int cPage, int numPerPage) {\n\tConnection conn =getConnection();\n\tList<Member> list=dao.selectMemberList(conn,cPage,numPerPage);\n\tclose(conn);\n\t\n\treturn list;\n\n}",
"public ArrayList<Member> getAllMembers() {\n\t\t\n\t\tArrayList<Member> returnArr = new ArrayList<Member>();\n\t\tfor (Iterator<Member> it = db.iterator(); it.hasNext(); ) {\n\t\t\tMember m = it.next();\n\t\t\treturnArr.add(m);\n\t\t\t\n\t\t}\n\t\t \n\t\treturn returnArr;\n\t}",
"public void listOfCourses() {//admin cagirisa bulunna kurslarin hepsi\n if (Courses.size() != 0) {\n System.out.printf(\"%s kullanicisinin dersleri\\n\", this.getUsername());\n for (int i = 0; i < this.Courses.size(); ++i) {\n System.out.printf(\"%d-%s\\n\", i, Courses.get(i));\n }\n } else {\n System.out.printf(\"%s kullanicinin dersi yok\\n\", this.getUsername());\n }\n }",
"@Override\n\tpublic List<MemberDTO> getListMember() {\n\t\treturn mdao.getListMember();\n\t}",
"List<Member> list(long now);",
"Item[] getMembers() throws AccessManagementException;",
"public ArrayList<Character> getMembers() {\n\t\tArrayList<Character> lista = new ArrayList<Character>();\r\n\t\tfor(Character chr : guildArray) {\r\n\t\t\tlista.add(chr);\r\n\t\t}\r\n\t\treturn lista;\r\n\t}",
"public List<String> getAllMembers() {\n\t\tMap<String, List<String>> dictMap = getDictionary();\n\t\tList<String> resultValues = null;\n\t\tif (dictMap != null && dictMap.isEmpty() != true) {\n\t\t\tresultValues = new ArrayList<String>();\n\t\t\tfor (Map.Entry<String, List<String>> map : dictMap.entrySet()) {\n\t\t\t\tList<String> valueList = map.getValue();\n\t\t\t\tresultValues.addAll(valueList);\n\t\t\t}\n\t\t}\n\t\treturn resultValues;\n\t}",
"java.util.List<java.lang.Long> getParticipantsList();",
"List<User> getMembers(String companyId, String name);",
"public List<CurriculumVO> getCourseCurriculum(int courseID);",
"public String memberList() {\n\treturn roomMembers.stream().map(id -> {\n\t try {\n\t\treturn api.getUserById(id).get().getNicknameMentionTag();\n\t } catch (InterruptedException | ExecutionException e) {\n\t\te.printStackTrace();\n\t }\n\t return \"\";\n\t}).collect(Collectors.joining(\"\\n\"));\n }",
"@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn list;\n\t}",
"public ArrayList<memberjoin> getUserList() {\n\t\treturn Tdao.selectticketList();\r\n\t}",
"@Override\r\n\tpublic List<MemberDTO> list() {\n\t\treturn session.selectList(NAMESPACE+\".list\");\r\n\t}",
"public ArrayList<CrewMember> getCrewMembers() {\r\n\t\treturn crewMembers;\r\n\t}",
"@ResponseBody\n @RequestMapping(value=\"/course/data\", method=RequestMethod.GET)\n public LinkedList<Course> usersCurrent(){\n dbManager.initializeDatabase();\n LinkedList<Course> courseList=dbManager.getCourseList();\n dbManager.closeDatabase();\n return courseList;\n }",
"List<UcMembers> selectByExample(UcMembersExample example);",
"@GetMapping(\"/courses\")\n\tpublic List<Courses> getAllCourses() {\n\t\treturn this.cservice.getAllCourses();\n\t\t//return course;\n\t}",
"public List<Teaching> getInstructorsCourses() throws SQLException {\n\t\tTeaching teaching = null;\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Teaching> teachings = new ArrayList<Teaching>();\n\t\t\n\t\ttry {\n\t\t\tconn = OracleConnection.getConnection();\n stmt = conn.prepareStatement(OracleQueries.GETAllINSTRUCTORFROMTEACHING);\n result = stmt.executeQuery();\n \n while(result != null && result.next()){\n \tteaching = new Teaching();\n \tteaching.setCourse_name(result.getString(1));\n \tteaching.setMinimum_gpa(result.getDouble(2));\n \tteaching.setFull_name(result.getString(3));\n \tteaching.setEmail(result.getString(4));\n \t\n \tteachings.add(teaching);\n }\n\t\t\t\n\t\t} catch (ClassNotFoundException | IOException | SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n result.close();\n if(stmt != null){\n stmt.close();\n }\n if(conn != null){\n conn.close();\n }\n }\n\t\t\n\t\treturn teachings;\t\n\t}",
"public List<String> getMembers() {\n\t\tif(getSettings() == null || getSettings().getStringList(\"regions\") == null) {\n\t\t\treturn new ArrayList<>();\n\t\t}\n\t\treturn getSettings().getStringList(\"regions\");\n\t}",
"@GET\n \tpublic Response listCourses() throws JsonProcessingException {\n \t\tList<Course> courses = ofy().load().type(Course.class).list();\n \t\t\n \t\t// convert to json\n \t\tString json = new ObjectMapper().writeValueAsString(courses);\n \t\treturn Response.ok(Utils.JsonPad + json).build();\n \t}",
"List<CommunityCollectionMember> getMyCommunities(String userId,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;",
"public ArrayList<String> courseList() throws Exception {\n\t\tArrayList<String> courses = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\"select course_name from course\");\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcourses.add(rs.getString(1));\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\treturn courses;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}",
"public List<Contact> getParticipants()\n {\n return new LinkedList<Contact>(participants.values());\n }",
"@Override\r\n\tpublic List<MemberVo> listAll() throws SQLException {\n\t\treturn client.selectList(\"member.listAll\");\r\n\t}",
"@Override\n\tpublic List<Member> getMemberList() {\n\t\treturn null;\n\t}",
"public ArrayList<String> getCourseIds() {\n ArrayList<String> courseIds = new ArrayList<>();\r\n for (int i=0; i < courses.size(); i++) \r\n courseIds.add(courses.get(i).getId());\r\n\r\n return courseIds; \r\n }",
"@Override\r\n\tpublic List<MemberDto> list() {\n\t\treturn jdbcTemplate.query(\"select * from s_member\", mapper);\r\n\t}",
"public List<DataSetMember<t>> getMembers()\n\t{\n\t\treturn _data;\n\t}",
"List<T> membershipRoster(String membershipName);",
"@RequestMapping(\"/courses\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn courseService.getAllCourses();\n\t}",
"public Course[] getCourses() {\n\t\tCourse[] temp = new Course[this.noc];\n\t\t\n\t\tfor(int i = 0; i < this.noc; i++) {\n\t\t\ttemp[i] = this.courseList[i];\n\t\t}\n\t\t\n\t\t\n\t\treturn temp;\n\t}",
"Collection<MCodeMember> getAllSubmittedCodeMembers();",
"public synchronized Membership.MembershipList getMembershipList() {\n Membership.MembershipList.Builder builder = Membership.MembershipList.newBuilder().addMember(localMemberHealth.toMember());\n for (MemberHealth memberHealth : memberHealths) {\n if (!memberHealth.hasLeft() && !memberHealth.hasFailed()) {\n builder.addMember(memberHealth.toMember());\n }\n }\n return builder.build();\n }",
"public CourseMemberGet() {\n\t\tsuper();\n\t}",
"public Stream<Long> members() {\n\treturn roomMembers.stream();\n }",
"List<Course> selectAll();",
"@GetMapping( value = \"/getMembersByAvailability\")\n\tpublic List<Employee> getAllMembers()\n\t{\n\t\treturn this.integrationClient.getAllMembers();\n\t}",
"public java.util.List<java.lang.Long>\n getParticipantsList() {\n return java.util.Collections.unmodifiableList(participants_);\n }",
"public String getStudentsInCourse() {\n String output = \"\"; \n for (Student student : students) { // enhanced for\n output += student.toString() + \"\\n\";\n } // end for\n return output;\n }",
"public List<String> getStudents();",
"public List<CourseType> searchAllCourses(){\n ArrayList<CourseType> courses = new ArrayList<>();\n Connection connection = getConnection();\n if(connection != null){\n try{\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * from Courses\");\n ResultSet resultSet = preparedStatement.executeQuery();\n while (resultSet.next()){\n courses.add(new CourseType(\n \t\tresultSet.getInt(1),\n resultSet.getString(2),\n resultSet.getString(3),\n resultSet.getInt(4),\n resultSet.getInt(5),\n resultSet.getInt(6)));\n }\n }catch (SQLException e){e.printStackTrace();}\n finally {\n closeConnection(connection);\n }\n }\n return courses;\n }",
"@Override\r\n\tpublic List<Member> getAllMember() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tList<Member> list = session.createCriteria(Member.class).list();\r\n\t\treturn list;\r\n\t}",
"List<Member> selectAll();",
"public List<StaffMember> getTeamMembers(){\n\t\tSet<StaffMember> team = teamleader.getDirectSubordinates();\n\t\tStaffMemberIterator iterator = new StaffMemberIterator(team);\n\t\tList<StaffMember> listOfMembers = iterator.listOfStaffMember;\n\t\tlistOfMembers.add(teamleader);\n\t\tCollections.sort(listOfMembers);\n\t\treturn listOfMembers;\n\t}",
"Collection getCommunities();",
"@Override\n\tpublic List<JSONObject> getCommunities(JSONObject params) {\n\t\tList<JSONObject> communities = this.selectList(\"getCommunities\",params);\n\t\tif(communities.size()!=0){\n\t\t\tparams.put(\"communities\", communities);\n\t\t\tList<JSONObject> members = this.selectList(\"selectCommunityMembers\",params);\n\t\t\tMap<String,List<JSONObject>> memberMap = new HashMap();\n\t\t\tfor(JSONObject memberJSON:members){\n\t\t\t\tString communityId = memberJSON.getString(\"communityId\");\n\t\t\t\tList<JSONObject> memberList= memberMap.get(communityId);\n\t\t\t\tif(memberList==null){\n\t\t\t\t\tmemberList = new ArrayList();\n\t\t\t\t\tmemberMap.put(communityId,memberList);\n\t\t\t\t}\n\t\t\t\tmemberList.add(memberJSON);\n\t\t\t}\n\t\t\tfor(JSONObject communityJSON:communities){\n\t\t\t\tString communityId = communityJSON.getString(\"communityId\");\n\t\t\t\tcommunityJSON.put(\"members\", memberMap.get(communityId)==null?new ArrayList():memberMap.get(communityId));\n\t\t\t}\n\t\t}\n\t\treturn communities;\n\t}",
"private static List<Member> extractMembers(HttpResponse response) {\n List<Member> members = new ArrayList<>();\n try {\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Member>>() {\n }.getType();\n members = gson.fromJson(EntityUtils.toString(response.getEntity()), listType);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return members;\n }",
"@Override\n\tpublic List<MemberVO> selectAllMembers() {\n\t\treturn sqlSession.selectList(\"com.coderdy.myapp.member.dao.mapper.MemberMapper.selectAllMembers\");\n\t}"
] |
[
"0.71299267",
"0.69144624",
"0.684058",
"0.67548156",
"0.66682535",
"0.6664069",
"0.664105",
"0.66198856",
"0.6608433",
"0.65325946",
"0.65291363",
"0.64848864",
"0.6482083",
"0.64787203",
"0.64543825",
"0.6448942",
"0.64321893",
"0.6428496",
"0.64269465",
"0.6424699",
"0.63915503",
"0.63882685",
"0.6388131",
"0.63850003",
"0.63849556",
"0.63444674",
"0.6343619",
"0.6339674",
"0.6339312",
"0.6329104",
"0.63014215",
"0.6299168",
"0.62799513",
"0.6250239",
"0.62235016",
"0.6219255",
"0.6213658",
"0.6210215",
"0.62090373",
"0.6201056",
"0.61803985",
"0.617292",
"0.6170373",
"0.6168218",
"0.6165637",
"0.61637723",
"0.6160645",
"0.61537033",
"0.6142767",
"0.6129234",
"0.6127358",
"0.61249614",
"0.6124397",
"0.6118802",
"0.6110549",
"0.6102286",
"0.6089354",
"0.6084207",
"0.60819656",
"0.60700667",
"0.6061239",
"0.6059188",
"0.60507166",
"0.6047986",
"0.6046169",
"0.6033637",
"0.60205394",
"0.6012825",
"0.6012053",
"0.5978789",
"0.5973403",
"0.5971845",
"0.5961765",
"0.5959157",
"0.5955421",
"0.59364074",
"0.5923458",
"0.59019166",
"0.58976424",
"0.5881115",
"0.5880449",
"0.58696604",
"0.5865216",
"0.5855491",
"0.5833369",
"0.58314246",
"0.5828723",
"0.5826758",
"0.5821242",
"0.58098096",
"0.5808336",
"0.58063036",
"0.5799119",
"0.57985884",
"0.579834",
"0.57941914",
"0.5792358",
"0.5787642",
"0.578653",
"0.5775337"
] |
0.76833886
|
0
|
Once the sell by date has passed, Quality degrades twice as fast
|
@Test
void sellingDatePast() {
int originalQuality = 10;
Item[] items = new Item[]{
new Item("single", 5, originalQuality),
new Item("double", -1, originalQuality)
};
GildedRose app = new GildedRose(items);
app.updateQuality();
assertEquals("single", app.items[0].name);
assertTrue(originalQuality > app.items[0].quality, "Quality should've dropped");
assertEquals(originalQuality - 1, app.items[0].quality, "Quality should've dropped regularly");
assertEquals("double", app.items[1].name);
assertTrue(originalQuality > app.items[1].quality, "Quality should've dropped");
assertEquals(originalQuality - 2, app.items[1].quality, "Quality should've dropped twice as much");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"public void sell() {\n for (Company x : _market.getCompanies()) {\n if (x.getRisk() > _confidence || x.numLeft() < 3 || x.getRisk() < _confidence - 15){\n if (_stocks.get(x) == 1) {\n _stocks.remove(x);\n } else {\n _stocks.put(x, _stocks.get(x) - 1);\n }\n _money += x.getPrice();\n x.gain();\n break;\n } else {\n _happy = true;\n }\n }\n }",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"@Test\n void agedBrie() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Aged Brie\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"Aged Brie\", app.items[0].name, \"Item name should match expected\");\n assertTrue(originalSellIn > app.items[0].sellIn, \"sellIn date should decrease in value\");\n assertTrue(originalQuality < app.items[0].quality, \"Quality of \\\"Aged Brie\\\" should increase\");\n }",
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Override \n\tpublic TradeAction tick(double price) {\n\t\tma10before=average(priceQ10);\n\t\t\n\t\tif (priceQ10.size()<10)\n\t\t{\n\t\t\tpriceQ10.offer(price);\n\t\t}\n\t\tif(priceQ10.size()==10)\n\t\t{\n\t\t\tpriceQ10.poll();\n\t\t\tpriceQ10.offer(price);\t\t\n\t\t}\n\t\t\n\t\t ma10after=average(priceQ10);\n\t\t \n\t\t// 60 days moving average\n\t\tma60before=average(priceQ60);\n\t\tif (priceQ60.size()<60)\n\t\t{\n\t\t\tpriceQ60.offer(price);\n\t\t}\n\t\tif(priceQ60.size()==60)\n\t\t{\n\t\t\tpriceQ60.poll();\n\t\t\tpriceQ60.offer(price);\t\t\n\t\t}\n\t\tma60after=average(priceQ60);\n\t\t\t\n\t\t//buy when its 10 day moving average goes above the 60 day moving average\n\t\tif((ma10before < ma60before) & (ma10after > ma60after))\n\t\t{\n\t\t\tprofit = profit - price;\n\t\t\t//System.out.println(\"buy\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==1){\n\t\t\t\tmark=-1;\n\t\t\t\treturn TradeAction.BUY;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\n\t\t}\n\t\t//buy when its 10 day moving average goes below the 60 day moving average\n\t\tif((ma10before > ma60before) & (ma10after < ma60after))\n\t\t{\n\t\t\tprofit = profit + price;\n\t\t\t//System.out.println(\"sell\");\n\t\t\t//System.out.println(\"profit is\");\n\t\t\t//System.out.println(profit);\n\t\t\tif(mark==-1){\n\t\t\t\tmark=1;\n\t\t\t\treturn TradeAction.SELL;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn TradeAction.DO_NOTHING;\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TradeAction.DO_NOTHING;\t\t\t\n\t\t}\n\n\t}",
"@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }",
"@Test\n public void HappyDailyIncomeForStore(){\n Integer productID1 = store.getProductID(\"computer\");\n tradingSystem.AddProductToCart(NconnID, storeID, productID1, 3);\n tradingSystem.subscriberPurchase(NofetID, NconnID, \"123456789\", \"4\",\"2022\" , \"123\", \"123456789\", \"Rager 101\",\"Beer Sheva\",\"Israel\",\"8458527\");\n\n Double dailyIncome = store.getDailyIncome();\n assertEquals(dailyIncome, 9000.0);\n }",
"private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }",
"private void givenExchangeRateExistsForABaseAndDate() {\n }",
"private void buy() {\n if (asset >= S_I.getPirce()) {\n Item item = S_I.buy();\n asset -= item.getPrice();\n S_I.setAsset(asset);\n } else {\n System.out.println(\"cannot afford\");\n }\n }",
"private void lowPrice(Food food, Date currentDate) {\n if (food.getShelfLifeOfProductInPercent(currentDate) > START_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE\n && food.getShelfLifeOfProductInPercent(currentDate) <= END_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE) {\n food.setPriceByDiccount();\n }\n }",
"@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }",
"@Test\n void backstagePasses() {\n String name = \"Backstage passes to a TAFKAL80ETC concert\";\n int originalQuality = 10;\n int[] sellDates = new int[]{-1, 10, 5};\n int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};\n\n Item[] items = new Item[]{\n new Item(name, sellDates[0], originalQuality),\n new Item(name, sellDates[1], originalQuality),\n new Item(name, sellDates[2], originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(targetQuality[i], app.items[i].quality, \"Quality must be altered correctly\");\n }\n }",
"@Test\n void legendaryItems() {\n int[] sellDates = new int[]{-5, 0, 5};\n Item[] items = new Item[]{\n new Item(\"Sulfuras, Hand of Ragnaros\", sellDates[0], 80),\n new Item(\"Sulfuras, Hand of Ragnaros\", sellDates[1], 80),\n new Item(\"Sulfuras, Hand of Ragnaros\", sellDates[2], 80)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(80, app.items[i].quality, \"Quality should be fixed\");\n assertEquals(sellDates[i], app.items[i].sellIn, \"SellIn dates should remain the same\");\n }\n }",
"@Override\n public void sell(double limitPrice, int quantity) {\n Boolean allSold = false;\n Iterator iter1 = buyOrders.entrySet().iterator();\n while(iter1.hasNext()) {\n HashMap.Entry entry = (HashMap.Entry)iter1.next();\n if(limitPrice <= (Double)entry.getKey()) {\n if(quantity < (Integer)entry.getValue()) {\n allSold = true;\n buyOrders.put((Double)entry.getKey(),(Integer)entry.getValue()-quantity) ;\n quantity =0;\n break;\n }\n }\n }\n if(!allSold){\n if(sellOrders.containsKey(limitPrice)) sellOrders.put(limitPrice,sellOrders.get(limitPrice) + quantity);\n else sellOrders.put(limitPrice,quantity);\n }\n cleanUp();\n\n\n }",
"@Override\r\n public double searchProduct(ProductInput productInput) {\r\n\r\n LocalDate Date1= productInput.getAvailDate();\r\n LocalDate Date2= Date1.plusDays(10);\r\n\r\n double quantity= 0;\r\n if(Date1.isAfter(LocalDate.of(2021,03,18)) && Date1.isBefore(LocalDate.of(2021,03,31)))\r\n {\r\n for(Product i:InventoryList)\r\n {\r\n LocalDate Date3= i.getAvailDate();\r\n if(Date3.isAfter(Date1.minusDays(1)) && Date3.isBefore(Date2.plusDays(1)))\r\n {\r\n quantity= quantity + i.getAvailQty();\r\n }\r\n }\r\n return quantity;\r\n }\r\n else\r\n return quantity;\r\n }",
"public void dailyInventoryCheck(){\n\n\t\tint i;\n\t\tStock tempStock, tempRestockTracker;\n\t\tint listSizeInventory = this.inventory.size();\n\t\tfor(i = 0; i < listSizeInventory; i++){\n\n\t\t\t\tif(this.inventory.get(i).getStock() == 0){\n\t\t\t\t\t//If stock is 0 add 1 to the out of stock counnter then reset it to the inventory level\n\t\t\t\t\tthis.inventory.get(i).setStock(inventoryLevel);\n\t\t\t\t\tthis.inventoryOrdersDone.get(i).addStock(1);\n\t\t\t\t\t//inventoryOrdersDone.set(i,tempRestockTracker);\n\t\t\t\t\t//tempStock.setStock(inventoryLevel);\n\t\t\t\t\t//this.inventory.set(i,tempStock);\n\t\t\t\t}\n\t\t\t}\n\n\t}",
"@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\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\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}",
"public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }",
"@Test //loop test 2 passes\n\tpublic void testLoop2pass() {\n\t\t//create an inn, add two items, and simulate one day\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", 0, 80));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the second set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(1).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Failed quality for Sulfuras\", 80, quality);\n\t}",
"public void testGetExchangeRateForCurrencyAndDate() {\n final String destinationCurrency = \"EUR\";\n final String sourceCurrency = \"GBP\";\n final Calendar conversionDate = Calendar.getInstance();\n conversionDate.set(Integer.valueOf(\"2005\"), Integer.valueOf(\"3\"), Integer.valueOf(\"2\"));\n \n final ExchangeRateUtil exchangeRateUtilities =\n new ExchangeRateUtil(true, destinationCurrency);\n exchangeRateUtilities.loadExchangeRatesFromCurrency(sourceCurrency);\n \n final double factor =\n exchangeRateUtilities.getExchangeRateForCurrencyAndDate(sourceCurrency,\n ExchangeRateType.BUDGET, conversionDate.getTime());\n \n assertEquals(\"1.41\", String.valueOf(factor));\n }",
"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 int computeFine(int today);",
"private void checkDutchAuctions() {\n TypedQuery<Auction> namedQuery = getAuctionByTypeQuery(AuctionType.DUTCH);\n\n List<Auction> resultList = namedQuery.getResultList();\n for (Auction auction : resultList) {\n\n List<Bidder> bidder = auction.getBidder();\n if (bidder.size() > 1\n && auction.getPrice().subtract(dutchAuctionSubtrahent).intValue() > 0) {\n auction.setPrice(\n new BigDecimal(\n String.valueOf(auction.getPrice().subtract(dutchAuctionSubtrahent))));\n }\n }\n }",
"private BigDecimal getStock(Producto producto, Bodega bodega, Date fechaDesde, Date fechaHasta)\r\n/* 48: */ {\r\n/* 49:74 */ BigDecimal stock = BigDecimal.ZERO;\r\n/* 50:75 */ for (InventarioProducto inventarioProducto : this.servicioInventarioProducto.obtenerMovimientos(producto.getIdOrganizacion(), producto, bodega, fechaDesde, fechaHasta)) {\r\n/* 51:77 */ if (inventarioProducto.getOperacion() == 1) {\r\n/* 52:78 */ stock = stock.add(inventarioProducto.getCantidad());\r\n/* 53:79 */ } else if (inventarioProducto.getOperacion() == -1) {\r\n/* 54:80 */ stock = stock.subtract(inventarioProducto.getCantidad());\r\n/* 55: */ }\r\n/* 56: */ }\r\n/* 57:83 */ return stock;\r\n/* 58: */ }",
"public void liquidarEmpleado(Fecha fechaLiquidacion) {\n //COMPLETE\n double prima=0; \n boolean antiguo=false;\n double aniosEnServicio=fechaLiquidacion.getAnio()-this.fechaIngreso.getAnio();\n if(aniosEnServicio>0&&\n fechaLiquidacion.getMes()>this.fechaIngreso.getMes())\n aniosEnServicio--; \n \n //System.out.println(\"A:\"+aniosEnServicio+\":\"+esEmpleadoLiquidable(fechaLiquidacion));\n if(esEmpleadoLiquidable(fechaLiquidacion)){\n this.descuentoSalud=salarioBase*0.04;\n this.descuentoPension=salarioBase*0.04;\n this.provisionCesantias=salarioBase/12;\n if(fechaLiquidacion.getMes()==12||fechaLiquidacion.getMes()==6)\n prima+=this.salarioBase*0.5; \n if(aniosEnServicio<6&&\n fechaLiquidacion.getMes()==this.fechaIngreso.getMes())prima+=((aniosEnServicio*5)/100)*this.salarioBase;\n if(aniosEnServicio>=6&&fechaLiquidacion.getMes()==this.fechaIngreso.getMes()) prima+=this.salarioBase*0.3;\n\n this.prima=prima;\n this.setIngresos(this.salarioBase+prima);\n \n this.setDescuentos(this.descuentoSalud+this.descuentoPension);\n this.setTotalAPagar(this.getIngresos()-this.getDescuentos());\n }\n\n }",
"public Double getRawGross(java.sql.Timestamp transDate, java.sql.Timestamp eodDate, int storeCode) {\r\n\t\tString query = \"SELECT SUM(i.SELL_PRICE*i.QUANTITY) FROM invoice_item i, invoice o WHERE o.TRANS_DT >= ? AND o.TRANS_DT <= ? AND i.OR_NO = o.OR_NO AND i.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = ?\"\r\n\t\t+ \" AND NOT EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n\t\tPreparedStatement pquery;\r\n\t\tResultSet rs = null;\r\n\t\tDouble dailySale = 0.0d;\r\n\t\ttry {\r\n\t\t\tpquery = Main.getDBManager().getConnection().prepareStatement(query);\r\n\t\t\t\r\n\t\t\tpquery.setTimestamp(1, transDate);\r\n\t\t\tpquery.setTimestamp(2, eodDate);\r\n\t\t\tpquery.setInt(3, storeCode);\r\n\t\t\tlogger.debug(\"TRANS DATE BEFORE\"+transDate.toLocaleString());\r\n\t\t\tlogger.debug(\"TRANS DATE BEFORE\"+eodDate.toLocaleString());\r\n\t\t\t\r\n\t\t\trs = pquery.executeQuery();\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n//\t\t\t\tdouble amount = rs.getDouble(1);\r\n//\t\t\t\tdailySale = amount/getVatRate();\r\n\t\t\t\tdailySale = rs.getDouble(1);\r\n\t\t\t\tlogger.debug(\"Raw Gross BEFORE SUBTRACTION: \"+dailySale);\r\n\t\t\t\t// SUBTRACT all returned items\r\n\t\t\t\tdailySale = dailySale - getDeductibles(transDate, eodDate, storeCode) + getCompletedTransactions(transDate, eodDate, storeCode);\r\n\t\t\t\tlogger.debug(\"Raw Gross AFTER RETURNED SUBTRACTION: \"+dailySale);\r\n\t\t\t\treturn dailySale;\r\n\t\t\t}\r\n\t\t} catch (SQLException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\treturn dailySale;\r\n\r\n\t}",
"public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }",
"public void update() \n\t{\n\t\tString inst = \"\";\n\t\tfloat cash = getCash();\n\t\tfloat quantity = getPosition(inst);\n\t\tfloat price = getPrice(inst);\n\n\t\t_data.add(new Float(price));\n\t\t\n\t\tif (_data.size() > _period)\n\t\t{\n\t\t\t_data.remove(0);\n\t\t\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\t\n\t\t\tfor (int i = 0; i < _data.size(); i++)\n\t\t\t{\n\t\t\t\tFloat value = (Float)_data.get(i);\n\t\t\t\t\n\t\t\t\tif (value.floatValue() > max)\n\t\t\t\t{\n\t\t\t\t\tmax = value.floatValue();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.floatValue() < min)\n\t\t\t\t{\n\t\t\t\t\tmin = value.floatValue();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfloat buylevel = min + (min * _minwin);\n\t\t\tfloat sellevel = max - (max * _maxloss);\n\t\t\tfloat sellevel2 = min + (min * _maxwin);\n\t\t\t\n\t\t\t// if price has risen by min win\n\t\t\t// but is below maximum win and\n\t\t\t// below maximum loss then buy\n\t\t\tif (price > buylevel && \n\t\t\t\t\tprice < sellevel2 &&\n\t\t\t\t\tbuylevel < sellevel &&\n\t\t\t\t\tprice > _previous)\n\t\t\t{\n\t\t\t\tif (cash > 0) \n\t\t\t\t{\n\t\t\t\t\taddAmountOrder(inst, cash);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (price < sellevel &&\n\t\t\t\t\tbuylevel > sellevel &&\n\t\t\t\t\tprice < _previous)\n\t\t\t{\n\t\t\t\tif (quantity > 0)\n\t\t\t\t{\n\t\t\t\t\taddQuantityOrder(inst, -quantity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (price > sellevel2 &&\n\t\t\t\t\tprice > _previous)\n\t\t\t{\n\t\t\t\tif (quantity > 0)\n\t\t\t\t{\n\t\t\t\t\taddQuantityOrder(inst, -quantity);\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t_data.remove(0);\n\t\t}\n\t\t\n\t\t_previous = price;\n\t}",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"double getStockCostBasis(String date) throws IllegalArgumentException;",
"double getStockValue(String date) throws IllegalArgumentException;",
"public void fundClosed(int time, int yourRevenue, int partnerRevenue) {\n /* Do nothing */\n }",
"public void claimDollars() {\n if (totalSpent >= 5000) {\n airlineDollars += ( ((totalSpent - (totalSpent % 5000)) / 5000) * 400);\n totalSpent = totalSpent % 5000;\n }\n }",
"public void changeStockVal() {\n double old = _stockVal;\n _stockVal = 0;\n for (Company x : _stocks.keySet()) {\n _stockVal += x.getPrice() * _stocks.get(x);\n }\n _stockValChanged = _stockVal - old;\n\n }",
"public abstract double calculateQuarterlyFees();",
"@Test\n public void testSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"Chisom\", 2, 2, 2,\n 2, SolarSystems.SOMEBI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n good.getGood().sell(good.getGood(), 1);\n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n water.setQuantity(2);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n food.setQuantity(1);\n good.setQuantity(0);\n int P = good.getGood().getPrice(1);\n int total = game.getPlayer().getCredits();\n boolean quan = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(total);\n assertTrue(quan && total == 1560);\n //assertEquals(true, quan && total == 1560);\n }",
"double getYesterdaysExpenditureAmount() {\n Long time = new Date().getTime();\n Date date = new Date(time - time % (DAY_DURATION));\n return getExpenditureAmount(date.getTime() - DAY_DURATION, date.getTime());\n }",
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}",
"private void trade_shortsell() {\n\t\ttext_code.setText(code);\n\t\t\n\t\tDecimalFormat df=new DecimalFormat(\"#.00\");\n\t\ttext_uprice.setText(df.format(Double.parseDouble(information[2])*1.1) );//涨停价\n\t\t\n\t\ttext_downprice.setText(df.format(Double.parseDouble(information[2])*0.9));//跌停价\n\t\t\n\t\t//getfundown().setText(homepage.get_table_userinfo().getItem(1).getText(1));//可用资金\n\t\t\n\t\t//double d1 = Double.parseDouble(homepage.get_table_userinfo().getItem(1).getText(1));\n\t\t//double d2 = Double.parseDouble(information[3]);\n\t\t//text_limitnum.setText(Integer.toString( (int)(d1/d2) ) );//可卖数量\n\t\t\n\n\t}",
"public void test_varyingQueryUpdate_SelfCalculation_DreamCruise_plain() {\n // ## Arrange ##\n Purchase purchase = new Purchase();\n purchase.setPaymentCompleteFlg_True();\n\n PurchaseCB cb = new PurchaseCB();\n cb.query().setPaymentCompleteFlg_Equal_True();\n\n try {\n final List<SqlLogInfo> infoList = new ArrayList<SqlLogInfo>();\n CallbackContext.setSqlLogHandlerOnThread(new SqlLogHandler() {\n public void handle(SqlLogInfo info) {\n infoList.add(info);\n }\n });\n // ## Act ##\n PurchaseCB dreamCruiseCB = cb.dreamCruiseCB();\n UpdateOption<PurchaseCB> option = new UpdateOption<PurchaseCB>();\n option.self(new SpecifyQuery<PurchaseCB>() {\n public void specify(PurchaseCB cb) {\n cb.specify().columnPurchasePrice();\n }\n }).multiply(dreamCruiseCB.specify().columnPurchaseCount());\n int updatedCount = purchaseBhv.varyingQueryUpdate(purchase, cb, option);\n\n // ## Assert ##\n assertNotSame(0, updatedCount);\n assertHasOnlyOneElement(infoList);\n SqlLogInfo info = infoList.get(0);\n String sql = info.getDisplaySql();\n assertTrue(sql.contains(\"set PURCHASE_PRICE = PURCHASE_PRICE * PURCHASE_COUNT\"));\n assertTrue(sql.contains(\", VERSION_NO = VERSION_NO + 1\"));\n } finally {\n CallbackContext.clearSqlLogHandlerOnThread();\n }\n }",
"@Override\n public void buy(double limitPrice, int quantity) {\n Boolean allBought = false;\n Iterator iter1 = sellOrders.entrySet().iterator();\n while(iter1.hasNext()) {\n HashMap.Entry entry = (HashMap.Entry) iter1.next();\n if(limitPrice >= (Double)entry.getKey()) {\n if(quantity <= (Integer)entry.getValue()) {\n allBought = true;\n sellOrders.put((Double)entry.getKey(),(Integer)entry.getValue()-quantity) ;\n }\n else {\n quantity = quantity - (Integer)entry.getValue();\n sellOrders.put((Double)entry.getKey(),0);\n }\n }\n\n }\n if(!allBought) {\n\n if (buyOrders.containsKey(limitPrice))\n buyOrders.put(limitPrice, buyOrders.get(limitPrice) + quantity);\n else\n buyOrders.put(limitPrice, quantity);\n }\n cleanUp();\n\n }",
"boolean applyPrice(int asOfDate, boolean makeCurrent) {\n if (newPrice == null || newPrice.doubleValue() == 0) {\n updateCurrentPrice();\n return false;\n }\n \n security.setSnapshotInt(asOfDate, 1 / Util.safeRate(newPrice), relativeCurrency).syncItem();\n if (makeCurrent) {\n if(relativeCurrency!=null && !relativeCurrency.equals(currencyTable.getBaseType())) {\n double viewRateMult = CurrencyUtil.getUserRate(relativeCurrency,\n currencyTable.getBaseType());\n newPrice *= viewRateMult;\n }\n security.setUserRate(1.0/newPrice);\n security.setParameter(\"price_date\", System.currentTimeMillis());\n security.syncItem();\n }\n newPrice = null;\n updateCurrentPrice();\n return true;\n }",
"public static void main(String[] args) {\r\n\t Scanner in = new Scanner(System.in);\r\n\t int d1 = in.nextInt();\r\n\t int m1 = in.nextInt();\r\n\t int y1 = in.nextInt();\r\n\t int d2 = in.nextInt();\r\n\t int m2 = in.nextInt();\r\n\t int y2 = in.nextInt();\r\n\t LocalDate returnDate=LocalDate.of(y1,m1,d1);\r\n\t LocalDate dueDate=LocalDate.of(y2,m2,d2);\r\n\t long fine=0;\r\n\t if(returnDate.isBefore(dueDate)||returnDate.equals(dueDate))fine=0;\r\n\t else if(returnDate.isAfter(dueDate)){\r\n\t \tif(returnDate.getYear()==dueDate.getYear()){\r\n\t \t\tif(returnDate.getMonth()==dueDate.getMonth()){\r\n\t \t\t\tfine=(returnDate.getDayOfYear()-dueDate.getDayOfYear())*15;\r\n\t \t\t}else{\r\n\t \t\t\t\tfine=(returnDate.getMonthValue()-dueDate.getMonthValue())*500;\r\n\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \t\t\r\n\t } else fine=10000;\r\n\t }else fine=10000;\r\n\t System.out.println(fine);\r\n\t }",
"public void removeAfterDate(Date d) {\n for (int i = 0; i < this._noOfItems; i++) {\n FoodItem currentItem = this._stock[i];\n // if item's expiry date before the date param\n if (currentItem.getExpiryDate().before(d)) {\n // remove it from the stock\n removeAtIndex(i);\n // because an item was removed from [i], we'd like to stay in same indexer\n // (because all items are \"shifted\" back in the array)\n i--;\n }\n }\n }",
"public double MakeReserve(String type, LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n return 0.0;\r\n //Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n return 0.0;\r\n \r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = false;\r\n if (type.equals(roomtypes.get(i).roomname))\r\n {\r\n ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n ispossible = false;\r\n } \r\n }\r\n if (ispossible)\r\n {\r\n for (int j = first; j < last; j++)\r\n roomtypes.get(i).reserved[j]++;\r\n return roomtypes.get(i).roomlist.get(0).getPrice();\r\n }\r\n }\r\n return 0.0;\r\n }",
"void buyStock(String portfolio, String stock, Integer count, Date date)\r\n throws IllegalArgumentException;",
"private void calculateDebtDistribution() {\n calculateDebtDistribution(false);\n }",
"public double getStockFinal(long pv) {\n float entree = 0 ;\n float sortie = 0 ;\n\n ArrayList<Produit> produits = null ;\n if (pv==0) produits = produitDAO.getAll();\n else produits = produitDAO.getAllByPv(pv) ;\n\n ArrayList<Mouvement> mouvements = null;\n\n double valeur = 0 ;\n double total = 0 ;\n double quantite = 0 ;\n double cmpu = 0 ;\n double restant = 0 ;\n double qsortie = 0 ;\n double qentree = 0 ;\n // Vente par produit\n Mouvement mouvement = null ;\n Operation operation = null ;\n\n for (int i = 0; i < produits.size(); i++) {\n try {\n mouvements = mouvementDAO.getManyByProductInterval(produits.get(i).getId_externe(),DAOBase.formatter2.parse(datedebut),DAOBase.formatter2.parse(datefin)) ;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (mouvements != null){\n valeur = 0 ;\n quantite = 0 ;\n restant = 0 ;\n qentree = 0 ;\n cmpu = 0 ;\n qsortie = 0 ;\n\n for (int j = 0; j < mouvements.size(); j++) {\n mouvement = mouvements.get(j) ;\n operation = operationDAO.getOne(mouvement.getOperation_id()) ;\n if (operation==null || (operation.getAnnuler()==1 && operation.getDateannulation().before(new Date())) || operation.getTypeOperation_id().startsWith(OperationDAO.CMD)) continue;\n\n //if (pv!=0 && caisseDAO.getOne(operation.getCaisse_id()).getPointVente_id()!=pv) continue;\n if (j==0)\n if (mouvement.getRestant()==mouvement.getQuantite() && mouvement.getEntree()==0){\n restant = 0 ;\n }\n else restant = mouvement.getRestant() ;\n\n if (mouvement.getEntree()==0) {\n valeur -= mouvement.getPrixA() * mouvement.getQuantite() ;\n qentree += mouvement.getQuantite() ;\n cmpu = mouvement.getPrixA() ;\n }\n else {\n valeur += mouvement.getCmup() * mouvement.getQuantite() ;\n qsortie += mouvement.getQuantite() ;\n }\n /*\n if (restant!=0) cmpu = valeur / restant ;\n else cmpu = mouvement.getCmup() ;\n */\n }\n\n quantite = restant + qentree - qsortie ;\n total+=Math.abs(valeur) ;\n }\n }\n\n return total;\n }",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"void stockPriceChanged(Stock stock, double oldValue, double newValue);",
"public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }",
"public void setActualSellingTime(Date actualSellingTime) {\n this.actualSellingTime = actualSellingTime;\n }",
"public TransationRecords sellProduct(String species, int number) {\n HashMap<String , List<HashMap<String,String >>> productInfo = new HashMap<>();\n productInfo = productList.getProductInfo();\n if (species.equals(\"CHICKEN\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.chickenList.size(); i++) {\n if (productList.chickenList.get(i).getLifestage() == Animal.LifeStage.ADULT) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.chickenList.size(); i++) {\n int value = new Chicken().getSellValue();\n if (productList.chickenList.get(i).getLifestage() == Animal.LifeStage.ADULT) {\n hasSoldNumber++;\n productList.chickenList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"CHICKEN\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n } else if (species.equals(\"DOG\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.dogList.size(); i++) {\n if (productList.dogList.get(i).getLifestage() == Animal.LifeStage.ADULT) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.dogList.size(); i++) {\n int value = new Dog().getSellValue();\n if (productList.dogList.get(i).getLifestage() == Animal.LifeStage.ADULT) {\n hasSoldNumber++;\n productList.dogList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"DOG\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n } else if (species.equals(\"PERCH\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.perchList.size(); i++) {\n if (productList.perchList.get(number).getLifestage() == Animal.LifeStage.ADULT) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.perchList.size(); i++) {\n int value = new Perch().getSellValue();\n if (productList.perchList.get(i).getLifestage() == Animal.LifeStage.ADULT) {\n hasSoldNumber++;\n productList.perchList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"PERCH\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n } else if (species.equals(\"APPLE\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.appleList.size(); i++) {\n if (productList.appleList.get(i).getPlantState().equals(\"Harvestable\")) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.appleList.size(); i++) {\n int value = new Apple().getSellValue();\n if (productList.appleList.get(i).getPlantState().equals(\"Harvestable\")) {\n hasSoldNumber++;\n productList.appleList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"APPLE\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n } else if (species.equals(\"CHERRY\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.cherryList.size(); i++) {\n if (productList.cherryList.get(i).getPlantState().equals(\"Harvestable\")) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.cherryList.size(); i++) {\n int value = new Cherry().getSellValue();\n if (productList.cherryList.get(i).getPlantState().equals(\"Harvestable\")) {\n hasSoldNumber++;\n productList.cherryList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"CHERRY\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n } else if (species.equals(\"POTATO\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.potatoList.size(); i++) {\n if (productList.potatoList.get(i).getPlantState().equals(\"Harvestable\")) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.potatoList.size(); i++) {\n int value = new Potato().getSellValue();\n if (productList.potatoList.get(i).getPlantState().equals(\"Harvestable\")) {\n hasSoldNumber++;\n productList.potatoList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"POTATO\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n } else if (species.equals(\"TOMATO\")) {\n int numberBeSold = 0;\n for (int i = 0; i < productList.tomatoList.size(); i++) {\n if (productList.tomatoList.get(i).getPlantState().equals(\"Harvestable\")) {\n numberBeSold++;\n }\n }\n if (numberBeSold < number) {\n System.out.println(\"Exceeding the maximum quantity available for sale!\");\n return emptyRecords;\n }\n int hasSoldNumber = 0;\n for (int i = 0; i < productList.tomatoList.size(); i++) {\n int value = new Tomato().getSellValue();\n if (productList.tomatoList.get(i).getPlantState().equals(\"Harvestable\")) {\n hasSoldNumber++;\n productList.tomatoList.remove(i);\n this.farmOwner.addMoney(value);\n }\n if (hasSoldNumber == number) {\n return new TransationRecords(\"TOMATO\", TransationRecords.SellOrBuy.SELL,\n number, value, (int) this.farmOwner.getMoney(), productInfo);\n }\n }\n }\n return emptyRecords;\n }",
"public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }",
"private void analyzeStocks(JSONArray stockArray){\n\t\tbuyArray = new JSONArray();\n\t\tsellArray = new JSONArray();\n\n\t\tfor(int a = 0; a < stockArray.length(); a++){\n\n\t\t\t// Some objects dont always have correct values\n\t\t\tif (!stockArray.getJSONObject(a).isNull(\"DividendYield\") \n\t\t\t\t\t&& !stockArray.getJSONObject(a).isNull(\"FiftydayMovingAverage\")\n\t\t\t\t\t&& !stockArray.getJSONObject(a).isNull(\"Bid\")\n\t\t\t\t\t&& !stockArray.getJSONObject(a).isNull(\"PERatio\")){\n\n\n\n\t\t\t\tdouble fiftyDayAvg = stockArray.getJSONObject(a).getDouble(\"FiftydayMovingAverage\");\n\t\t\t\tdouble bid = stockArray.getJSONObject(a).getDouble(\"Bid\");\n\t\t\t\tdouble divYield = stockArray.getJSONObject(a).getDouble(\"DividendYield\");\n\t\t\t\tdouble peRatio = stockArray.getJSONObject(a).getDouble(\"PERatio\");\n\n\t\t\t\t//Parse Market Cap - form: 205B (int)+(string)\n\t\t\t\tString marketCap = stockArray.getJSONObject(a).getString(\"MarketCapitalization\");\n\t\t\t\tString marketCapSuf = marketCap.substring(marketCap.length()-1);\n\t\t\t\tdouble marketCapAmt = Double.parseDouble(marketCap.substring(0, marketCap.length()-1));\n\t\t\t\tmarketCapAmt = marketCapAmt*suffixes.get(marketCapSuf);\n\n\t\t\t\t//Large checks\n\t\t\t\tif(marketCapAmt >= (10*suffixes.get(\"B\"))){\n\t\t\t\t\tif((bid < fiftyDayAvg*largefiftyWeekPercBuy)\t\t\t//Buy\n\t\t\t\t\t\t\t&& (divYield > largeYield) \n\t\t\t\t\t\t\t&& (peRatio < largePEBuy)){\n\n\t\t\t\t\t\tbuyArray.put(stockArray.getJSONObject(a));\n\t\t\t\t\t}\n\t\t\t\t\telse if((bid > fiftyDayAvg*largefiftyWeekPercSell)\t\t//Sell\n\t\t\t\t\t\t\t&& (peRatio > largePESell)){\n\n\t\t\t\t\t\tsellArray.put(stockArray.getJSONObject(a));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Medium checks\n\t\t\t\telse if(marketCapAmt >= (2*suffixes.get(\"B\"))){\t\n\t\t\t\t\tif((bid < fiftyDayAvg*medfiftyWeekPercBuy)\t\t\t\t//Buy\n\t\t\t\t\t\t\t&& (divYield > medYield) \n\t\t\t\t\t\t\t&& (peRatio < medPEBuy)){\n\n\t\t\t\t\t\tbuyArray.put(stockArray.getJSONObject(a));\n\t\t\t\t\t}\n\t\t\t\t\telse if((bid > fiftyDayAvg*medfiftyWeekPercSell)\t\t//Sell\n\t\t\t\t\t\t\t&& (peRatio > medPESell)){\n\n\t\t\t\t\t\tsellArray.put(stockArray.getJSONObject(a));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Small\tchecks\n\t\t\t\telse if(marketCapAmt >= (300*suffixes.get(\"M\"))){\t\t\t\t\n\t\t\t\t\tif((bid < fiftyDayAvg*smfiftyWeekPercBuy)\t\t\t\t//Buy\n\t\t\t\t\t\t\t&& (divYield > smYield) \n\t\t\t\t\t\t\t&& (peRatio < smPEBuy)){\n\n\t\t\t\t\t\tbuyArray.put(stockArray.getJSONObject(a));\n\t\t\t\t\t}\n\t\t\t\t\telse if((bid > fiftyDayAvg*smfiftyWeekPercSell)\t\t\t//Sell\n\t\t\t\t\t\t\t&& (peRatio > smPESell)){\n\n\t\t\t\t\t\tsellArray.put(stockArray.getJSONObject(a));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic double getManufactureTime() {\r\n\t\tdouble highTime = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\tif(p.getManufactureTime() > highTime)\r\n\t\t\t\thighTime = p.getManufactureTime();\r\n\t\t}\r\n\t\t\r\n\t\treturn highTime;\r\n\t}",
"@Override\r\n public double calculatePrice() {\r\n return super.priceAdjustIE(super.calculatePrice() + WASTE_REMOVAL);\r\n }",
"@Test\r\n\tpublic void testCancelAuctionOnAuctionExsistsForNonProfitEqualAuctionDate(){\r\n\t\t\r\n\t\tCalendar c = new Calendar();\t\t\r\n\t\tc.addAuction(new AuctionRequest(d1, t1, myNonProfit.getOrgName()));\t\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myCurrDate, myCurrDate));\r\n\t\t\r\n\t}",
"public void itemsSold() {\n quanitySnacks--;\n }",
"@Override\n public RoomRatesEntity findOnlineRateForRoomType(Long roomTypeId, Date currentDate) throws NoAvailableOnlineRoomRateException {\n Query query = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId\");\n query.setParameter(\"roomTypeId\", roomTypeId);\n List<RoomRatesEntity> roomRates = query.getResultList();\n\n //Check what rate type are present\n boolean normal = false;\n boolean promo = false;\n boolean peak = false;\n\n for (RoomRatesEntity roomRate : roomRates) {\n// if (!checkValidityOfRoomRate(roomRate)) { //skips expired/not started rates, price is determined by check in and check out date, it becomes not considered in our final prediction\n// continue;\n// }\n// if null do smt else\n if (roomRate.getIsDisabled() == false) {\n if (null != roomRate.getRateType()) {\n System.out.println(roomRate.getRateType());\n switch (roomRate.getRateType()) {\n case NORMAL:\n normal = true;\n \n break;\n case PROMOTIONAL:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n promo = true;\n }\n break;\n\n case PEAK:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n peak = true;\n }\n break;\n default:\n break;\n }\n }\n\n System.out.println(normal + \" \" + promo + \" \" + peak);\n //5 rules here\n if (normal && promo && peak) {\n //find promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (promo && peak && !normal || normal && peak && !promo) {\n //apply peak, assume only 1\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.PEAK);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n } else if (normal && promo && !peak) {\n //apply promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (normal && !promo && !peak) {\n //apply normal\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.NORMAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n }\n }\n\n }\n throw new NoAvailableOnlineRoomRateException(\"There is no available room rate to be used!\");\n }",
"@Override\n\tpublic boolean updateProductSaleTimeStamp(RetailerInventoryDTO queryArguments) throws RetailerException, ConnectException {\n\t\tboolean saleTimestampUpdated = false;\n\t\t/*\n\t\t * required arguments in `queryArguments`\n\t\t * productUIN, productSaleTime\n\t\t * \n\t\t * un-required\n\t\t * productDispatchTime, productReceiveTime, productCategory, retailerUserId\n\t\t */\n\t\tRetailerInventoryEntity newItem = new RetailerInventoryEntity();\n\t\tnewItem.setProductUniqueId(queryArguments.getProductUIN());\n\t\tnewItem.setProductSaleTimestamp(queryArguments.getProductShelfTimeOut());\n\t\t\n\t\tTransaction transaction = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n transaction = session.beginTransaction();\n List<RetailerInventoryEntity> itemList = session.createQuery(\"from RetailerInventoryEntity\", RetailerInventoryEntity.class).list();\n boolean productNotFound = true;\n for (RetailerInventoryEntity item : itemList) {\n \tif (item.getProductUniqueId().equals(newItem.getProductUniqueId())) {\n \t\tnewItem.setRetailerId(item.getRetailerId());\n \t\tnewItem.setProductCategory(item.getProductCategory());\n \t\tnewItem.setProductDispatchTimestamp(item.getProductDispatchTimestamp());\n \t\tnewItem.setProductReceiveTimestamp(item.getProductReceiveTimestamp());\n \t\tproductNotFound = false;\n \t\tbreak;\n \t}\n }\n if (productNotFound) {\n \tGoLog.logger.error(\"Product is not a part of the Inventory\");\n \tthrow new RetailerException (\"Product is not a part of the Inventory\");\n } else {\n \tsession.merge(newItem);\n }\n transaction.commit();\n } catch (IllegalStateException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Method has been invoked at an illegal or inappropriate time\");\n } catch (RollbackException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Could not Commit changes to Retailer Inventory\");\n } catch (PersistenceException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"The item is already present in the inventory\");\n } finally {\n \tsession.close();\n }\n saleTimestampUpdated = true;\t\t\n\t\treturn saleTimestampUpdated;\n\t}",
"CarPaymentMethod processHotDollars();",
"@Test\n\tvoid purchaseTest() {\n\t\ttestCrew.setMoney(10000);\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tint currentMoney = testCrew.getMoney();\n\t\t\titem.purchase(testCrew);\n\t\t\tassertEquals(testCrew.getMoney(), currentMoney - item.getPrice());\n\t\t\tassertTrue(testCrew.getMedicalItems().get(0).getClass().isAssignableFrom(item.getClass()));\n\t\t\ttestCrew.removeFromMedicalItems(testCrew.getMedicalItems().get(0));\n\t\t}\n\t}",
"private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }",
"public Date getActualSellingTime() {\n return actualSellingTime;\n }",
"public void decreasePrice() {\n //price halved\n //is it okay if the price becomes 0?\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() / 2);\n }",
"@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }",
"long getQuantite();",
"public static void main(String[] args) throws InterruptedException {\n Item item1 = new Item(\"Coca-cola\", 200);\n System.out.println(\"Price before discount: \" + item1.getPrice());\n System.out.println(\"Price after discount: \" + item1.calculateDiscount()); //should be same price, 200, there's no doscount for this type\n\n ItemWithDiscount item2 = new ItemWithDiscount(\"Coca-cola Zero\", 2.0);\n System.out.println(\"\\nPrice before discount: \" + item2.getPrice());\n item2.setDiscount(10);\n System.out.println(\"Price after discount: \" + item2.calculateDiscount()); // 2 - 0.2 = 1.8\n\n\n //CHECK BUY PAY DISCOUNT\n BuyMorePayLess item04 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item05 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item06 = new BuyMorePayLess(\"Milk\", 1);\n item04.setBuyPayOffer(3,2);\n item04.calculateDiscount();\n\n //Check TakeItAll discount\n ItemTakeItAll item07 = new ItemTakeItAll(\"Tuna\",5.00);\n ItemTakeItAll item08 = new ItemTakeItAll(\"Tuna\",5.00);\n\n// item07.setDiscount(10);\n item07.setMinimumNumber(1);\n System.out.println(\"##################\" + item07.calculateDiscount());\n\n // USERS\n LoyalCustomer customer01 = new LoyalCustomer(\"Giorgi Tsipuria\", \"giobaski\", \"123\",\n \"Gonsiori 33\",\"55945239\");\n\n //B A S K E T S\n Basket basket01 = new Basket(\"Tartu 46\", \"Kairi\", customer01);\n basket01.insertItem(item1); //200 -> 200\n basket01.insertItem(item2); // 2.0 -> 1.8\n System.out.println(\"Total payment in basket: \" + basket01.caclulatePayment()); //201.8 + 201.8 * 0.1 = 221.98\n\n\n\n\n\n //1. Create Store\n Store store = new Store(\"Raua 16\");\n\n //2. sign into store\n Cashier currentCashier = store.cashierAuthentication();\n\n //3.\n Menu currentMenu = store.openMenu();\n\n //4. new basket\n currentMenu.openNewBasket(customer01);\n\n\n //5.Cashier starts adding items into new basket\n System.out.println(currentMenu.getBasket());\n currentMenu.getBasket().insertItem(item1);\n currentMenu.getBasket().insertItem(item2);\n\n\n System.out.println(\"######Basket By ID:\");\n currentMenu.printBasketInfoById(2);\n System.out.println(\"########\");\n\n\n //6. Calculate total price for the current basket\n currentMenu.getBasket().caclulatePayment();\n System.out.println(currentMenu.getBasket());\n System.out.println(\"currents items: \");\n System.out.println(currentMenu.getBasket().getItems());\n\n //7. Logout cashier\n Thread.sleep(10000);\n currentMenu.exit();\n\n\n // Additional features\n System.out.println(\"points of the loyal customer: \" + customer01.getPoints());\n\n System.out.println(\"Bonus for cashier: \" + currentCashier.calculateBonus() + \" Euros\");\n\n\n\n\n\n\n }",
"private synchronized void update() {\n if (upToDate) return; // nothing to do\n productionAndConsumption.clear();\n netProduction.clear();\n goodsUsed.clear();\n ProductionMap production = new ProductionMap();\n for (ColonyTile colonyTile : colony.getColonyTiles()) {\n List<AbstractGoods> p = colonyTile.getProduction();\n if (!p.isEmpty()) {\n production.add(p);\n ProductionInfo info = new ProductionInfo();\n info.addProduction(p);\n productionAndConsumption.put(colonyTile, info);\n for (AbstractGoods goods : p) {\n goodsUsed.add(goods.getType());\n netProduction.incrementCount(goods.getType().getStoredAs(), goods.getAmount());\n }\n }\n }\n\n GoodsType bells = colony.getSpecification().getGoodsType(\"model.goods.bells\");\n int unitsThatUseNoBells = colony.getSpecification().getInteger(\"model.option.unitsThatUseNoBells\");\n int amount = Math.min(unitsThatUseNoBells, colony.getUnitCount());\n ProductionInfo bellsInfo = new ProductionInfo();\n bellsInfo.addProduction(new AbstractGoods(bells, amount));\n productionAndConsumption.put(this, bellsInfo);\n netProduction.incrementCount(bells, amount);\n\n for (Consumer consumer : colony.getConsumers()) {\n Set<Modifier> modifier = consumer.getModifierSet(\"model.modifier.consumeOnlySurplusProduction\");\n List<AbstractGoods> goods = new ArrayList<AbstractGoods>();\n for (AbstractGoods g : consumer.getConsumedGoods()) {\n goodsUsed.add(g.getType());\n AbstractGoods surplus = new AbstractGoods(production.get(g.getType()));\n if (modifier.isEmpty()) {\n surplus.setAmount(surplus.getAmount() + getGoodsCount(g.getType()));\n } else {\n surplus.setAmount((int) FeatureContainer.applyModifierSet(surplus.getAmount(),\n null, modifier));\n }\n goods.add(surplus);\n }\n ProductionInfo info = null;\n if (consumer instanceof Building) {\n Building building = (Building) consumer;\n AbstractGoods output = null;\n GoodsType outputType = building.getGoodsOutputType();\n if (outputType != null) {\n goodsUsed.add(outputType);\n output = new AbstractGoods(production.get(outputType));\n output.setAmount(output.getAmount() + getGoodsCount(outputType));\n }\n info = building.getProductionInfo(output, goods);\n } else if (consumer instanceof Unit) {\n info = ((Unit) consumer).getProductionInfo(goods);\n } else if (consumer instanceof BuildQueue) {\n info = ((BuildQueue<?>) consumer).getProductionInfo(goods);\n }\n if (info != null) {\n production.add(info.getProduction());\n production.remove(info.getConsumption());\n for (AbstractGoods g : info.getProduction()) {\n netProduction.incrementCount(g.getType().getStoredAs(), g.getAmount());\n }\n for (AbstractGoods g : info.getConsumption()) {\n netProduction.incrementCount(g.getType().getStoredAs(), -g.getAmount());\n }\n productionAndConsumption.put(consumer, info);\n }\n }\n this.productionAndConsumption = productionAndConsumption;\n this.netProduction = netProduction;\n upToDate = true;\n }",
"public TransactionResponse sell() {\r\n \t\ttry {\r\n \t\t\tTransactionResponse response = new TransactionResponse(hp);\r\n \t\t\tCalculation calc = hc.getCalculation();\r\n \t\t\tAccount acc = hc.getAccount();\r\n \t\t\tLanguageFile L = hc.getLanguageFile();\r\n \t\t\tLog log = hc.getLog();\r\n \t\t\tNotification not = hc.getNotify();\r\n \t\t\tInfoSignHandler isign = hc.getInfoSignHandler();\r\n \t\t\tString playerecon = hp.getEconomy();\r\n \t\t\tint id = hyperObject.getId();\r\n \t\t\tint data = hyperObject.getData();\r\n \t\t\tString name = hyperObject.getName();\r\n \t\t\tif (giveInventory == null) {\r\n \t\t\t\tgiveInventory = hp.getPlayer().getInventory();\r\n \t\t\t}\r\n \t\t\tif (amount > 0) {\r\n \t\t\t\tif (id >= 0) {\r\n \t\t\t\t\tint totalitems = im.countItems(id, data, giveInventory);\r\n \t\t\t\t\tif (totalitems < amount) {\r\n \t\t\t\t\t\tboolean sellRemaining = hc.getYaml().getConfig().getBoolean(\"config.sell-remaining-if-less-than-requested-amount\");\r\n \t\t\t\t\t\tif (sellRemaining) {\r\n \t\t\t\t\t\t\tamount = totalitems;\r\n \t\t\t\t\t\t} else {\t\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (amount > 0) {\r\n \t\t\t\t\t\tdouble price = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\tBoolean toomuch = false;\r\n \t\t\t\t\t\tif (price == 3235624645000.7) {\r\n \t\t\t\t\t\t\ttoomuch = true;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!toomuch) {\r\n \t\t\t\t\t\t\tint maxi = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\tboolean isstatic = false;\r\n \t\t\t\t\t\t\tboolean isinitial = false;\r\n \t\t\t\t\t\t\tisinitial = Boolean.parseBoolean(hyperObject.getInitiation());\r\n \t\t\t\t\t\t\tisstatic = Boolean.parseBoolean(hyperObject.getIsstatic());\r\n \t\t\t\t\t\t\tif ((amount > maxi) && !isstatic && isinitial) {\r\n \t\t\t\t\t\t\t\tamount = maxi;\r\n \t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tboolean sunlimited = hc.getYaml().getConfig().getBoolean(\"config.shop-has-unlimited-money\");\r\n \t\t\t\t\t\t\tif (acc.checkshopBalance(price) || sunlimited) {\r\n \t\t\t\t\t\t\t\tif (maxi == 0) {\r\n \t\t\t\t\t\t\t\t\tprice = hyperObject.getValue(amount, hp);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tim.removeItems(id, data, amount, giveInventory);\r\n \t\t\t\t\t\t\t\tdouble shopstock = 0;\r\n \t\t\t\t\t\t\t\tshopstock = hyperObject.getStock();\r\n \t\t\t\t\t\t\t\tif (!Boolean.parseBoolean(hyperObject.getIsstatic()) || !hc.getConfig().getBoolean(\"config.unlimited-stock-for-static-items\")) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setStock(shopstock + amount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tint maxi2 = hyperObject.getMaxInitial();\r\n \t\t\t\t\t\t\t\tif (maxi2 == 0) {\r\n \t\t\t\t\t\t\t\t\thyperObject.setInitiation(\"false\");\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tdouble salestax = hp.getSalesTax(price);\r\n \t\t\t\t\t\t\t\tacc.deposit(price - salestax, hp.getPlayer());\r\n \t\t\t\t\t\t\t\tacc.withdrawShop(price - salestax);\r\n \t\t\t\t\t\t\t\tif (sunlimited) {\r\n \t\t\t\t\t\t\t\t\tString globalaccount = hc.getYaml().getConfig().getString(\"config.global-shop-account\");\r\n \t\t\t\t\t\t\t\t\tacc.setBalance(0, globalaccount);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t\tresponse.addSuccess(L.f(L.get(\"SELL_MESSAGE\"), amount, calc.twoDecimals(price), name, calc.twoDecimals(salestax)), price - salestax, hyperObject);\r\n \t\t\t\t\t\t\t\tresponse.setSuccessful();\r\n \t\t\t\t\t\t\t\tString type = \"dynamic\";\r\n \t\t\t\t\t\t\t\tif (Boolean.parseBoolean(hyperObject.getInitiation())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"initial\";\r\n \t\t\t\t\t\t\t\t} else if (Boolean.parseBoolean(hyperObject.getIsstatic())) {\r\n \t\t\t\t\t\t\t\t\ttype = \"static\";\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\tlog.writeSQLLog(hp.getName(), \"sale\", name, (double) amount, calc.twoDecimals(price - salestax), calc.twoDecimals(salestax), playerecon, type);\r\n \t\t\t\t\t\t\t\tisign.updateSigns();\r\n \t\t\t\t\t\t\t\tnot.setNotify(name, null, playerecon);\r\n \t\t\t\t\t\t\t\tnot.sendNotification();\r\n \t\t\t\t\t\t\t\treturn response;\r\n \t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\tresponse.addFailed(L.get(\"SHOP_NOT_ENOUGH_MONEY\"), hyperObject);\r\n \t\t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"CURRENTLY_CANT_SELL_MORE_THAN\"), hyperObject.getStock(), name), hyperObject);\r\n \t\t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tresponse.addFailed(L.f(L.get(\"YOU_DONT_HAVE_ENOUGH\"), name), hyperObject);\r\n \t\t\t\t\t\treturn response;\t\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponse.addFailed(L.f(L.get(\"CANNOT_BE_SOLD_WITH\"), name), hyperObject);\r\n \t\t\t\t\treturn response;\t\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\tresponse.addFailed(L.f(L.get(\"CANT_SELL_LESS_THAN_ONE\"), name), hyperObject);\r\n \t\t\t\treturn response;\t\r\n \t\t\t}\r\n \t\t} catch (Exception e) {\r\n \t\t\tString info = \"Transaction sell() passed values name='\" + hyperObject.getName() + \"', player='\" + hp.getName() + \"', id='\" + hyperObject.getId() + \"', data='\" + hyperObject.getData() + \"', amount='\" + amount + \"'\";\r\n \t\t\tnew HyperError(e, info);\r\n \t\t\treturn new TransactionResponse(hp);\r\n \t\t}\r\n \t}",
"public void updateShop(double currentResources) {\n\t\tfor (ShopItem item : myItems) {\n\t\t\tif (item.getItemValue() <= currentResources) {\n\t\t\t\titem.setCanBuy(true);\n\t\t\t}\n\t\t}\n\t}",
"public void test_varyingUpdate_SelfCalculation_DreamCruise_plain() {\n // ## Arrange ##\n Purchase purchase = new Purchase();\n purchase.setPurchaseId(3L);\n purchase.setPaymentCompleteFlg_True();\n\n try {\n final List<SqlLogInfo> infoList = new ArrayList<SqlLogInfo>();\n CallbackContext.setSqlLogHandlerOnThread(new SqlLogHandler() {\n public void handle(SqlLogInfo info) {\n infoList.add(info);\n }\n });\n\n // ## Act ##\n PurchaseCB cb = new PurchaseCB();\n PurchaseCB dreamCruiseCB = cb.dreamCruiseCB();\n UpdateOption<PurchaseCB> option = new UpdateOption<PurchaseCB>();\n option.self(new SpecifyQuery<PurchaseCB>() {\n public void specify(PurchaseCB cb) {\n cb.specify().columnPurchasePrice();\n }\n }).multiply(dreamCruiseCB.specify().columnPurchaseCount());\n purchaseBhv.varyingUpdateNonstrict(purchase, option);\n\n // ## Assert ##\n assertHasOnlyOneElement(infoList);\n SqlLogInfo info = infoList.get(0);\n String sql = info.getDisplaySql();\n assertTrue(sql.contains(\"set PURCHASE_PRICE = PURCHASE_PRICE * PURCHASE_COUNT\"));\n assertTrue(sql.contains(\", VERSION_NO = VERSION_NO + 1\"));\n } finally {\n CallbackContext.clearSqlLogHandlerOnThread();\n }\n }",
"int getSellQuantity();",
"@Override\n\tvoid timerPosting(Object obj) {\n\n\t\tEventList eventList = (EventList) obj;\n\t\tif (eventList.getLastOffsetRead() >= 0) {\n\t\t\tArrayList<AbstractEvent> events = eventList.getEvents();\n\t\t\tfor (AbstractEvent event : events) {\n\t\t\t\tProductPurchased pp = (ProductPurchased) event;\n\t\t\t\tString buyerId = pp.getBuyerId();\n\t\t\t\t//What was the Buyer's previous status?\n\t\t\t\tDouble prevTotal = purchases.get(buyerId);\n\t\t\t\tString prevStatus;\n\t\t\t\tif (prevTotal == null) {\n\t\t\t\t\tprevTotal = 0.0;\n\t\t\t\t\tprevStatus = \"None\";\n\t\t\t\t} else {\n\t\t\t\t\tprevStatus = getStatus(prevTotal);\n\t\t\t\t}\n\t\t\t\tint quantity = Integer.parseInt(pp.getQuantity());\n\t\t\t\tdouble price = Double.parseDouble(pp.getPrice());\n\t\t\t\tdouble total = prevTotal + (quantity * price);\n\t\t\t\tpurchases.put(buyerId, total);\n\t\t\t\t//What is the Buyer's new status\n\t\t\t\tString status = getStatus(total);\n\t\t\t\t//If status has changed, post the new status\n\t\t\t\tif (!status.equals(prevStatus)) {\n\t\t\t\t\teventStore.tell(new Put(new BuyerStatusChanged(buyerId, status)), getSelf());\n\t\t\t\t}\n\t\t\t}\n\t\t\tnextOffset = eventList.getLastOffsetRead() + 1;\n\t\t}\n\t}",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"public final void mo4165yQ() {\n if (this.bUR == Long.MAX_VALUE) {\n this.bUR = System.currentTimeMillis();\n }\n }",
"private ArrayList<TY_SaleEligibleItems> getTentativeSellItems(TY_Scrip_PositionModel posModel, Date sellDate) throws EX_General\n\t{\n\t\tArrayList<TY_SaleEligibleItems> allItems = null;\n\t\t// 2. Get Buy Positions Items with ETQ > 0\n\t\tArrayList<OB_Positions_Item> buyItemsposETQ = posModel.getScPosItems().stream().filter(x -> x.getTxnType().equals(SCEenums.txnType.BUY))\n\t\t .filter(w -> w.getETQ() > 0).collect(Collectors.toCollection(ArrayList::new));\n\t\tif (buyItemsposETQ != null && dateSrv != null)\n\t\t{\n\t\t\t// 3.Calculate Days difference for Each of the Items thus obtained\n\t\t\tallItems = new ArrayList<TY_SaleEligibleItems>();\n\n\t\t\tfor ( OB_Positions_Item posItem : buyItemsposETQ )\n\t\t\t{\n\t\t\t\tint daysDiff = 0;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tdaysDiff = dateSrv.getNumDaysbwSqlSysDates(posItem.getTxnDate(), sellDate);\n\t\t\t\t}\n\t\t\t\tcatch (ParseException e)\n\t\t\t\t{\n\t\t\t\t\tEX_General egen = new EX_General(\"ERR_DATE_PARSE\", new Object[]\n\t\t\t\t\t{ e.getMessage()\n\t\t\t\t\t});\n\t\t\t\t\tthrow egen;\n\t\t\t\t}\n\n\t\t\t\tTY_SaleEligibleItems eligItem = new TY_SaleEligibleItems(posItem.getPrimaryKey_Int(), daysDiff, posItem.getETQ(), 0);\n\t\t\t\tallItems.add(eligItem);\n\t\t\t}\n\t\t}\n\t\treturn allItems;\n\t}",
"@Override\n public Double buyDevice(String name, String type) {\n Cash c = null;\n Cheque ch = null;\n Card cd = null;\n \n Date d = new Date();\n \n switch (type) {\n case \"c1\":\n c = new Cash.Builder(d.toString())\n .build();\n break;\n case \"c2\":\n ch = new Cheque.Builder(d.toString())\n .build();\n break;\n case \"c3\":\n cd = new Card.Builder(d.toString())\n .build();\n break;\n }\n \n \n PurchaseVinyl v = new PurchaseVinyl.Builder()\n .setName(\"Let The Good Times Role\")\n .setPrice(3.99)\n .build();\n \n PurchaseVinyl v1 = new PurchaseVinyl.Builder()\n .setName(\"Thanks For The Meomories\")\n .setPrice(3.99)\n .build();\n \n List<PurchaseVinyl> vinylList = new ArrayList();\n vinylList.add(v);\n vinylList.add(v1);\n \n \n ProductPurchase pc = new ProductPurchase.Builder(d)\n .setVinylPurchases(vinylList)\n .setCardPurchases(cd)\n .setCashPurchases(c)\n .setChequePurchases(ch)\n .build();\n \n repo.save(pc);\n id = pc.getID();\n \n ProductPurchase pc2 = repo.findOne(id);\n for(int x = 0; pc2.getVinylPurchases().size() > x; x++){\n if(pc2.getVinylPurchases().get(x).getName().equals(name)){\n return pc2.getVinylPurchases().get(x).getPrice();\n }\n }\n return null; \n }",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"public synchronized void checkAndUpdateInventory(Drink drink) {\n Map<String, Integer> quantityMap = drink.getIngredientQuantityMap();\n boolean canBeMade = true;\n for (Map.Entry<String, Integer> entry : quantityMap.entrySet()) {\n if (inventoryMap.containsKey(entry.getKey())) {\n int currentValue = inventoryMap.get(entry.getKey());\n if (currentValue == 0) {\n System.out.println(drink.getName() + \" cannot be prepared because \" + entry.getKey() + \" is not available\");\n canBeMade = false;\n break;\n } else if (quantityMap.get(entry.getKey()) > inventoryMap.get(entry.getKey())) {\n System.out.println(drink.getName() + \" cannot be prepared because \" + entry.getKey() + \" is not sufficient\");\n canBeMade = false;\n break;\n }\n }\n }\n if (canBeMade) {\n updateInventory(quantityMap);\n System.out.println(drink.getName() + \" is prepared\");\n }\n }",
"double purchasePrice();",
"public void trade(CheeseConnoisseur c) {\n try {\n if (this.hold.getType() == null || c.hold.getType() == null) {\n CheeseConnoisseur n = this;\n } else if (this.hold.equals(c.hold)) {\n CheeseConnoisseur n = this;\n } else {\n CheeseConnoisseur higher = this.hold.getPrice() > c.hold.getPrice() ? this : c;\n CheeseConnoisseur lower = this.hold.getPrice() < c.hold.getPrice() ? this : c;\n double diff = higher.hold.getPrice() - lower.hold.getPrice();\n System.out.println(diff);\n if (this.hold.getPrice() > c.hold.getPrice() && c.money >= diff) {\n c.money -= diff;\n this.money += diff;\n this.hold.beTraded();\n c.hold.beTraded();\n Cheese tmp = this.hold;\n this.hold = c.hold;\n c.hold = tmp;\n } else if (this.hold.getPrice() < c.hold.getPrice() && this.money >= diff) {\n c.money += diff;\n this.money -= diff;\n this.hold.beTraded();\n c.hold.beTraded();\n Cheese tmp = this.hold;\n this.hold = c.hold;\n c.hold = tmp;\n } else {\n CheeseConnoisseur n = this;\n }\n }\n } catch (Exception e) {\n System.out.println(\"Fail to trade\");\n }\n\n }",
"@Override\n public void sell() {\n }",
"private void decreaseStock() {\n\t\tint decreaseBy; // declares decreaseBy\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the card you wish to edit:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\n\t\tif(inventoryObject.cardExists(sic_idHolder)) { // checks to see if the card with the inputed ID exists\n\t\tSystem.out.println(\"Please enter the amount you wish to decrease the stock by (Note: This should be a positive number):\");\n\t\tdecreaseBy = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\tif(decreaseBy <= 0) { //checks to see is decrease by is negative\n\t\t\tSystem.out.println(\"Error! You must decrease the stock by 1 or more\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\tif(inventoryObject.quantitySize(sic_idHolder) - decreaseBy < 0 ) { // checks to see if the current quantity minus decreasedBy is negative\n\t\t\tSystem.out.println(\"Error. Quantity can not be reduced to a negative number\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\tinventoryObject.decreaseStock(sic_idHolder, decreaseBy); // calls decreaseStock in InventoryManagement\n\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"There are no cards with the ID you entered\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}",
"int getSellCurrent();",
"public void buyStock(double askPrice, int shares, int tradeTime) {\n }",
"private static boolean sell(Environment environment,\n\t\t\t\tSymbol symbol,\n\t\t\t\tfloat tradeCost,\n\t\t\t\tint day) \n\tthrows MissingQuoteException {\n\tif(environment.cashAccount.getValue() >= tradeCost) {\n\n\t // Get the number of shares we own - we will sell all of them\n\t StockHolding stockHolding = environment.shareAccount.get(symbol);\n\t int shares = 0;\n\t if(stockHolding != null) \n\t\tshares = stockHolding.getShares();\n\n\t // Only sell if we have any!\n\t if(shares > 0) {\n\n\t\t// How much are they worth? We sell at the day open price.\n\t\tfloat amount = \n shares * environment.quoteBundle.getQuote(symbol, Quote.DAY_OPEN, day);\n\t\tTradingDate date = environment.quoteBundle.offsetToDate(day);\n\t\tTransaction sell = Transaction.newReduce(date, \n amount,\n\t\t\t\t\t\t\t symbol, \n shares,\n\t\t\t\t\t\t\t tradeCost,\n\t\t\t\t\t\t\t environment.cashAccount,\n\t\t\t\t\t\t\t environment.shareAccount);\n\t\tenvironment.portfolio.addTransaction(sell);\n\n\t\treturn true;\n\t }\n\t}\n\n\treturn false;\n }",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"@Test\n public void testEJDebitTallying_RewardExceedDebits_NoActiveSession() {\n setStandbyBucket(WORKING_INDEX);\n setProcessState(ActivityManager.PROCESS_STATE_SERVICE);\n setDeviceConfigLong(QcConstants.KEY_EJ_LIMIT_WORKING_MS, 30 * MINUTE_IN_MILLIS);\n setDeviceConfigLong(QcConstants.KEY_EJ_REWARD_INTERACTION_MS, MINUTE_IN_MILLIS);\n\n final long nowElapsed = sElapsedRealtimeClock.millis();\n TimingSession ts = new TimingSession(nowElapsed - 5 * MINUTE_IN_MILLIS,\n nowElapsed - 4 * MINUTE_IN_MILLIS, 2);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE, ts, true);\n\n ShrinkableDebits debit = mQuotaController.getEJDebitsLocked(SOURCE_USER_ID, SOURCE_PACKAGE);\n assertEquals(MINUTE_IN_MILLIS, debit.getTallyLocked());\n assertEquals(29 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingEJExecutionTimeLocked(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n advanceElapsedClock(30 * SECOND_IN_MILLIS);\n UsageEvents.Event event =\n new UsageEvents.Event(UsageEvents.Event.USER_INTERACTION, sSystemClock.millis());\n event.mPackage = SOURCE_PACKAGE;\n mUsageEventListener.onUsageEvent(SOURCE_USER_ID, event);\n waitForNonDelayedMessagesProcessed();\n assertEquals(0, debit.getTallyLocked());\n assertEquals(30 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingEJExecutionTimeLocked(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n advanceElapsedClock(MINUTE_IN_MILLIS);\n assertEquals(0, debit.getTallyLocked());\n assertEquals(30 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingEJExecutionTimeLocked(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n // Excessive rewards don't increase maximum quota.\n event = new UsageEvents.Event(UsageEvents.Event.USER_INTERACTION, sSystemClock.millis());\n event.mPackage = SOURCE_PACKAGE;\n mUsageEventListener.onUsageEvent(SOURCE_USER_ID, event);\n waitForNonDelayedMessagesProcessed();\n assertEquals(0, debit.getTallyLocked());\n assertEquals(30 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingEJExecutionTimeLocked(SOURCE_USER_ID, SOURCE_PACKAGE));\n }",
"@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}",
"public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }"
] |
[
"0.6423283",
"0.6232564",
"0.6188872",
"0.60616904",
"0.604637",
"0.6025251",
"0.6001688",
"0.5938657",
"0.59364825",
"0.5879342",
"0.58278006",
"0.58149123",
"0.5782934",
"0.5760562",
"0.57083285",
"0.56530267",
"0.5642759",
"0.5608128",
"0.5591703",
"0.5544644",
"0.54981995",
"0.5483113",
"0.5476828",
"0.5454023",
"0.544055",
"0.54328895",
"0.54109645",
"0.54048645",
"0.5403434",
"0.5386544",
"0.53851783",
"0.53788847",
"0.5361326",
"0.53504944",
"0.53484213",
"0.5331205",
"0.531984",
"0.53071076",
"0.5297113",
"0.52920693",
"0.5291462",
"0.52911234",
"0.5273851",
"0.52609056",
"0.5253183",
"0.5252668",
"0.5249998",
"0.52446127",
"0.5236476",
"0.52358574",
"0.523348",
"0.52253747",
"0.5220598",
"0.52187276",
"0.52139604",
"0.5212823",
"0.51947355",
"0.5191522",
"0.51911795",
"0.51907074",
"0.5190608",
"0.51871145",
"0.51859945",
"0.5174786",
"0.51675445",
"0.5162262",
"0.516003",
"0.5158759",
"0.5156905",
"0.515682",
"0.5156408",
"0.51540416",
"0.5151273",
"0.5148458",
"0.51463246",
"0.5141586",
"0.51387227",
"0.5136939",
"0.51273835",
"0.51217866",
"0.512144",
"0.51199263",
"0.5112005",
"0.5111205",
"0.5107122",
"0.51061195",
"0.5105653",
"0.51002645",
"0.50981367",
"0.5086386",
"0.50835097",
"0.50832933",
"0.507943",
"0.5077135",
"0.50765854",
"0.5075637",
"0.5071039",
"0.5065662",
"0.50586104",
"0.5057439"
] |
0.6887945
|
0
|
The Quality of an item is never negative
|
@Test
void negativeQuality() {
Item[] items = new Item[]{new Item("noValue", 2, 0)};
GildedRose app = new GildedRose(items);
app.updateQuality();
assertEquals(0, app.items[0].quality, "Quality shouldn't drop below 0");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"java.lang.String getQuality();",
"@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }",
"boolean hasQuality();",
"boolean hasQuality();",
"public float getQuality();",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"public double getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }",
"Quality getQ();",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"public boolean hasQuality() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"boolean hasQualityMax();",
"private static double getOEEQuality(Batch batch) {\n double quality = ((double) batch.getAccepted()) / (((double) batch.getAccepted()) + ((double) batch.getDefect()));\n\n return quality;\n }",
"public boolean hasQuality() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}",
"java.lang.String getQualityMax();",
"@Test\r\n\tpublic void calculQualityAxisWithNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 4f), new Float(0));\r\n\t}",
"com.google.protobuf.ByteString\n getQualityBytes();",
"public int get_quality() {\n return (int)getUIntBEElement(offsetBits_quality(), 16);\n }",
"@Test\n void agedBrie() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Aged Brie\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"Aged Brie\", app.items[0].name, \"Item name should match expected\");\n assertTrue(originalSellIn > app.items[0].sellIn, \"sellIn date should decrease in value\");\n assertTrue(originalQuality < app.items[0].quality, \"Quality of \\\"Aged Brie\\\" should increase\");\n }",
"@Test //loop test 0 passes\n\tpublic void testLoop0pass() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = -100;\n\t\tif(! items.isEmpty()) { //check if items is empty, if not get the first item's quality\n\t\t\titems.get(0).getQuality();\n\t\t}\n\t\t//assert quality is -100\n\t\tassertEquals(\"Quality -100 with 0 loop passes\", -100, quality);\n\t}",
"public DriftCheckModelQuality getModelQuality() {\n return this.modelQuality;\n }",
"public String getQuality()\n\t{\n\t\treturn quality.getText();\n\t}",
"public int getQuality()\n {\n int sleeplatencyScore = getSleepLatencyScore();\n int sleepDurationScore = getSleepDurationScore();\n int sleepEfficiencyScore= getSleepEfficiencyScore();\n int sleepDeepsleepRatioScore = getDeepSleepRatioScore();\n int nightTimeWakeScore = getNightTimeAwakeningScore();\n int sum = sleeplatencyScore + sleepDurationScore+ sleepEfficiencyScore+ sleepDeepsleepRatioScore+ nightTimeWakeScore;\n sum = sum *4;\n return sum;\n }",
"public static boolean isSigned_quality() {\n return false;\n }",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public void setQuality(int value) {\n this.quality = value;\n }",
"public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }",
"@Test\n public void BackstagePass_HandleSpecialCase() {\n GildedRose sut = new GildedRose(createItemArray(BACKSTAGE_PASS, 5, 40));\n sut.updateQuality();\n assertEquals(42, sut.items[0].quality);\n }",
"public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void setQuality(Integer quality) {\n this.quality = quality;\n }",
"public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n }\n }",
"public void setQuality(float quality);",
"private String getQuality()\n {\n \n if(high.isSelected())\n {\n return \"High\";\n }\n else if(medium.isSelected())\n {\n return \"Medium\";\n }\n else if(mild.isSelected())\n {\n return \"Mild\";\n }\n else\n {\n \n return null;\n }\n }",
"public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void setQuality(int quality) {\n this.quality = quality;\n }",
"public void setQuality(int quality) {\n this.quality = quality;\n }",
"public static ItemQuality getItemValue(ItemStack stack){\n\t\tswitch(stack.getType()){\n\t\t\tcase LEATHER_HELMET :\n\t\t\tcase LEATHER_CHESTPLATE :\n\t\t\tcase LEATHER_LEGGINGS :\n\t\t\tcase LEATHER_BOOTS : return ItemQuality.Leather;\n\t\t\t\n\t\t\tcase CHAINMAIL_HELMET :\n\t\t\tcase CHAINMAIL_CHESTPLATE :\n\t\t\tcase CHAINMAIL_LEGGINGS :\n\t\t\tcase CHAINMAIL_BOOTS : return ItemQuality.Chain;\n\t\t\t\n\t\t\tcase IRON_HELMET :\n\t\t\tcase IRON_CHESTPLATE :\n\t\t\tcase IRON_LEGGINGS :\n\t\t\tcase IRON_BOOTS : return ItemQuality.Iron;\n\t\t\t\n\t\t\tcase DIAMOND_HELMET :\n\t\t\tcase DIAMOND_CHESTPLATE :\n\t\t\tcase DIAMOND_LEGGINGS :\n\t\t\tcase DIAMOND_BOOTS : return ItemQuality.Diamond;\n\t\t\t\n\t\t\tcase GOLD_HELMET :\n\t\t\tcase GOLD_CHESTPLATE :\n\t\t\tcase GOLD_LEGGINGS :\n\t\t\tcase GOLD_BOOTS : return ItemQuality.Gold;\n\t\t\n\t\t\tdefault: return ItemQuality.None;\n\t\t}\n\t}",
"@Test\r\n\tvoid testCapitalEfficiency() throws IOException {\r\n\t\tStock stock = new Stock(ticker);\r\n\t\tFMPWebReaderFilter adder = new FMPWebReaderFilter();\r\n\t\tstock.setProfile(adder.getStockDetails(stock.getTicker()));\r\n\t\tstock.setCapEff(Evaluator.getCapitalEfficiency(stock));\r\n\t\tassertEquals(\"18\", stock.getCapEff());\r\n\t}",
"int getQuantite();",
"int getQuantite();",
"public DriftCheckModelDataQuality getModelDataQuality() {\n return this.modelDataQuality;\n }",
"public boolean hasQualityMax() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }",
"@Override\n public int getMaxEfficiency(ItemStack itemStack) {\n return 10000;\n }",
"@Test\n void backstagePasses() {\n String name = \"Backstage passes to a TAFKAL80ETC concert\";\n int originalQuality = 10;\n int[] sellDates = new int[]{-1, 10, 5};\n int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};\n\n Item[] items = new Item[]{\n new Item(name, sellDates[0], originalQuality),\n new Item(name, sellDates[1], originalQuality),\n new Item(name, sellDates[2], originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(targetQuality[i], app.items[i].quality, \"Quality must be altered correctly\");\n }\n }",
"public boolean qualityIsHigh()\n\t{\n\t\tint counter = 0;\n\t\tfor(int i = 0; i < quality.length(); i++) {\n\t\t\tif(quality.charAt(i) == '!') {\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\treturn counter >= 3;\n\t}",
"public int getWorth() { return 1; }",
"public float getQuantityAvailableForSale () {\n return (float) 0.0;\n }",
"long getQuantite();",
"QualityScenario createQualityScenario();",
"double getMissChance();",
"public boolean hasQualityMax() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"double getReliability();",
"private int calculateQuality() {\n\t\t\n\t\tint quality = inconsistencyCount;\n\t\t\n\t\t/* found solution */\n\t\tif (inconsistencyCount == 0)\n\t\t\treturn 0; \n\t\t\n\t\t/* add cost for each unsupported precondition*/\n\t\tfor(InconsistencyIterator iterator = new InconsistencyIterator(); iterator.hasNext();) {\n\t\t\tLPGInconsistency inconsistency = iterator.next();\n\t\t\tquality += inconsistency.getCurrentLevel();\n\t\t\tif (inconsistency instanceof UnsupportedPrecondition) {\n\t\t\t\tint currentLevel = inconsistency.getCurrentLevel();\n\t\t\t\tPlanGraphLiteral unsupportedPrecondition = ((UnsupportedPrecondition) inconsistency).getUnsupportedPrecondition();\n\t\t\t\tquality += costToSupport(unsupportedPrecondition, currentLevel);\n\t\t\t\tquality += inconsistency.getInitialLevel();\n\t\t\t}\n\t\t}\n\t\t/* check steps, penalize levels with no real steps */\n\t\tfor( int i = 1; i < steps.size() - 1; i++) {\n\t\t\tboolean foundStep = false;\n\t\t\tfor(Iterator<PlanGraphStep> it = steps.get(i).iterator(); it.hasNext();) {\n\t\t\t\tPlanGraphStep next = it.next();\n\t\t\t\tif(!next.isPersistent()){\n\t\t\t\t\tfoundStep = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// increase quality if we have found no real steps \n\t\t\tif (!foundStep)\n\t\t\t\tquality++;\n\t\t}\n\t\t\n\t\treturn quality;\n\t}",
"public double[] getQualityScores() {\n return null;\n }",
"public double[] getQualityScores() {\n return null;\n }",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"@Test //covers loop test with one pass through the loop\n\tpublic void exampleTest() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by one\n\t\tassertEquals(\"Failed quality for Dexterity Vest\", 19, quality);\n\t}",
"@Override\n\tpublic boolean qualityExpected(Tree tree) \n\t{\n\t\treturn true;\n\t}",
"boolean hasQuantity();",
"@Test\n\tpublic void gapsLeadToBadQuality() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tt1.addValue(new SampledValue(new FloatValue(234F), 60, Quality.BAD));\n\t\tt0.setInterpolationMode(InterpolationMode.STEPS);\n\t\tt1.setInterpolationMode(InterpolationMode.STEPS);\n\t\tfinal ReadOnlyTimeSeries avg = MultiTimeSeriesUtils.getAverageTimeSeries(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0L, 110);\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(59).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(60).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(63).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(70).getQuality());\n\t}",
"public Collection getQualityResults()\r\n {\r\n return mQualityResults;\r\n }",
"com.google.protobuf.ByteString\n getQualityMaxBytes();",
"public int getItemEnchantability()\n {\n return this.field_77878_bZ.func_78045_a();\n }",
"@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }",
"public double getECapacity() {\n return eCapacity;\n }",
"@Test(timeout = 4000)\n public void test050() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoQuality((-5305));\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals((-5305), int0);\n }",
"public String getHistologicalQuality()\r\n \t{\r\n \t\treturn histologicalQuality;\r\n \t}",
"public int getQos() {\n return qos;\n }",
"QualityRisk createQualityRisk();",
"boolean haveMBQuant()\n {\n return ((mbType & QUANT) != 0);\n }",
"public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }",
"public int getItemEnchantability()\r\n {\r\n return this.toolMaterial.getEnchantability();\r\n }",
"public int getHealthGain();",
"@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testScanItemLowException(){\n instance.scanItem(-0.5);\n }",
"public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }",
"private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }",
"int getRatioQuantity();",
"float getBonusItemDrop();",
"int getImageQualityPref();",
"public Boolean checkAvailability(Item item, Integer current) {\n \tif (item.getQuatity() + current > item.getAvailableQuatity()) {\r\n \t\tSystem.out.println(\"System is unable to add \"\r\n \t\t\t\t+ current + \" \" + item.getItemName() +\r\n \t\t\t\t\". System can only add \"\r\n \t\t\t\t+ item.getAvailableQuatity() + \" \" + item.getItemName() );\r\n \t\treturn false;\r\n \t}\r\n \telse return true;\r\n }",
"public double getReliability() {\r\n return reliability;\r\n }",
"String getNeedsInventoryIssuance();",
"void checkConsumption()\n {\n assertEquals(\"Consumption doesn't match\", keyEventPair.getKey().isConsumed(), keyEventPair.getValue().isConsumed());\n }"
] |
[
"0.7997644",
"0.79809004",
"0.7914208",
"0.779027",
"0.7755873",
"0.7731089",
"0.7604769",
"0.7485917",
"0.7332978",
"0.730709",
"0.70091814",
"0.69991976",
"0.6948509",
"0.6948509",
"0.6947784",
"0.6893179",
"0.6840142",
"0.6816142",
"0.6816142",
"0.6816142",
"0.6744342",
"0.66493595",
"0.66313034",
"0.6619422",
"0.64958125",
"0.64727366",
"0.6299327",
"0.6284917",
"0.62839043",
"0.6283089",
"0.6281164",
"0.6262715",
"0.6254944",
"0.6232497",
"0.6228831",
"0.621958",
"0.6208775",
"0.6182854",
"0.61359674",
"0.6134207",
"0.6131453",
"0.61154777",
"0.6072228",
"0.60413486",
"0.60361135",
"0.59988356",
"0.59890664",
"0.5982528",
"0.5971004",
"0.596792",
"0.59501594",
"0.59501594",
"0.593173",
"0.5929347",
"0.59213847",
"0.59213847",
"0.58915496",
"0.58882105",
"0.5883784",
"0.58822334",
"0.58719945",
"0.5865243",
"0.5853475",
"0.5852923",
"0.5839148",
"0.58369935",
"0.58170277",
"0.5816966",
"0.5800671",
"0.5781751",
"0.5781751",
"0.57775015",
"0.5771395",
"0.5759018",
"0.5733998",
"0.57221556",
"0.57104367",
"0.57050693",
"0.5696068",
"0.5693569",
"0.56901956",
"0.5686796",
"0.5680873",
"0.5656976",
"0.5655844",
"0.56543595",
"0.56490993",
"0.56201524",
"0.5620131",
"0.561708",
"0.5613065",
"0.5595082",
"0.5591573",
"0.5590635",
"0.5564926",
"0.5563219",
"0.5549829",
"0.55472463",
"0.55452055",
"0.55214703"
] |
0.79574454
|
2
|
"Aged Brie" actually increases in Quality the older it gets
|
@Test
void agedBrie() {
int originalSellIn = 10;
int originalQuality = 10;
Item[] items = new Item[]{new Item("Aged Brie", originalSellIn, originalQuality)};
GildedRose app = new GildedRose(items);
app.updateQuality();
assertEquals("Aged Brie", app.items[0].name, "Item name should match expected");
assertTrue(originalSellIn > app.items[0].sellIn, "sellIn date should decrease in value");
assertTrue(originalQuality < app.items[0].quality, "Quality of \"Aged Brie\" should increase");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"@Test\n void backstagePasses() {\n String name = \"Backstage passes to a TAFKAL80ETC concert\";\n int originalQuality = 10;\n int[] sellDates = new int[]{-1, 10, 5};\n int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};\n\n Item[] items = new Item[]{\n new Item(name, sellDates[0], originalQuality),\n new Item(name, sellDates[1], originalQuality),\n new Item(name, sellDates[2], originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(targetQuality[i], app.items[i].quality, \"Quality must be altered correctly\");\n }\n }",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}",
"protected abstract float _getGrowthChance();",
"@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }",
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"static void getBiggestGain(long gain) {\n if (gain > biggestGain) {\n biggestGain = gain;\n }\n }",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}",
"protected double ABT() {\r\n\t\tDouble output = Double.MAX_VALUE;\r\n\t\tIterator<Double> bws = this.flowBandwidth.values().iterator();\r\n\t\twhile (bws.hasNext()) {\r\n\t\t\tdouble temp = bws.next();\r\n\t\t\tif (temp < output) {\r\n\t\t\t\toutput = temp;\r\n\t\t\t\t// System.out.println(\"[GeneralSimulator.ABT]: \" + output);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// System.out.println(\"[GeneralSimulator.ABT]: succfulCount \"\r\n\t\t// + this.successfulCount);\r\n\t\treturn output * this.successfulCount;\r\n\t}",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"public int getWorth() { return 1; }",
"float getFixedHotwordGain();",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"public final void mo4165yQ() {\n if (this.bUR == Long.MAX_VALUE) {\n this.bUR = System.currentTimeMillis();\n }\n }",
"long ribMetric(EigrpMetricVersion version);",
"abstract public double getBegBal(int yr);",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"float getPostGain();",
"@Override\n public long cost() {\n return 100;\n }",
"public int maximum_heart_rate() {\r\n return (220 - age());\r\n }",
"public int getQuality()\n {\n int sleeplatencyScore = getSleepLatencyScore();\n int sleepDurationScore = getSleepDurationScore();\n int sleepEfficiencyScore= getSleepEfficiencyScore();\n int sleepDeepsleepRatioScore = getDeepSleepRatioScore();\n int nightTimeWakeScore = getNightTimeAwakeningScore();\n int sum = sleeplatencyScore + sleepDurationScore+ sleepEfficiencyScore+ sleepDeepsleepRatioScore+ nightTimeWakeScore;\n sum = sum *4;\n return sum;\n }",
"@Override\r\n\tpublic int cost() {\n\t\treturn b1.cost() + 1;\r\n\t}",
"float getPreGain();",
"float getBoost();",
"public abstract int getCostToUpgrade();",
"public double getIBU() {\n\t\tdouble bitterness = 0;\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngredient().getType() == Ingredient.Type.HOPS) {\n\t\t\t\tHops h = (Hops) ri.getIngredient();\n\t\t\t\tbitterness += 0.30 * (h.getBoilTime()/60) * h.getAlphaAcid() * ri.getAmount(); \n\t\t\t}\n\t\t}\n\t\treturn (bitterness / m_batchSize) / 0.01335; \n\t}",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}",
"@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"@Test\n public void BackstagePass_HandleSpecialCase() {\n GildedRose sut = new GildedRose(createItemArray(BACKSTAGE_PASS, 5, 40));\n sut.updateQuality();\n assertEquals(42, sut.items[0].quality);\n }",
"protected int get_breeding_age()\n {\n return breeding_age;\n }",
"private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }",
"public double getAKA068() {\n return AKA068;\n }",
"@Override\n public double tuition(){\n return 2500;\n }",
"private float getLatestOvers() {\n // return 10.2 for simplicity\n return (float) 10.2;\n }",
"@Override\r\n\tpublic double getSlowness() {\n\t\treturn 10;\r\n\t}",
"double seBlesser();",
"@Override\n public boolean gainBerryEffect(Battle b, ActivePokemon user, CastSource source) {\n List<Stat> stats = user.getStages().getNonMaxStats();\n\n // You probably don't need the berry at this point anyhow...\n if (stats.isEmpty()) {\n return false;\n }\n\n // Sharply raise random battle stat\n Stat stat = RandomUtils.getRandomValue(stats);\n return new StageModifier(2*ripen(user), stat).modify(b, user, user, source);\n }",
"private double loadFactor()\n {\n double bucketsLength = buckets.length;\n return currentSize / bucketsLength;\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"String getUseExponentialBackOff();",
"public void geldCheat() {\n if (geld + 1000000 < Long.MAX_VALUE) {\n geld = geld + 1000000;\n ticker.neueNachricht(\"Korruptionsverdacht bei Stadtwerken!\");\n }\n }",
"private static double getOEEQuality(Batch batch) {\n double quality = ((double) batch.getAccepted()) / (((double) batch.getAccepted()) + ((double) batch.getDefect()));\n\n return quality;\n }",
"@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }",
"public abstract BigInteger getUseed();",
"public abstract void BoostNerf(int boost);",
"public int getNewLoyaltyScale() {\n return newLoyaltyScale;\n }",
"@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}",
"public double getBust() {\n return bust;\n }",
"private GATKRead addBaseQuality(final GATKRead read) {\n\n // convert to a flow base read\n final FlowBasedReadUtils.ReadGroupInfo rgInfo = FlowBasedReadUtils.getReadGroupInfo(getHeaderForReads(), read);\n final FlowBasedRead fbRead = new FlowBasedRead(read, rgInfo.flowOrder, rgInfo.maxClass, fbargs);\n final int flowOrderLength = calcFlowOrderLength(rgInfo.flowOrder);\n\n // generate base quality\n final double[] baseErrorProb = generateBaseErrorProbability(fbRead, flowOrderLength);\n final byte[] phred = convertErrorProbToPhred(baseErrorProb);\n\n // install in read\n if ( !replaceQualityMode ) {\n read.setAttribute(BASE_QUALITY_ATTRIBUTE_NAME, convertPhredToString(phred));\n } else {\n read.setAttribute(OLD_QUALITY_ATTRIBUTE_NAME, convertPhredToString(read.getBaseQualitiesNoCopy()));\n read.setBaseQualities(phred);\n }\n\n // return reused read\n return read;\n }",
"public int getOldLoyaltyScale() {\n return oldLoyaltyScale;\n }",
"public void crunch(){\n cpuBurstTime--;\n rem--;\n }",
"double agression();",
"public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}",
"public float getFrecencyBoost(long now) {\r\n float result = adjustFrecencyBoost(storedFrecencyBoost, lastVisitTime, now);\r\n result = (float)Math.min(result, MAX_FRECENCY_BOOST);\r\n return result;\r\n }",
"java.lang.String getQuality();",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"public float getQuality();",
"private float calculateAbsorption() {\n int i = getWeightedBucket();\n \n//System.out.println(\" bucket: \" + i);\n\n // the max modification is +/-5 % , broken into 0.5 % chunks\n float modifier = -0.05f;\n modifier += (float)(i * 0.005);\n \n return(modifier);\n }",
"public int getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}",
"Quality getQ();",
"@Override\n protected void accelerate() {\n System.out.println(\"Bike Specific Acceleration\");\n }",
"@Override\n\tpublic double cost() {\n\t\treturn medicalRecord.cost() + 4.88;\n\t}",
"public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }",
"public double getQuality() {\n return quality;\n }",
"private void processSuperHighValue(Bid bid) {\n\t}",
"public void setBoostExpiration(){\r\n\t\tboostExpiration = GameController.getTimer() + 1000000000l * length;\r\n\t}",
"private void grow() {\n\t\tif (_growthRatio > 1 && (_age & 0x07) == 0x07 && alive && _energy >= _mass/10) {\n\t\t\t_growthRatio--;\n\t\t\tdouble m = _mass;\n\t\t\tdouble I = _I;\n\t\t\tsymmetric();\n\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\tdx *= m;\n\t\t\tdy *= m;\n\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\thasGrown = 1;\n\t\t} else {\n\t\t\tif (_growthRatio < 15 && _energy < _mass/12) {\n\t\t\t\t_growthRatio++;\n\t\t\t\tdouble m = _mass;\n\t\t\t\tdouble I = _I;\n\t\t\t\tsymmetric();\n\t\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\t\tdx *= m;\n\t\t\t\tdy *= m;\n\t\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\t\thasGrown = -1;\n\t\t\t} else\n\t\t\t\thasGrown = 0;\n\t\t}\n\t}",
"@Test\n\tpublic void gapsLeadToBadQuality() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tt1.addValue(new SampledValue(new FloatValue(234F), 60, Quality.BAD));\n\t\tt0.setInterpolationMode(InterpolationMode.STEPS);\n\t\tt1.setInterpolationMode(InterpolationMode.STEPS);\n\t\tfinal ReadOnlyTimeSeries avg = MultiTimeSeriesUtils.getAverageTimeSeries(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0L, 110);\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(59).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(60).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(63).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(70).getQuality());\n\t}",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"public double getB_() {\n\t\treturn b_;\n\t}",
"public int getNBCInoperative();",
"private double getBolsa() {\n\t\treturn bolsa;\n\t}",
"public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }",
"@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}",
"private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}",
"@Override\n\tpublic int getGrowingAge() {\n\t\t// adapter for vanilla code to enable breeding interaction\n\t\treturn isAdult() ? 0 : -1;\n\t}",
"public int adjustForCrowding() {\n int deadGuppyCount = 0;\n\n Collections.sort(this.guppiesInPool, new Comparator<Guppy>() {\n @Override\n public int compare(Guppy g1, Guppy g2) {\n return Double.compare(g1.getHealthCoefficient(), g2.getHealthCoefficient());\n }\n });\n\n Guppy weakestGuppy;\n Iterator<Guppy> it = guppiesInPool.iterator();\n double volumeNeeded = this.getGuppyVolumeRequirementInLitres();\n\n while (it.hasNext() && volumeNeeded > this.getVolumeLitres()) {\n weakestGuppy = it.next();\n volumeNeeded -= (weakestGuppy.getVolumeNeeded() / ML_TO_L_CONVERSION);\n\n weakestGuppy.setIsAlive(false);\n\n\n deadGuppyCount++;\n\n }\n return deadGuppyCount;\n }",
"long getQuantite();",
"public static int offset_quality() {\n return (48 / 8);\n }",
"@Test\n\tpublic void leastPopularBike()\n\t{\t\t\n\t\tassertEquals(controller.getReport().getLeastPopularBike(), \"BIKE4\");\n\t}",
"@Override\n\tpublic void boostingJ48() {\n\t\talgo.boostingJ48();\n\t}",
"public void breath() {\n\t\tif (alive) {\n\t\t\t_age++;\n\t\t\t// Respiration process\n\t\t\tboolean canBreath = useEnergy(Math.min((_mass - _lowmaintenance) / Utils.SEGMENT_COST_DIVISOR, _energy));\n\t\t\tif ((_age >> 8) > _geneticCode.getMaxAge() || !canBreath) {\n\t\t\t\t// It's dead, but still may have energy\n\t\t\t\tdie(null);\n\t\t\t} else {\n\t\t\t\tif (_energy <= Utils.tol) {\n\t\t\t\t\talive = false;\n\t\t\t\t\t_world.decreasePopulation();\n\t\t\t\t\t_world.organismHasDied(this, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// The corpse slowly decays\n\t\t\tuseEnergy(Math.min(_energy, Utils.DECAY_ENERGY));\n\t\t}\n\t}",
"float getBatt();",
"abstract float getKeliling();",
"public double aire() {\n\t\treturn 0;\n\t}",
"public float spiderScaleAmount()\n {\nreturn 1F;\n }"
] |
[
"0.6600691",
"0.60960513",
"0.6092605",
"0.6071412",
"0.6054948",
"0.59799004",
"0.59529126",
"0.59501886",
"0.5942296",
"0.59064716",
"0.5905984",
"0.590537",
"0.5904674",
"0.5825742",
"0.5816607",
"0.5812868",
"0.58068866",
"0.5789694",
"0.57846695",
"0.57599753",
"0.57592523",
"0.5721469",
"0.57146424",
"0.5691371",
"0.56799066",
"0.5661664",
"0.5652774",
"0.56525505",
"0.5649656",
"0.56311303",
"0.56285983",
"0.56139576",
"0.56080675",
"0.5607574",
"0.5606796",
"0.56022507",
"0.5601294",
"0.55971223",
"0.55580604",
"0.55525625",
"0.55522364",
"0.5552023",
"0.55494624",
"0.55464435",
"0.55441654",
"0.5520641",
"0.55144775",
"0.55045176",
"0.5498907",
"0.5491059",
"0.54783505",
"0.54763937",
"0.5470834",
"0.5464028",
"0.54554754",
"0.54532385",
"0.54532385",
"0.5450939",
"0.5441224",
"0.54367274",
"0.5435835",
"0.54254335",
"0.5414827",
"0.54122275",
"0.54113096",
"0.54032314",
"0.5391554",
"0.5391358",
"0.5378724",
"0.5378724",
"0.5378724",
"0.53776705",
"0.5371516",
"0.5366677",
"0.53666717",
"0.5355049",
"0.5338694",
"0.5338252",
"0.53340656",
"0.5328958",
"0.5320617",
"0.53187746",
"0.5318216",
"0.53158325",
"0.53112495",
"0.5307453",
"0.5306858",
"0.53037214",
"0.53017753",
"0.5299082",
"0.52934587",
"0.52933604",
"0.5292155",
"0.529144",
"0.5288735",
"0.5281202",
"0.52778417",
"0.5265657",
"0.5263838",
"0.5255773"
] |
0.65168166
|
1
|
The Quality of an item is never more than 50
|
@Test
void maxQuality() {
Item[] items = new Item[]{
new Item("Aged Brie", 10, 50),
new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49),
new Item("Aged Brie", 10, 40)
};
GildedRose app = new GildedRose(items);
app.updateQuality();
for (Item item : app.items) {
assertTrue(50 >= item.quality, "Quality shouldn't overtake its max capacity");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"java.lang.String getQuality();",
"@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }",
"public int getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"public int getQuality() {\n return quality;\n }",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"public float getQuality();",
"public double getQuality() {\n return quality;\n }",
"private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }",
"boolean hasQuality();",
"boolean hasQuality();",
"java.lang.String getQualityMax();",
"public int getQuality()\n {\n int sleeplatencyScore = getSleepLatencyScore();\n int sleepDurationScore = getSleepDurationScore();\n int sleepEfficiencyScore= getSleepEfficiencyScore();\n int sleepDeepsleepRatioScore = getDeepSleepRatioScore();\n int nightTimeWakeScore = getNightTimeAwakeningScore();\n int sum = sleeplatencyScore + sleepDurationScore+ sleepEfficiencyScore+ sleepDeepsleepRatioScore+ nightTimeWakeScore;\n sum = sum *4;\n return sum;\n }",
"boolean hasQualityMax();",
"private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }",
"private static double getOEEQuality(Batch batch) {\n double quality = ((double) batch.getAccepted()) / (((double) batch.getAccepted()) + ((double) batch.getDefect()));\n\n return quality;\n }",
"public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }",
"public void setQuality(int value) {\n this.quality = value;\n }",
"Quality getQ();",
"public boolean qualityIsHigh()\n\t{\n\t\tint counter = 0;\n\t\tfor(int i = 0; i < quality.length(); i++) {\n\t\t\tif(quality.charAt(i) == '!') {\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\treturn counter >= 3;\n\t}",
"@Override\n public int getMaxEfficiency(ItemStack itemStack) {\n return 10000;\n }",
"public void setQuality(Integer quality) {\n this.quality = quality;\n }",
"public String getQuality()\n\t{\n\t\treturn quality.getText();\n\t}",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"long getQuantite();",
"int getQuantite();",
"int getQuantite();",
"public int get_quality() {\n return (int)getUIntBEElement(offsetBits_quality(), 16);\n }",
"com.google.protobuf.ByteString\n getQualityBytes();",
"public void setQuality(int quality) {\n this.quality = quality;\n }",
"public void setQuality(int quality) {\n this.quality = quality;\n }",
"@Test\n void agedBrie() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Aged Brie\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"Aged Brie\", app.items[0].name, \"Item name should match expected\");\n assertTrue(originalSellIn > app.items[0].sellIn, \"sellIn date should decrease in value\");\n assertTrue(originalQuality < app.items[0].quality, \"Quality of \\\"Aged Brie\\\" should increase\");\n }",
"public boolean hasQuality() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }",
"public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public DriftCheckModelQuality getModelQuality() {\n return this.modelQuality;\n }",
"@Test //covers loop test with one pass through the loop\n\tpublic void exampleTest() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by one\n\t\tassertEquals(\"Failed quality for Dexterity Vest\", 19, quality);\n\t}",
"public void setQuality(float quality);",
"@Test\r\n\tvoid testCapitalEfficiency() throws IOException {\r\n\t\tStock stock = new Stock(ticker);\r\n\t\tFMPWebReaderFilter adder = new FMPWebReaderFilter();\r\n\t\tstock.setProfile(adder.getStockDetails(stock.getTicker()));\r\n\t\tstock.setCapEff(Evaluator.getCapitalEfficiency(stock));\r\n\t\tassertEquals(\"18\", stock.getCapEff());\r\n\t}",
"public boolean isPopular() {\n\t\treturn (this.sale > 100000);\r\n\t}",
"public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"private String getQuality()\n {\n \n if(high.isSelected())\n {\n return \"High\";\n }\n else if(medium.isSelected())\n {\n return \"Medium\";\n }\n else if(mild.isSelected())\n {\n return \"Mild\";\n }\n else\n {\n \n return null;\n }\n }",
"com.google.protobuf.ByteString\n getQualityMaxBytes();",
"public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Test\n public void qualityScalabilityTestICQ1SendAggregatedLarge() throws IOException, DataFormatException {\n performAggregatedBidTest(\"ICQ/ICQ1\", null);\n }",
"public Collection getQualityResults()\r\n {\r\n return mQualityResults;\r\n }",
"public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n }\n }",
"public String getHistologicalQuality()\r\n \t{\r\n \t\treturn histologicalQuality;\r\n \t}",
"public void checkLowStock()\n {\n for(Product product: stock)\n {\n if(product.getQuantity() < 10)\n {\n System.out.println(product.getID() + \": \" +\n product.name + \" is low on stock, only \" + \n product.getQuantity() + \" in stock\");\n }\n }\n }",
"public static int size_quality() {\n return (16 / 8);\n }",
"@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }",
"int getRatioQuantity();",
"public boolean hasQualityMax() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }",
"public boolean hasQuality() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }",
"public int getQos() {\n return qos;\n }",
"private int calculateQuality() {\n\t\t\n\t\tint quality = inconsistencyCount;\n\t\t\n\t\t/* found solution */\n\t\tif (inconsistencyCount == 0)\n\t\t\treturn 0; \n\t\t\n\t\t/* add cost for each unsupported precondition*/\n\t\tfor(InconsistencyIterator iterator = new InconsistencyIterator(); iterator.hasNext();) {\n\t\t\tLPGInconsistency inconsistency = iterator.next();\n\t\t\tquality += inconsistency.getCurrentLevel();\n\t\t\tif (inconsistency instanceof UnsupportedPrecondition) {\n\t\t\t\tint currentLevel = inconsistency.getCurrentLevel();\n\t\t\t\tPlanGraphLiteral unsupportedPrecondition = ((UnsupportedPrecondition) inconsistency).getUnsupportedPrecondition();\n\t\t\t\tquality += costToSupport(unsupportedPrecondition, currentLevel);\n\t\t\t\tquality += inconsistency.getInitialLevel();\n\t\t\t}\n\t\t}\n\t\t/* check steps, penalize levels with no real steps */\n\t\tfor( int i = 1; i < steps.size() - 1; i++) {\n\t\t\tboolean foundStep = false;\n\t\t\tfor(Iterator<PlanGraphStep> it = steps.get(i).iterator(); it.hasNext();) {\n\t\t\t\tPlanGraphStep next = it.next();\n\t\t\t\tif(!next.isPersistent()){\n\t\t\t\t\tfoundStep = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// increase quality if we have found no real steps \n\t\t\tif (!foundStep)\n\t\t\t\tquality++;\n\t\t}\n\t\t\n\t\treturn quality;\n\t}",
"public static ItemQuality getItemValue(ItemStack stack){\n\t\tswitch(stack.getType()){\n\t\t\tcase LEATHER_HELMET :\n\t\t\tcase LEATHER_CHESTPLATE :\n\t\t\tcase LEATHER_LEGGINGS :\n\t\t\tcase LEATHER_BOOTS : return ItemQuality.Leather;\n\t\t\t\n\t\t\tcase CHAINMAIL_HELMET :\n\t\t\tcase CHAINMAIL_CHESTPLATE :\n\t\t\tcase CHAINMAIL_LEGGINGS :\n\t\t\tcase CHAINMAIL_BOOTS : return ItemQuality.Chain;\n\t\t\t\n\t\t\tcase IRON_HELMET :\n\t\t\tcase IRON_CHESTPLATE :\n\t\t\tcase IRON_LEGGINGS :\n\t\t\tcase IRON_BOOTS : return ItemQuality.Iron;\n\t\t\t\n\t\t\tcase DIAMOND_HELMET :\n\t\t\tcase DIAMOND_CHESTPLATE :\n\t\t\tcase DIAMOND_LEGGINGS :\n\t\t\tcase DIAMOND_BOOTS : return ItemQuality.Diamond;\n\t\t\t\n\t\t\tcase GOLD_HELMET :\n\t\t\tcase GOLD_CHESTPLATE :\n\t\t\tcase GOLD_LEGGINGS :\n\t\t\tcase GOLD_BOOTS : return ItemQuality.Gold;\n\t\t\n\t\t\tdefault: return ItemQuality.None;\n\t\t}\n\t}",
"public int getWorth() { return 1; }",
"int getImageQualityPref();",
"@Test //loop test 0 passes\n\tpublic void testLoop0pass() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = -100;\n\t\tif(! items.isEmpty()) { //check if items is empty, if not get the first item's quality\n\t\t\titems.get(0).getQuality();\n\t\t}\n\t\t//assert quality is -100\n\t\tassertEquals(\"Quality -100 with 0 loop passes\", -100, quality);\n\t}",
"public boolean hasQualityMax() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }",
"public int getQuantite() {\r\n return quantite;\r\n }",
"QualityScenario createQualityScenario();",
"@Test(timeout = 4000)\n public void test050() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoQuality((-5305));\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals((-5305), int0);\n }",
"protected abstract float _getGrowthChance();",
"public static int getEnergyValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}",
"@Test\n\tpublic void leastPopularBike()\n\t{\t\t\n\t\tassertEquals(controller.getReport().getLeastPopularBike(), \"BIKE4\");\n\t}",
"@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}",
"public int getQualifyingPercentage() {\n return qualifyingPercentage;\n }",
"public DriftCheckModelDataQuality getModelDataQuality() {\n return this.modelDataQuality;\n }",
"boolean haveMBQuant()\n {\n return ((mbType & QUANT) != 0);\n }",
"boolean hasQuantity();",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public float randomQual() {\n\t\treturn((float) getRandomInteger(30,250));\n\t}",
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"int steamPerDurability();",
"int getQos();",
"public int howManyAvailable(Item i){/*NOT IMPLEMENTED*/return 0;}",
"public double[] getQualityScores() {\n return null;\n }",
"public double[] getQualityScores() {\n return null;\n }",
"public static int getFoodValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}",
"public static int getOreValueRandomLimit() {\r\n\t\treturn 50;\r\n\t}",
"public float getCapacity();",
"public boolean isAuctionAtMaxCapacity() {\n\t\treturn getInventoryCount() == maxItemsSold;\t\n\t}",
"public int getHealthGain();",
"@Test\r\n public void testLongTermStorageGetAvailableCapacity1()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Available capacity is wrong\", testLongTermStorage.getCapacity(),\r\n testLongTermStorage.getAvailableCapacity());\r\n }",
"public double getECapacity() {\n return eCapacity;\n }",
"@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }",
"@Test //TEST FIVE\n void testPositiveOverLimitWeight()\n {\n Rabbit_RegEx rabbit_weight = new Rabbit_RegEx();\n rabbit_weight.setWeight(17);\n rabbit_weight.setIsBaby(false);\n rabbit_weight.setAge(5);\n String expected = \"Is the rabbit a baby?: false\\n\" +\n \"How old is the rabbit?: 5 years\\n\" +\n \"Weight: 15.0 in pounds\\n\" +\n \"Color: \";\n assertEquals(expected, rabbit_weight.toString());\n }",
"public static int offset_quality() {\n return (48 / 8);\n }"
] |
[
"0.79750043",
"0.7729784",
"0.7616531",
"0.7590091",
"0.74098563",
"0.7337299",
"0.72696245",
"0.7190411",
"0.7055357",
"0.6953283",
"0.6904379",
"0.6808636",
"0.6794648",
"0.6794648",
"0.6794648",
"0.6783139",
"0.67720884",
"0.67245626",
"0.6689496",
"0.6660048",
"0.6660048",
"0.6555263",
"0.6509397",
"0.64618737",
"0.6454939",
"0.6381153",
"0.63401085",
"0.63250214",
"0.632199",
"0.6244735",
"0.6235795",
"0.6136904",
"0.61351967",
"0.6126836",
"0.6125745",
"0.6117672",
"0.6117672",
"0.60720557",
"0.6056192",
"0.604788",
"0.604788",
"0.5999154",
"0.5981786",
"0.596168",
"0.5938073",
"0.59306103",
"0.5925612",
"0.5922916",
"0.5897279",
"0.58935094",
"0.58704555",
"0.58585805",
"0.5855406",
"0.5821087",
"0.58189076",
"0.58153623",
"0.58050597",
"0.57907736",
"0.5785284",
"0.57660824",
"0.5751901",
"0.5746985",
"0.57434136",
"0.5723093",
"0.5720021",
"0.57190126",
"0.56965446",
"0.5662097",
"0.56580055",
"0.56524783",
"0.565048",
"0.5636061",
"0.5631358",
"0.56148267",
"0.5613897",
"0.5612481",
"0.56029505",
"0.559711",
"0.5593417",
"0.55511355",
"0.5533913",
"0.553114",
"0.55206543",
"0.5509615",
"0.5506903",
"0.5505639",
"0.5504448",
"0.5482133",
"0.54739773",
"0.54739773",
"0.54593164",
"0.5450725",
"0.5447184",
"0.544283",
"0.54325414",
"0.5417217",
"0.5402883",
"0.54013205",
"0.53970766",
"0.53872186"
] |
0.7771985
|
1
|
"Sulfuras", being a legendary item, never has to be sold or decreases in Quality
|
@Test
void legendaryItems() {
int[] sellDates = new int[]{-5, 0, 5};
Item[] items = new Item[]{
new Item("Sulfuras, Hand of Ragnaros", sellDates[0], 80),
new Item("Sulfuras, Hand of Ragnaros", sellDates[1], 80),
new Item("Sulfuras, Hand of Ragnaros", sellDates[2], 80)
};
GildedRose app = new GildedRose(items);
app.updateQuality();
for (int i = 0; i < items.length; i++) {
assertEquals(80, app.items[i].quality, "Quality should be fixed");
assertEquals(sellDates[i], app.items[i].sellIn, "SellIn dates should remain the same");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"@Test\n void agedBrie() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Aged Brie\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"Aged Brie\", app.items[0].name, \"Item name should match expected\");\n assertTrue(originalSellIn > app.items[0].sellIn, \"sellIn date should decrease in value\");\n assertTrue(originalQuality < app.items[0].quality, \"Quality of \\\"Aged Brie\\\" should increase\");\n }",
"public void itemsSold() {\n quanitySnacks--;\n }",
"@Test\r\n\tvoid testCapitalEfficiency() throws IOException {\r\n\t\tStock stock = new Stock(ticker);\r\n\t\tFMPWebReaderFilter adder = new FMPWebReaderFilter();\r\n\t\tstock.setProfile(adder.getStockDetails(stock.getTicker()));\r\n\t\tstock.setCapEff(Evaluator.getCapitalEfficiency(stock));\r\n\t\tassertEquals(\"18\", stock.getCapEff());\r\n\t}",
"@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }",
"@Override\n public String getDescription() {\n return \"Digital goods purchase\";\n }",
"@Override\n public String getItemDescription() {\n\treturn \"<html>The rare goblin sword: <br>+4 Strength, +1 craft<br>\"\n\t\t+ \"If you unequipped or loose the sword, you lose 2 lives,<br> unless it would kill you.\";\n }",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"String sku();",
"String sku();",
"public String soovitus(){\n double BMI = kehamassiindeks();\n String soovitus = \"\";\n if ( BMI < 18.6){\n\n soovitus=\"Tarbi rohkem toitu,\\noled alakaalus.\";\n }\n if ( BMI > 25){\n\n soovitus=\"Pead rohkem liigutama,\\noled natuke ülekaalus\";\n }\n if (BMI > 30){\n\n soovitus=\"Tee trenni või tarbi vähem toitu,\\nsest oled üsna ülekaalus.\";\n }\n if( BMI > 18.5 & BMI <= 25 ){\n\n soovitus=\"Oled normaalkaalus.\";\n }\n return soovitus;\n }",
"public String getDescription() {return \"Use an item in your inventory\"; }",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"private String getSuitName() {\n String result;\n if (this.suit == 0) {\n result = \"Clubs\";\n } else if (this.suit == 1) {\n result = \"Diamonds\";\n } else if (this.suit == 2) {\n result = \"Hearts\";\n } else {\n result = \"Spades\";\n }\n return result;\n }",
"public String tegevuseSuvalineSoovitus(){\n int listiSuurus = tegevused.size();\n return tegevused.get((int)(Math.random()*listiSuurus));\n }",
"java.lang.String getQuality();",
"@Override\n public String toString() {\n return \"Stock Glance\";\n }",
"private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }",
"private void trade_shortsell() {\n\t\ttext_code.setText(code);\n\t\t\n\t\tDecimalFormat df=new DecimalFormat(\"#.00\");\n\t\ttext_uprice.setText(df.format(Double.parseDouble(information[2])*1.1) );//涨停价\n\t\t\n\t\ttext_downprice.setText(df.format(Double.parseDouble(information[2])*0.9));//跌停价\n\t\t\n\t\t//getfundown().setText(homepage.get_table_userinfo().getItem(1).getText(1));//可用资金\n\t\t\n\t\t//double d1 = Double.parseDouble(homepage.get_table_userinfo().getItem(1).getText(1));\n\t\t//double d2 = Double.parseDouble(information[3]);\n\t\t//text_limitnum.setText(Integer.toString( (int)(d1/d2) ) );//可卖数量\n\t\t\n\n\t}",
"public String getSmoke ( ) {\n String str = \"\";\n if (this.smoking == true)\n str = \"Smoking\";\n else if (this.smoking == false)\n str = \" \";\n return str;\n }",
"private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"Sku sku();",
"public String getSuitString()\n {\n switch (suit)\n {\n case SPADES: return \"SPADES\";\n case CLUBS: return \"CLUBS\";\n case DIAMONDS: return \"DIAMONDS\";\n case HEARTS: return \"HEARTS\";\n default: return \"Invalid\";\n }\n \n }",
"public void decideNature()\n {\n String nature = new String(\"\");\n Random rand = new Random();\n int i = rand.nextInt(100);\n if(i <= 25)\n {\n nature = \"Very mischievous. Enjoys hiding objects in plain sight\";\n }//ends the if\n else if(i > 25 && i <= 50)\n {\n nature = \"Loves to spend time sleeping on the clouds\";\n }//ends the else if\n else if(i > 50 && i <= 75)\n {\n nature = \"Is very playful\";\n }//ends the else if\n else\n {\n nature = \"Loves to perform dances in the air\";\n }\n \n setNature(nature);\n }",
"public String giveSalesPitch()\r\n\t{\r\n\t\treturn super.getName() + \" pressures others to buy stuff\"; \r\n\t}",
"public String getUnSold() {\n\t\treturn unSold;\n\t}",
"int getQuantite();",
"int getQuantite();",
"String getNeedsInventoryIssuance();",
"@Override\n public String getDescription() {\n return \"Digital goods price change\";\n }",
"public String StrongestWeapon() {\n\t\tString weapon = \"fists\";\n\t\tfor (Item temp: rooms.player.getItems()) {\t\t\t\t// Goes through all items in bag\n\t\t\tif (temp.getID() == \"pocket knife\" && !weapon.equals(\"wrench\")){ // Has pocket knife\n\t\t\t\tweapon = \"pocket knife\";\n\t\t\t}else if (temp.getID() == \"wrench\"){\t\t\t\t// Has wrench\n\t\t\t\tweapon = \"wrench\";\n\t\t\t}else if (temp.getID() == \"sword\"){\t\t\t\t\t// Has sword\n\t\t\t\treturn \"sword\";\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\treturn weapon;\n\t}",
"public String getItemNameIS(ItemStack is)\n\t{\n\t\tString[] types = {\"Turquoise\",\"Onyx\",\"Amethyst\",\"Citrine\",\"Emerald\",\"Ruby\",\"Sapphire\",\"LoadedDirt\",\"LoadedSand\",\"LoadedGravel\"};\n\t\treturn \"wal_ore\"+types[is.getItemDamage()];\n\t}",
"@Override\n public String getDescription() {\n return \"Sell currency\";\n }",
"public void whereIsTheSail()\n {\n // code here\n if(sail) // sail is ture/up\n System.out.println(name + \" sail is up.\\n\");\n else // sale is false/down\n System.out.println(name + \" sail is down.\\n\");\n }",
"@Override\r\n public String getSimbolo() {\n return \"Q\";\r\n }",
"public Shortsword(Quality quality){\n\t\tsuper(\"Shortsword\", quality, Type.ONE_HANDED, 1);\n\t}",
"public String getSuit(){ return this.suit; }",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public int getWorth() { return 1; }",
"public double getSubidaSalarial() {\n\t\tdouble sueldoActual = super.getRetribucion();\n\t\tif(super.getAntigüedad() >= 5) {\n\t\t\treturn (sueldoActual*2/100);\n\t\t}\n\t\telse {\n\t\t\treturn (sueldoActual * 0.015);\n\t\t}\n\t}",
"@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }",
"public String getIsFixPrice();",
"public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }",
"private void pulsarItemMayus(){\n if (mayus) {\n mayus = false;\n texto_frases = texto_frases.toLowerCase();\n }\n else {\n mayus = true;\n texto_frases = texto_frases.toUpperCase();\n }\n fillList(false);\n }",
"protected String stringGoodsInfo() {\n String ret = \"Goods Supply\";\n for (G good : this.goods) {\n ret += \"\\nN = \" + good.supply;\n }\n return ret;\n }",
"public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}",
"public short getSuit(){\n\t\treturn srtSuit;\r\n\t}",
"long getQuantite();",
"EDataType getSusceptance();",
"@Test\n\tpublic void test_PNL_2Deals_Sell_Buy_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, -10.0));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 15.0, 10.0));\n\t\tassertEquals( \"-50.00\", nf.format(new PNLImpl(pa, AAPL).getPNLRealized(false)) );\n\t}",
"protected String getStrainType()\n{\n\treturn \"Met E\";\n}",
"@Test\n void backstagePasses() {\n String name = \"Backstage passes to a TAFKAL80ETC concert\";\n int originalQuality = 10;\n int[] sellDates = new int[]{-1, 10, 5};\n int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};\n\n Item[] items = new Item[]{\n new Item(name, sellDates[0], originalQuality),\n new Item(name, sellDates[1], originalQuality),\n new Item(name, sellDates[2], originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(targetQuality[i], app.items[i].quality, \"Quality must be altered correctly\");\n }\n }",
"public String getSuitAsString(){\n\t\tString str = \"\";\n\t\tif (suit == 0)\n\t\t\tstr = new String(\"Clubs\");\n\t\telse if (suit == 1)\n\t\t\tstr = new String(\"Diamonds\");\n\t\telse if (suit == 2)\n\t\t\tstr = new String(\"Hearts\");\n\t\telse if (suit == 3)\n\t\t\tstr = new String(\"Spades\");\n\t\treturn str;\n\t}",
"int getSellQuantity();",
"@Override\n public String getItemName() {\n\treturn \"Goblin Sword\";\n }",
"public String updateSale(Item item){\r\n\t\tif (itemListContains(item)) {\r\n\t\t\tupdateItemQuantityAndTotal(item);\r\n\t\t\tItem oldItem = items.get(item.getItemIdentifier());\r\n\t\t\treturn oldItem.getItemDescription().toString() + \" | Quantity: \" +oldItem.getQuantity().getAmount() + \"\\t\";\r\n\t\t} else {\r\n\t\t\taddValidItem(item);\r\n\t\t\treturn item.getItemDescription().toString() + \" | Quantity: \" +item.getQuantity().getAmount() + \"\\t\";\r\n\t\t}\r\n\t}",
"public String translateFi(String s) {\n if (s == \"always\") {\n return \"aina\";\n } else if (s == \"often\") {\n return \"usein\";\n } else if (s == \"sometimes\") {\n return \"joskus\";\n } else if (s == \"never\") {\n return \"en koskaan\";\n } else if (s == \"low\") {\n return \"vähän\";\n } else if (s == \"high\") {\n return \"paljon\";\n } else if (s == \"normal\") {\n return \"jonkin verran\";\n }\n return \"\";\n }",
"private String getQuality()\n {\n \n if(high.isSelected())\n {\n return \"High\";\n }\n else if(medium.isSelected())\n {\n return \"Medium\";\n }\n else if(mild.isSelected())\n {\n return \"Mild\";\n }\n else\n {\n \n return null;\n }\n }",
"@Override\n public String getDescriptiveName() {\n \treturn \"Stochastic Depression Analysis\";\n }",
"public String getSuit() {\n return this.suit;\n }",
"boolean hasSuit();",
"@Test\n\tpublic void test_PNL_2Deals_Buy_Sell_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 10.0, 10.0));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 0.10, AAPL, 15.0, -10.0));\n\t\tassertEquals( \"50.00\", nf.format(new PNLImpl(pa, AAPL).getPNLRealized(false)) );\n\t}",
"public String getUnitPrice() {\n\t\tPrice discountP=null;\n\t\tdouble disAmount=this.price.getBasePrice();\n\t\tPrice p=new Price(this.price.getBasePrice());\n\t\tif(this.getDiscount()!=null){\n\t\t\tif(this.getDiscount().getSkuLimit() > 0 && !this.price.getBasePriceUnit().equalsIgnoreCase(\"lb\") && this.getDiscount().getSkuLimit() != this.getQuantity()) {\n\t\t\t\t\n\t\t\t\tdisAmount=this.price.getBasePrice();\n\t\t\t\t\n\t\t\t//APPDEV-4148-Displaying unit price if quantity is greater than sku limit - START\n\t\t\t\t\n\t\t\t\tif(this.getDiscount().getSkuLimit() < this.getQuantity()){\n\t\t\t\t\tif(this.getDiscount().getDiscountType().equals(EnumDiscountType.PERCENT_OFF))\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdisAmount=((this.price.getBasePrice() * this.getQuantity()) - ((this.price.getBasePrice() * this.getDiscount().getSkuLimit()) * this.getDiscount().getAmount() )) / this.getQuantity();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdisAmount=((this.price.getBasePrice() * (this.getQuantity())) - (this.getDiscount().getAmount() * this.getDiscount().getSkuLimit()))/ this.getQuantity() ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//APPDEV-4148-Displaying unit price if quantity is greater than sku limit - END\n\t\t\t\t\n\t\t\t} else if(this.getDiscount().getSkuLimit() > 0 && this.price.getBasePriceUnit().equalsIgnoreCase(\"lb\") && this.getDiscount().getDiscountType().equals(EnumDiscountType.DOLLAR_OFF)) {\n\t\t\t\tdisAmount=this.price.getBasePrice();\n\t\t\t} else {\n\t\t\t\tif(this.getDiscount().getMaxPercentageDiscount() > 0) {\n\t\t\t\t\tdisAmount = this.orderLine.getPrice()/this.orderLine.getQuantity();\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdiscountP=PricingEngine.applyDiscount(p,1,this.getDiscount(),this.price.getBasePriceUnit());\n\t\t\t\t\t\tdisAmount=discountP.getBasePrice();\n\t\t\t\t\t} catch (PricingException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Apply the coupon discount on top of line item discount and calculate the final base price.\n\t\tif (this.getCouponDiscount() != null) {\n\t\t\ttry {\n\t\t\t\tdiscountP = PricingEngine.applyCouponDiscount(null!=discountP?discountP:p, 1/this.getQuantity(), this.getCouponDiscount(), this.price.getBasePriceUnit());\n\t\t\t\tdisAmount = discountP.getBasePrice();\n\t\t\t} catch (PricingException e) {\n\t\t\t\tdisAmount = 0.0;\n\t\t\t}\n\t\t} \n\t\t\t \n\t\treturn CURRENCY_FORMATTER.format(disAmount) + \"/\" + this.price.getBasePriceUnit().toLowerCase();\n\t}",
"String invade(short s) {\n\t\treturn \"a few\";\n\t}",
"public boolean isSold() {\n return sold;\n }",
"@Override\n\tpublic int getStock() {\n\t\treturn 2;\n\t}",
"@Override\r\n\tpublic double foodConsumption() {\n\t\treturn 0;\r\n\t}",
"int computeNutritionalScore(Map<String, Object> product);",
"@Override\n public String getDescription() {\n return \"Alias sell\";\n }",
"java.lang.String getPurpose();",
"public interface FlotationCapacity {\n public String flotation();\n}",
"@Override\n public double salario() {\n return 2600 * 1.10;\n }",
"String getLiquidityIndicator();",
"@Override\r\n\tpublic String smoke() {\n\t\treturn \"我是会抽烟的坏学生\"+s.name;\r\n\t}",
"@Override\n public String getDescription() {\n return \"Digital goods delivery\";\n }",
"public interface OreMineral extends Mineral {\n\tpublic Chemical getConcentrate();\n\t\n\tpublic enum Ores implements OreMineral {\n\t\tACANTHITE(Compounds.Ag2S),\n\t\tANATASE(Compounds.TiO2),\n\t\tARSENOPYRITE(Compounds.FeAsS),\n\t\tAZURITE(Compounds.Cu3CO32OH2),\n\t\tBARITE(Compounds.BaSO4, new Color(250, 250, 170), new Substitution(Sr, 0.05)),\n\t\tBASTNASITE(Compounds.CeCO3F, new Substitution(La, 0.2), new Substitution(Y, 0.1), new Substitution(Sm, 0.01)),\n\t\tBERYL(Compounds.Be3Al2SiO36),\n\t\tBISMUTHINITE(Compounds.Bi2S3),\n\t\tBORAX(Compounds.Na2B4O7),\n\t\tCALCITE(Compounds.CaCO3),\n\t\tCARNALLITE(Compounds.KCl.mix(Compounds.MgCl2_6H2O, 1.0), new Color(255, 255, 204)),\n\t\tCARNOTITE(Compounds.K2U2V2O12_3H2O),\n\t\tCASSITERITE(Compounds.SnO2, new Color(30, 20, 0)),\n\t\tCELESTINE(Compounds.SrSO4, new Color(200, 200, 250), new Substitution(Ba, 0.2)),\n\t\tCHALCOCITE(Compounds.Cu2S),\n\t\tCHALCOPYRITE(Compounds.CuFeS2, new Substitution(Ag, 0.01), new Substitution(Se, 0.01), new Substitution(Te, 0.001)),\n\t\tCHROMITE(Compounds.FeCr2O4),\n\t\tCINNABAR(Compounds.HgS),\n\t\tCOBALTITE(Compounds.CoAsS),\n\t\tCOLUMBITE(Compounds.FeNb2O6, new Substitution(Ta, 0.2)),\n\t\tCUPRITE(Compounds.Cu2O, Color.red),\n\t\tEPSOMITE(Compounds.MgSO4_7H2O),\n\t\tFLUORITE(Compounds.CaF2, new Color(155, 0, 165)),\n\t\tGALENA(Compounds.PbS, new Substitution(Bi, 0.1), new Substitution(Ag, 0.05)),\n\t\tGIBBSITE(Compounds.AlOH3, new Color(155, 75, 35), new Substitution(Ga, 0.001)),\n\t\tGOETHITE(Compounds.alpha_FeOH3, new Substitution(Ni, 0.05), new Substitution(Co, 0.01)),\n\t\tGREENOCKITE(Compounds.CdS),\n\t\tGYPSUM(Compounds.CaSO4_2H2O),\n\t\tHALITE(Compounds.NaCl, new Color(255, 205, 205)),\n\t\tLAUTARITE(Compounds.CaI2O6, new Color(255, 255, 170)),\n\t\tLEPIDOCROCITE(Compounds.gamma_FeOH3),\n\t\tHEMATITE(Compounds.Fe2O3),\n\t\tILMENITE(Compounds.FeTiO3),\n\t\tLEPIDOLITE(Compounds.Li3KSi4O10OH2, new Substitution(Rb, 0.01), new Substitution(Cs, 0.005)),\n\t\tMAGNETITE(Compounds.Fe3O4),\n\t\tMAGNESITE(Compounds.MgCO3),\n\t\tMALACHITE(Compounds.Cu2CO3OH2),\n\t\tMICROLITE(Compounds.NaCaTa2O6OH, new Substitution(Nb, 0.2), \n\t\t\t\t new Substitution(Ce, 0.03), new Substitution(La, 0.015), \n\t\t new Substitution(Nd, 0.01), new Substitution(Y, 0.01), \n\t\t new Substitution(Th, 0.01), new Substitution(U, 0.005)),\n\t\tMIRABILITE(Compounds.Na2SO4_10H2O),\n\t\tMOLYBDENITE(Compounds.MoS2, new Substitution(Re, 0.01)),\n\t\tMONAZITE(Compounds.CePO4, new Substitution(La, 0.5), new Substitution(Nd, 0.3),\n\t\t\t\t new Substitution(Pr, 0.15), new Substitution(Th, 0.5), new Substitution(Sm, 0.05)),\n\t\tNEPOUITE(Compounds.Ni3Si2O5OH4),\n\t\tNITER(Compounds.KNO3),\n\t\tNITRATINE(Compounds.NaNO3, new Color(222, 184, 135)),\n\t\tORPIMENT(Compounds.As2S3),\n\t\tPENTLANDITE(Compounds.Ni9S8, new Substitution(Fe, 1.0), new Substitution(Co, 0.01)),\n\t\tPOLLUCITE(Compounds.Cs2Al2Si4O12, new Substitution(Rb, 0.05)),\n\t\tPYRITE(Compounds.FeS2, new Substitution(Ni, 0.1), new Substitution(Co, 0.05)),\n\t\t// FIXME: how to indicate that Nb is being substituted?\n\t\tPYROCHLORE(Compounds.NaCaNb2O6OH, new Substitution(Ta, 0.1), \n\t\t\t\t new Substitution(Ce, 0.03), new Substitution(La, 0.015), \n\t\t new Substitution(Nd, 0.01), new Substitution(Y, 0.01), \n\t\t new Substitution(Th, 0.01), new Substitution(U, 0.005)),\n\t\tPYROLUSITE(Compounds.MnO2),\n\t\tQUARTZ(Compounds.SiO2),\n\t\tREALGAR(Compounds.AsS),\n\t\tRUTILE(Compounds.TiO2, new Color(130, 60, 5)),\n\t\tSCHEELITE(Compounds.CaWO4, new Color(240, 200, 150)),\n\t\tSPHALERITE(Compounds.ZnS, new Color(30, 75, 50), \n\t\t\t\t new Substitution(Cd, 0.01), new Substitution(Ga, 0.005), \n\t\t\t\t new Substitution(Ge, 0.002), new Substitution(In, 0.002)),\n\t\tSPODUMENE(Compounds.LiAlSiO32),\n\t\tSTIBNITE(Compounds.Sb2S3),\n\t\tSYLVITE(Compounds.KCl, new Color(255, 230, 205)),\n\t\tTANTALITE(Compounds.FeTa2O6, new Substitution(Nb, 0.1)),\n\t\tTENNANTITE(Compounds.Cu12As4S13),\n\t\tTETRAHEDRITE(Compounds.Cu12Sb4S13),\n\t\tTITANO_MAGNETITE(Compounds.Fe3O4.mix(Compounds.TiO2, 0.3).mix(Compounds.V2O5, 0.1)),\n\t\tURANINITE(Compounds.UO2),\n\t\tVANADINITE(Compounds.Pb5V3O12Cl),\n\t\tWOLFRAMITE(Compounds.FeWO4),\n\t\tZIRCON(Compounds.ZrSiO4, new Color(130, 60, 5)),\n\t\t\n\t\tGOLD(Au),\n\t\tELECTRUM(Alloys.ELECTRUM),\n\t\tPLATINUM(Pt.mix(Pd, 1.0).mix(Ru, 0.25).mix(Rh, 0.2)\n\t\t\t\t.mix(Ir, 0.01).mix(Alloys.IRIDOSMINE, 0.01)),\n\t\tSULFUR(S),\n\t\t\n\t\tSAL_AMMONIAC(Compounds.NH4Cl)\n\t\t;\n\n\t\tprivate OreMineral delegate;\n\t\t\n\t\tprivate Ores(OreMineral delegate) {\n\t\t\tthis.delegate = delegate;\n\t\t}\n\t\t\n\t\tprivate Ores(Mixture mixture) {\n\t\t\tthis(mixture, null);\n\t\t}\n\t\t\n\t\tprivate Ores(Mixture mixture, Color color) {\n\t\t\tthis(new SimpleOreMineral(mixture, color));\n\t\t}\n\t\t\n\t\tprivate Ores(Chemical material, Substitution... substitution) {\n\t\t\tthis(material, null, substitution);\n\t\t}\n\t\t\n\t\tprivate Ores(Chemical material, Color color, Substitution... substitution) {\n\t\t\tthis(new SimpleOreMineral(material, color, substitution));\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic List<MixtureComponent> getComponents() {\n\t\t\treturn delegate.getComponents();\n\t\t}\n\n\t\t@Override\n\t\tpublic ConditionProperties getProperties(Condition condition) {\n\t\t\treturn delegate.getProperties(condition);\n\t\t}\n\n\t\t@Override\n\t\tpublic Chemical getConcentrate() {\n\t\t\treturn delegate.getConcentrate();\n\t\t}\n\n\t\t@Override\n\t\tpublic Ore mix(IndustrialMaterial material, double weight) {\n\t\t\treturn new SimpleOre(this).mix(material, weight);\n\t\t}\n\n\t\t@Override\n\t\tpublic Mixture removeAll() {\n\t\t\treturn delegate.removeAll();\n\t\t}\n\t}\n\t\n\tpublic static class Substitution extends MixtureComponent {\n\t\tpublic Substitution(Element substitute, double rate) {\n\t\t\tsuper(substitute, rate);\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic Element getMaterial() {\n\t\t\treturn (Element)this.material;\n\t\t}\n\t}\n}",
"@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}",
"public String stampaSalute()\r\n\t{\r\n\r\n\t\tString s = \"\";\r\n\t\tint numeroAsterischi = (int)(energia*10.0);\r\n\t\tfor (int k = 0; k < numeroAsterischi; k++) s += \"*\";\r\n\t\treturn s;\r\n\r\n\t\t\r\n\t}",
"public void buyhouse(int cost){\n\t\n}",
"public String toString() { return \"Freeform\"; }",
"Builder addEducationalUse(Text value);",
"public String getSuitAsString (int aSuit)\n {\n switch (aSuit)\n {\n case 1:return(\"Spades\");\n case 2:return(\"Diamonds\");\n case 3:return(\"Clubs\");\n case 4:return(\"Hearts\");\n default:return(\"Invalid Rank\");\n }\n }",
"public static Unit siege(){\n\t\tUnit unit = new Unit(\"Siege\", \"C_W_Siege\", 15, 5, 12, 14, 4);\n\t\tunit.addWep(new Weapon(\"Warhammer\",10,5));\n\t\tunit.addActive(ActiveType.SLAM);\n\t\tunit.addActive(ActiveType.POWER);\n\t\tunit.addPassive(PassiveType.ALERT);\n\t\treturn unit;\n\t}",
"@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }",
"public String getSuit()\r\n { return suit; }",
"public void setSucursal(java.lang.String sucursal) {\n this.sucursal = sucursal;\n }",
"public double getFluctuation() { return fluctuation; }",
"@Test\n public void getBoostBoxRequirement_matchesUsaSpreadsheet() {\n SiteInfo si = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n assertEquals(4.0, si.getBoostBoxRequirement(), 0.05);\n }"
] |
[
"0.67242604",
"0.6696457",
"0.6584824",
"0.65422",
"0.64932066",
"0.64549875",
"0.62431115",
"0.6137103",
"0.6102239",
"0.6032415",
"0.6022306",
"0.59888405",
"0.589188",
"0.5887869",
"0.5878295",
"0.5877786",
"0.5865997",
"0.58502245",
"0.5830597",
"0.5830597",
"0.5825932",
"0.58208305",
"0.57757145",
"0.5700797",
"0.568132",
"0.5590714",
"0.5580148",
"0.5578923",
"0.5578054",
"0.5576628",
"0.55713123",
"0.5561666",
"0.5546008",
"0.5545237",
"0.55403197",
"0.5501229",
"0.54861253",
"0.54857916",
"0.5479081",
"0.5479081",
"0.5456166",
"0.542944",
"0.5416812",
"0.540216",
"0.5400744",
"0.5394272",
"0.5388895",
"0.53879434",
"0.53703594",
"0.53700304",
"0.53656137",
"0.5350068",
"0.5345537",
"0.5323638",
"0.5321674",
"0.5313864",
"0.5307412",
"0.5305633",
"0.5302646",
"0.52986145",
"0.5295352",
"0.52903473",
"0.52659386",
"0.5265842",
"0.5261357",
"0.5257911",
"0.52542436",
"0.525415",
"0.52516556",
"0.52460045",
"0.5245463",
"0.52447426",
"0.5240995",
"0.52390355",
"0.52385294",
"0.52354825",
"0.52354807",
"0.52278185",
"0.52277917",
"0.5223764",
"0.52231145",
"0.5222443",
"0.52172536",
"0.5214912",
"0.52125543",
"0.5211689",
"0.5211088",
"0.5203793",
"0.5203392",
"0.52023494",
"0.51995933",
"0.5199142",
"0.5194945",
"0.5184173",
"0.5183803",
"0.5183479",
"0.5176131",
"0.51727355",
"0.5170776",
"0.5168758"
] |
0.5606379
|
25
|
/ "Backstage passes", like aged brie, increases in Quality as its SellIn value approaches; Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but Quality drops to 0 after the concert
|
@Test
void backstagePasses() {
String name = "Backstage passes to a TAFKAL80ETC concert";
int originalQuality = 10;
int[] sellDates = new int[]{-1, 10, 5};
int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};
Item[] items = new Item[]{
new Item(name, sellDates[0], originalQuality),
new Item(name, sellDates[1], originalQuality),
new Item(name, sellDates[2], originalQuality)
};
GildedRose app = new GildedRose(items);
app.updateQuality();
for (int i = 0; i < items.length; i++) {
assertEquals(targetQuality[i], app.items[i].quality, "Quality must be altered correctly");
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}",
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"@Test\n void conjuredItems() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Conjured Mana Cake\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(originalQuality - 2, app.items[0].quality, \"Quality of \\\"Conjured\\\" item should decrease twice as fast\");\n }",
"@Test\n void agedBrie() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Aged Brie\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"Aged Brie\", app.items[0].name, \"Item name should match expected\");\n assertTrue(originalSellIn > app.items[0].sellIn, \"sellIn date should decrease in value\");\n assertTrue(originalQuality < app.items[0].quality, \"Quality of \\\"Aged Brie\\\" should increase\");\n }",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Override\n public void updateBudgetPassed() {\n }",
"VariableAmount getExtremeSpikeIncrease();",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"float getPostGain();",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"private void tickIsInProduction() {\n if (this.timeInState == this.unitInfo.getProductionTime() - 1) {\n this.player.setSuppliesMax(this.player.getSuppliesMax() + this.unitInfo.getSuppliesGain());\n changeState(this.unitInfo.getUnitStateAfterProduction());\n \n if (this.producer != null)\n this.producer.changeState(UnitState.HOLD);\n }\n \n }",
"float getPreGain();",
"public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}",
"public void determineWeeklyPay(){\r\n weeklyPay = commission*sales;\r\n }",
"Builder extremeSpikeIncrease(VariableAmount increase);",
"private int calculateQuality() {\n\t\t\n\t\tint quality = inconsistencyCount;\n\t\t\n\t\t/* found solution */\n\t\tif (inconsistencyCount == 0)\n\t\t\treturn 0; \n\t\t\n\t\t/* add cost for each unsupported precondition*/\n\t\tfor(InconsistencyIterator iterator = new InconsistencyIterator(); iterator.hasNext();) {\n\t\t\tLPGInconsistency inconsistency = iterator.next();\n\t\t\tquality += inconsistency.getCurrentLevel();\n\t\t\tif (inconsistency instanceof UnsupportedPrecondition) {\n\t\t\t\tint currentLevel = inconsistency.getCurrentLevel();\n\t\t\t\tPlanGraphLiteral unsupportedPrecondition = ((UnsupportedPrecondition) inconsistency).getUnsupportedPrecondition();\n\t\t\t\tquality += costToSupport(unsupportedPrecondition, currentLevel);\n\t\t\t\tquality += inconsistency.getInitialLevel();\n\t\t\t}\n\t\t}\n\t\t/* check steps, penalize levels with no real steps */\n\t\tfor( int i = 1; i < steps.size() - 1; i++) {\n\t\t\tboolean foundStep = false;\n\t\t\tfor(Iterator<PlanGraphStep> it = steps.get(i).iterator(); it.hasNext();) {\n\t\t\t\tPlanGraphStep next = it.next();\n\t\t\t\tif(!next.isPersistent()){\n\t\t\t\t\tfoundStep = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// increase quality if we have found no real steps \n\t\t\tif (!foundStep)\n\t\t\t\tquality++;\n\t\t}\n\t\t\n\t\treturn quality;\n\t}",
"@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}",
"@Test\n public void BackstagePass_HandleSpecialCase() {\n GildedRose sut = new GildedRose(createItemArray(BACKSTAGE_PASS, 5, 40));\n sut.updateQuality();\n assertEquals(42, sut.items[0].quality);\n }",
"private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \n\t\t}\n\t\telse {\n\t\t\tJOptionPane.showMessageDialog(null, \"error\");\n\t\t}\n\t}",
"private void applyLvlUpCost() {\n }",
"public int getQuality()\n {\n int sleeplatencyScore = getSleepLatencyScore();\n int sleepDurationScore = getSleepDurationScore();\n int sleepEfficiencyScore= getSleepEfficiencyScore();\n int sleepDeepsleepRatioScore = getDeepSleepRatioScore();\n int nightTimeWakeScore = getNightTimeAwakeningScore();\n int sum = sleeplatencyScore + sleepDurationScore+ sleepEfficiencyScore+ sleepDeepsleepRatioScore+ nightTimeWakeScore;\n sum = sum *4;\n return sum;\n }",
"@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=30-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}",
"@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=50-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}",
"public BigDecimal getBSCA_ProfitPriceLimitEntered();",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"@Test\r\n\tpublic void calculQualityAxisWithNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 4f), new Float(0));\r\n\t}",
"protected abstract float _getGrowthChance();",
"@Test\n\tpublic void gapsLeadToBadQuality() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tt1.addValue(new SampledValue(new FloatValue(234F), 60, Quality.BAD));\n\t\tt0.setInterpolationMode(InterpolationMode.STEPS);\n\t\tt1.setInterpolationMode(InterpolationMode.STEPS);\n\t\tfinal ReadOnlyTimeSeries avg = MultiTimeSeriesUtils.getAverageTimeSeries(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0L, 110);\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(59).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(60).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(63).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(70).getQuality());\n\t}",
"public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}",
"public void computer()\n\t{\n\t\tif( this.days <= 5 )\n\t\t\tthis.charge = 500 * this.days ; \n\t\telse if( this.days <= 10)\n\t\t\tthis.charge = 400 * (this.days-5) + 2500 ; \n\t\telse\n\t\t\tthis.charge = 200 * (this.days-10) + 2500 + 2000 ;\n\t}",
"@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=20-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}",
"public void buyFuelGainMultiply() {\n this.fuelGainMultiply++;\n }",
"private static double getOEEQuality(Batch batch) {\n double quality = ((double) batch.getAccepted()) / (((double) batch.getAccepted()) + ((double) batch.getDefect()));\n\n return quality;\n }",
"public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }",
"public HardSoftScore calculateScore(MPSReadinessCheckSolution solution) {\n\t\tint hardScore = 0, softScore = 0;\n\t\tMap<ProductionPlant, Map<Date, List<FixedPlanEntry>>> fulfilled = solution.getFulfilledMPS();\n\t\tMap<PlanEntryIndex, MRPEntry> mrp = solution.getAccumulatedMRP();\n\t\tMap<ProductionPlant, Map<Date, Map<UUID, Integer>>> aggregatecDemands = aggregateDemands(fulfilled);\n\t\tfor (Map.Entry<ProductionPlant, Map<Date, Map<UUID, Integer>>> fulfilledByLocEntry: aggregatecDemands.entrySet()) {\n\t\t\tProductionPlant fulfilledLoc = fulfilledByLocEntry.getKey();\n\t\t\tMap<Date, Map<UUID, Integer>> fulfilledByLoc = fulfilledByLocEntry.getValue();\n\t\t\tfor (Map.Entry<Date, Map<UUID, Integer>> fulfilledByDateEntry: fulfilledByLoc.entrySet()) {\n\t\t\t\tDate fulfilledDate = fulfilledByDateEntry.getKey();\n\t\t\t\tMap<UUID, MRPEntry> mrpPlan = findMRPSupportByFulfilledDate(mrp, fulfilledLoc, fulfilledDate);\n\t\t\t\tif (mrpPlan == null) {\n\t\t\t\t\thardScore = -10;\n\t\t\t\t\t//System.out.println(\"no mrp plan, date=\" + fulfilledDate);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tMap<UUID, Integer> skuDemands = fulfilledByDateEntry.getValue();\n\t\t\t\tfor (Map.Entry<UUID, Integer> skuDemand: skuDemands.entrySet()) {\n\t\t\t\t\tSystem.out.println(\"skuDemand:\" + skuDemand);\n\t\t\t\t\tUUID skuNo = skuDemand.getKey();\n\t\t\t\t\tint mpsQty = skuDemand.getValue();\n\t\t\t\t\t//System.out.println(\"calculateScore Called, skuNo=\" + skuNo + \",mpsQty =\" + mpsQty);\n\t\t\t\t\tif (mpsQty == 0) {\n\t\t\t\t\t\thardScore++;\n\t\t\t\t\t\t//System.out.println(\"calculateScore no demand, hardscore:\" + hardScore);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tMRPEntry mrpEntry = mrpPlan.get(skuNo);\n\t\t\t\t\tif (mrpEntry == null) {\n\t\t\t\t\t\thardScore=-10;\n\t\t\t\t\t\t//System.out.println(\"calculateScore no mrp, hardscore:\" + hardScore + \",sku=\" + skuDemand.getKey());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (mrpEntry.getPlanQty() >= mpsQty) {\n\t\t\t\t\t\thardScore++;\n\t\t\t\t\t\t//System.out.println(\"calculateScore mrp meet demand, hardscore:\" + hardScore + \",mrpEntry=\" + mrpEntry);\n\t\t\t\t\t} else { \n\t\t\t\t\t\thardScore = -1;\n\t\t\t\t\t\t//System.out.println(\"calculateScore mrp less than demand, hardscore:\" + hardScore + \",mrpEntry=\" + mrpEntry);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (hardScore < 0) break;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"end calculateScore Called, hardScore=\" + hardScore + \",solution=\" + solution);\n\t\t//System.out.println(\"\");\n\t\treturn HardSoftScore.valueOf(hardScore, softScore);\n\t}",
"public BigDecimal getBSCA_ProfitPriceStdEntered();",
"@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }",
"private float calculGainNumerical(KnowledgeBase kb, int attIndex) {\r\n\t\tArrayList<AttributeValue<Float>> possibleValue =findPossibleValueNumerical(kb,attIndex);\r\n\t\tArrayList<ArrayList<ArrayList<Integer>>> multiple_counters2D = new ArrayList<ArrayList<ArrayList<Integer>>>();\r\n\t\tfor(int i=0;i<possibleValue.size()-1;i++){\r\n\t\t\tmultiple_counters2D.add(kb.count2DNumeric(possibleValue.get(i),attIndex));\t\t\r\n\t\t}\r\n\t\tArrayList<Integer> counter1D = kb.count(kb.getIndexClass());\r\n\t\tfloat gini1D = calculImpurity(kb.getSamples().size(),counter1D);\r\n\t\tint indexBestSplit = find_bestSplit(kb,attIndex,multiple_counters2D);\r\n\t\t///\r\n\t\tArrayList<ArrayList<Integer>> counter2D = kb.count2DNumeric(attIndex, kb.getIndexClass(),possibleValue.get(indexBestSplit));\r\n\t\tfloat gini2D = calculImpurity2DForNumerical(kb,attIndex,counter2D,possibleValue.get(indexBestSplit));\r\n\t\treturn gini1D - gini2D;\r\n\t}",
"@Test\n public void FinalConvertSGDStandard(){\n CurrencyRates one = new CurrencyRates();\n\n //Initialise list of sums\n ArrayList<Double> sumList1 = new ArrayList<Double>();\n sumList1.add(10.50);\n sumList1.add(11.50);\n sumList1.add(80.00);\n sumList1.add(10.12);\n sumList1.add(50.60);\n sumList1.add(70.60);\n\n double finalSum = one.finalSumAUD(sumList1);\n\n //converts AUD to SGD\n double retValue = one.AUDtoNewCurrency(3, one.exchangeRate, finalSum);\n assertEquals(221.65, retValue, 0.0);\n\n }",
"public int increaseDefense () {\n return 3;\n }",
"private int calculateCalories(int steps) {\n\t\treturn (int) (steps * 0.25);\n\t}",
"String getBackOffMultiplier();",
"@Test\r\n\tpublic void calculMetricSuperiorWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(10f, 1f), 12f, 9f), new Float(1));\r\n\t}",
"private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }",
"public void decay() {\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) quantity[i][j][k] *= (1 - decayRate*sim.getDt());\r\n\t}",
"public static void main(String[] args) {\n ex75DecreasingCounter counter = new ex75DecreasingCounter(10);\n\n counter.printValue();\n\n counter.decrease();\n counter.printValue();\n\n counter.decrease();\n counter.printValue();\n }",
"@Test //covers loop test with one pass through the loop\n\tpublic void exampleTest() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by one\n\t\tassertEquals(\"Failed quality for Dexterity Vest\", 19, quality);\n\t}",
"public void cal_FineFuelMoisture(){\r\n\tdouble DIF=dry-wet;\r\n\tfor (int i=1;i<=3; i++){\r\n\tif ((DIF-C[i])<=0){ \r\n\t\t\r\n\t\tFFM=B[i]*Math.exp(A[i]*DIF);\r\n\t}\r\n\t}\r\n}",
"public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }",
"double getExtremeSpikeProbability();",
"float getConsumeReduction();",
"int steamPerDurability();",
"int calculateCap();",
"private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }",
"public double quaterlyHealthInsurance(){\n return (this.healthInsurancePerAnnum*4)/12;\n }",
"public float spiderScaleAmount()\n {\nreturn 1F;\n }",
"public abstract double calculateQuarterlyFees();",
"public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}",
"int getSellQuantity();",
"@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}",
"public void changeStockVal() {\n double old = _stockVal;\n _stockVal = 0;\n for (Company x : _stocks.keySet()) {\n _stockVal += x.getPrice() * _stocks.get(x);\n }\n _stockValChanged = _stockVal - old;\n\n }",
"public void setDecayRate(double newDecayRate ){\n\n decayRate= newDecayRate;\n}",
"@Test\n public void testRoundsDown() throws Exception {\n gm.setPlayerInfo(clientPlayer2);\n gm.setThisPlayerIndex(clientPlayer2.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertEquals(4, dc.getMaxDiscard());\n dc.increaseAmount(ResourceType.WHEAT);\n dc.increaseAmount(ResourceType.BRICK);\n dc.increaseAmount(ResourceType.BRICK);\n dc.increaseAmount(ResourceType.ORE);\n // This increase should not work\n dc.increaseAmount(ResourceType.ORE);\n assertEquals(1, getAmounts().getOfType(ResourceType.WHEAT));\n assertEquals(2, getAmounts().getOfType(ResourceType.BRICK));\n assertEquals(1, getAmounts().getOfType(ResourceType.ORE));\n }",
"@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }",
"public void test(int studyReq, int points) {\r\n\t\tdouble score = 0;\r\n\t\ttotalPoints+=points;\r\n\t\tif(testReadiness >= studyReq) {\r\n\t\t\tscore = points;\r\n\t\t\tcurrentPoints+=points;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcurrentPoints+=points - (studyReq - testReadiness);\r\n\t\t\tscore = points - (studyReq - testReadiness);\r\n\t\t}\r\n\t\t\r\n\t\tgrade = currentPoints/totalPoints;\r\n\t\tif(grade < 0) {\r\n\t\t\tgrade = 0;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"You took the test today and got \" + ((score/points) * 100) + \"%\");\r\n\t\tSystem.out.println(\"hours needed: \" + studyReq + \"\\nhours Studied: \" + testReadiness);\r\n\t\ttestReadiness = 0;\r\n\t}",
"public void figure() {\r\n Currency nAdv = Currency.Zero;\r\n Currency nLow = Currency.NegativeOne;\r\n Currency nHigh = Currency.Zero;\r\n Currency nTotal = Currency.Zero;\r\n \r\n for(int i = 0; i < dayArray.size(); i++) {\r\n DayG dayG = (DayG) dayArray.get(i);\r\n Currency gross = dayG.getGross();\r\n \r\n nAdv = nAdv.add(gross);\r\n nTotal = nTotal.add(gross);\r\n if(nLow == Currency.NegativeOne || gross.lt(nLow)) {\r\n lowD = dayG;\r\n nLow = gross;\r\n }\r\n if(nHigh.lt(gross)) {\r\n highD = dayG;\r\n nHigh = gross;\r\n }\r\n }\r\n \r\n adverage = nAdv.divide(dayArray.size()).round();\r\n low = nLow.round();\r\n high = nHigh.round();\r\n \r\n //no need to round total, right?\r\n total = nTotal;\r\n }",
"float getCostReduction();",
"public double calcEnergyToBeBought(double neededEnergy) {\n double energyLossIncluded = neededEnergy/cableEnergyLoss; //Here the amount of energy lost is calculated, see cable.getCost() and http://large.stanford.edu/courses/2010/ph240/harting1/\n return energyOffer.getEnergy() <= energyLossIncluded ? (energyOffer.getEnergy()) : energyLossIncluded;\n }",
"private void graduallyChange() {\r\n\t\t\tif(governmentLegitimacy> 0.2) governmentLegitimacy -= 0.01;\r\n\t\t}",
"@Override\r\n\tpublic double foodConsumption() {\n\t\treturn 0;\r\n\t}",
"float getFixedHotwordGain();",
"public void claimDollars() {\n if (totalSpent >= 5000) {\n airlineDollars += ( ((totalSpent - (totalSpent % 5000)) / 5000) * 400);\n totalSpent = totalSpent % 5000;\n }\n }",
"@Override \r\npublic double earnings() { \r\n\t return getWage() * getPieces(); \r\n}",
"public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"public static void main(String[] args) {\r\n\t Scanner in = new Scanner(System.in);\r\n\t int d1 = in.nextInt();\r\n\t int m1 = in.nextInt();\r\n\t int y1 = in.nextInt();\r\n\t int d2 = in.nextInt();\r\n\t int m2 = in.nextInt();\r\n\t int y2 = in.nextInt();\r\n\t LocalDate returnDate=LocalDate.of(y1,m1,d1);\r\n\t LocalDate dueDate=LocalDate.of(y2,m2,d2);\r\n\t long fine=0;\r\n\t if(returnDate.isBefore(dueDate)||returnDate.equals(dueDate))fine=0;\r\n\t else if(returnDate.isAfter(dueDate)){\r\n\t \tif(returnDate.getYear()==dueDate.getYear()){\r\n\t \t\tif(returnDate.getMonth()==dueDate.getMonth()){\r\n\t \t\t\tfine=(returnDate.getDayOfYear()-dueDate.getDayOfYear())*15;\r\n\t \t\t}else{\r\n\t \t\t\t\tfine=(returnDate.getMonthValue()-dueDate.getMonthValue())*500;\r\n\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \t\t\r\n\t } else fine=10000;\r\n\t }else fine=10000;\r\n\t System.out.println(fine);\r\n\t }",
"public void Down4()\r\n {\r\n if(By2>0 && By2<900){\r\n \r\n By2+=2.5;\r\n }\r\n }",
"public void sell() {\n for (Company x : _market.getCompanies()) {\n if (x.getRisk() > _confidence || x.numLeft() < 3 || x.getRisk() < _confidence - 15){\n if (_stocks.get(x) == 1) {\n _stocks.remove(x);\n } else {\n _stocks.put(x, _stocks.get(x) - 1);\n }\n _money += x.getPrice();\n x.gain();\n break;\n } else {\n _happy = true;\n }\n }\n }",
"private void strengthen(float hp) {\n this.hp += hp;\n if (this.hp > MAX_HP) {\n this.hp = MAX_HP;\n }\n }",
"public int computeFine(int today);",
"@Test //loop test 2 passes\n\tpublic void testLoop2pass() {\n\t\t//create an inn, add two items, and simulate one day\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", 0, 80));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the second set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(1).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Failed quality for Sulfuras\", 80, quality);\n\t}",
"public int getHealthGain();",
"@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }",
"protected void gainEXP(int gain) {\n this.totalEXP += gain;\n }",
"public abstract double experience();",
"public BigDecimal getConvertedShrinkQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedShrinkQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"BigDecimal getRecoveryFactor();",
"public double calculateWIP() {\n\t\tdouble totalDeliveryRate = 0.0;\n\t\tdouble totalLeadTime = 0.0;\n LinkedList<Card> completedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : completedCards) {\n totalLeadTime += (int) DAYS.between(card.getCreationDate(versions), card.getCompletionDate(versions));\n\t\t\ttotalDeliveryRate += card.getStoryPoints();\t\n\n }\n\t\ttotalDeliveryRate = totalDeliveryRate/ (BoardManager.get().getCurrentBoard().getAge()); // avrage of cards delivered per time unit\n\t\ttotalLeadTime = totalLeadTime / completedCards.size(); // avarage time it takes to finish a card\n return Math.round(totalDeliveryRate * totalLeadTime * 100D) / 100D;\n }",
"@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}",
"public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }",
"public String computeGrade(double quality) {\n\t\tString grade = \"\";\n\t\t\t\t\n\t\tif (quality < -3)\n\t\t\tgrade = \"C-\";\n\t\telse if (quality < -2)\n\t\t\tgrade = \"C+\";\n\t\telse if (quality < -1)\n\t\t\tgrade = \"C+\";\n\t\telse if (quality < -1)\n\t\t\tgrade = \"B-\";\n\t\telse if (quality < 0)\n\t\t\tgrade = \"B\";\n\t\telse if (quality < 1)\n\t\t\tgrade = \"B+\";\n\t\telse if (quality < 2)\n\t\t\tgrade = \"A-\";\n\t\telse if (quality < 3)\n\t\t\tgrade = \"A\";\n\t\telse //if (quality < 4)\n\t\t\tgrade = \"A+\";\n\t\t\t\t\n\t\treturn grade;\n\t}"
] |
[
"0.67111564",
"0.6660435",
"0.6501414",
"0.643525",
"0.63356775",
"0.6305869",
"0.62253386",
"0.61701375",
"0.61661786",
"0.6148272",
"0.6100729",
"0.60728407",
"0.60495913",
"0.6045948",
"0.58739364",
"0.5846969",
"0.582609",
"0.58203506",
"0.58130455",
"0.5787016",
"0.5786783",
"0.5781307",
"0.5769788",
"0.5757539",
"0.5732294",
"0.57143617",
"0.5625552",
"0.5611794",
"0.56087136",
"0.559227",
"0.5582646",
"0.5574564",
"0.5571068",
"0.5568655",
"0.55651283",
"0.5550425",
"0.55448294",
"0.5511877",
"0.54881346",
"0.54856724",
"0.54653853",
"0.5454711",
"0.54538417",
"0.54477006",
"0.54308194",
"0.5430097",
"0.54165936",
"0.5416355",
"0.5412903",
"0.5402395",
"0.53935343",
"0.5388421",
"0.53816545",
"0.53790593",
"0.5377381",
"0.5364031",
"0.53610164",
"0.5355248",
"0.53544533",
"0.5351842",
"0.5350098",
"0.5349291",
"0.53478724",
"0.534141",
"0.5338312",
"0.53348607",
"0.5329998",
"0.5327155",
"0.53208864",
"0.5319683",
"0.5306437",
"0.5306237",
"0.5304958",
"0.5297365",
"0.52798414",
"0.52796125",
"0.5276948",
"0.52764934",
"0.5270303",
"0.52698725",
"0.5269728",
"0.52563494",
"0.5255577",
"0.52524567",
"0.5251693",
"0.5251426",
"0.5250243",
"0.52464294",
"0.5246315",
"0.5245168",
"0.5244142",
"0.52414846",
"0.52412504",
"0.52369016",
"0.5236599",
"0.5231974",
"0.52251846",
"0.5224826",
"0.52220124",
"0.52187014"
] |
0.67114824
|
0
|
"Conjured" items degrade in Quality twice as fast as normal items
|
@Test
void conjuredItems() {
int originalSellIn = 10;
int originalQuality = 10;
Item[] items = new Item[]{new Item("Conjured Mana Cake", originalSellIn, originalQuality)};
GildedRose app = new GildedRose(items);
app.updateQuality();
assertEquals(originalQuality - 2, app.items[0].quality, "Quality of \"Conjured\" item should decrease twice as fast");
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Test\n\tpublic void testQualityWithSellInUnder0Concert() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", -1, 100));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased to 0\n\t\tassertEquals(\"Quality with sellIn under 0 concert passes\", 0, quality);\n\t}",
"@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }",
"@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}",
"@Test\n void maxQuality() {\n Item[] items = new Item[]{\n new Item(\"Aged Brie\", 10, 50),\n new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 49),\n new Item(\"Aged Brie\", 10, 40)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (Item item : app.items) {\n assertTrue(50 >= item.quality, \"Quality shouldn't overtake its max capacity\");\n }\n }",
"@Test\n\tpublic void testQuality1SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 1, quality);\n\t}",
"@Test\n\tpublic void testQualityOver50SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -11, 51));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Brie\", 51, quality);\n\t}",
"private void decreaseQualityIfPositiveValue(Item item) {\n if (item.quality > 0) {\n decreaseQualityIfItemIsNotSulfuras(item);\n }\n }",
"@Test\n\tpublic void testQualityUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", 1, -1));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality under 0 Conjured Mana Cake\", -1, quality);\n\t}",
"private void increaseQualityByOne(Item item) {\n item.quality = item.quality + 1;\n }",
"@Test\n\tpublic void testQualityWithSellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Conjured Mana Cake\", -1, 6));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by two\n\t\tassertEquals(\"Quality with sellIn under 0 Conjured Mana Cake\", 4, quality);\n\t}",
"@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}",
"@Test\n\tpublic void testConsertPassQuality() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by two (perhaps should be one)\n\t\tassertEquals(\"Quality consert backstage passes\", 22, quality);\n\t}",
"@Test\n\tpublic void testQuality0SellInUnder0() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", -11, 0));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Quality with quality 0 Sulfuras\", 0, quality);\n\t}",
"@Test\n void agedBrie() {\n int originalSellIn = 10;\n int originalQuality = 10;\n\n Item[] items = new Item[]{new Item(\"Aged Brie\", originalSellIn, originalQuality)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"Aged Brie\", app.items[0].name, \"Item name should match expected\");\n assertTrue(originalSellIn > app.items[0].sellIn, \"sellIn date should decrease in value\");\n assertTrue(originalQuality < app.items[0].quality, \"Quality of \\\"Aged Brie\\\" should increase\");\n }",
"@Test\n\tpublic void testConsertPassQualityWithSellInUnder6() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 5, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by three (perhaps should be one)\n\t\tassertEquals(\"Quality with sellIn under 6 consert backstage passes\", 23, quality);\n\t}",
"@Test\n void backstagePasses() {\n String name = \"Backstage passes to a TAFKAL80ETC concert\";\n int originalQuality = 10;\n int[] sellDates = new int[]{-1, 10, 5};\n int[] targetQuality = new int[]{0, originalQuality + 2, originalQuality + 3};\n\n Item[] items = new Item[]{\n new Item(name, sellDates[0], originalQuality),\n new Item(name, sellDates[1], originalQuality),\n new Item(name, sellDates[2], originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(targetQuality[i], app.items[i].quality, \"Quality must be altered correctly\");\n }\n }",
"@Test\n void sellingDatePast() {\n int originalQuality = 10;\n Item[] items = new Item[]{\n new Item(\"single\", 5, originalQuality),\n new Item(\"double\", -1, originalQuality)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(\"single\", app.items[0].name);\n assertTrue(originalQuality > app.items[0].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 1, app.items[0].quality, \"Quality should've dropped regularly\");\n\n assertEquals(\"double\", app.items[1].name);\n assertTrue(originalQuality > app.items[1].quality, \"Quality should've dropped\");\n assertEquals(originalQuality - 2, app.items[1].quality, \"Quality should've dropped twice as much\");\n }",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"@Test\n public void BackstagePass_HandleSpecialCase() {\n GildedRose sut = new GildedRose(createItemArray(BACKSTAGE_PASS, 5, 40));\n sut.updateQuality();\n assertEquals(42, sut.items[0].quality);\n }",
"@Test\n void legendaryItems() {\n int[] sellDates = new int[]{-5, 0, 5};\n Item[] items = new Item[]{\n new Item(\"Sulfuras, Hand of Ragnaros\", sellDates[0], 80),\n new Item(\"Sulfuras, Hand of Ragnaros\", sellDates[1], 80),\n new Item(\"Sulfuras, Hand of Ragnaros\", sellDates[2], 80)\n };\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n for (int i = 0; i < items.length; i++) {\n assertEquals(80, app.items[i].quality, \"Quality should be fixed\");\n assertEquals(sellDates[i], app.items[i].sellIn, \"SellIn dates should remain the same\");\n }\n }",
"@Override\n public int getMaxEfficiency(ItemStack itemStack) {\n return 10000;\n }",
"@Test //loop test 2 passes\n\tpublic void testLoop2pass() {\n\t\t//create an inn, add two items, and simulate one day\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.setItem(new Item(\"Sulfuras, Hand of Ragnaros\", 0, 80));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the second set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(1).getQuality();\n\t\t\n\t\t//assert quality remains the same\n\t\tassertEquals(\"Failed quality for Sulfuras\", 80, quality);\n\t}",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize(\"#gS@ID)j\");\n discretize0.m_ClassIndex = 178;\n double[] doubleArray0 = new double[3];\n doubleArray0[0] = (double) 178;\n discretize0.m_UseEqualFrequency = true;\n doubleArray0[2] = (double) 178;\n doubleArray0[2] = (double) 178;\n Discretize discretize1 = new Discretize(\"#gS@ID)j\");\n assertFalse(discretize1.getUseEqualFrequency());\n \n discretize0.getOptions();\n assertTrue(discretize0.getUseEqualFrequency());\n }",
"@Test //loop test 0 passes\n\tpublic void testLoop0pass() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = -100;\n\t\tif(! items.isEmpty()) { //check if items is empty, if not get the first item's quality\n\t\t\titems.get(0).getQuality();\n\t\t}\n\t\t//assert quality is -100\n\t\tassertEquals(\"Quality -100 with 0 loop passes\", -100, quality);\n\t}",
"@Test //covers loop test with one pass through the loop\n\tpublic void exampleTest() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"+5 Dexterity Vest\", 10, 20));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has decreased by one\n\t\tassertEquals(\"Failed quality for Dexterity Vest\", 19, quality);\n\t}",
"@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }",
"@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }",
"private QuotationDetailsDTO checkChargedWeight(TableItem[] items, QuotationDetailsDTO detail) {\n\t\tfloat chargedWt = 0;\n\n\t\tfor (int j = 0; j < items.length; j++) {\n\n\t\t\tchargedWt = Float.parseFloat(items[j].getText(1));\n\n\t\t\tif (items[j].getText(0).equals(detail.getArticleName())) {\n\t\t\t\tif (chargedWt != detail.getChargedWeight()) {\n\t\t\t\t\t//System.out.println(\"CW changed for \" + detail.getArticleName());\n\t\t\t\t\tdetail.setBft(null);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t}\n\n\t\t}\n\t\treturn detail;\n\t}",
"@Test\r\n\tvoid testCapitalEfficiency() throws IOException {\r\n\t\tStock stock = new Stock(ticker);\r\n\t\tFMPWebReaderFilter adder = new FMPWebReaderFilter();\r\n\t\tstock.setProfile(adder.getStockDetails(stock.getTicker()));\r\n\t\tstock.setCapEff(Evaluator.getCapitalEfficiency(stock));\r\n\t\tassertEquals(\"18\", stock.getCapEff());\r\n\t}",
"@Test\n public void testRoundsDown() throws Exception {\n gm.setPlayerInfo(clientPlayer2);\n gm.setThisPlayerIndex(clientPlayer2.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertEquals(4, dc.getMaxDiscard());\n dc.increaseAmount(ResourceType.WHEAT);\n dc.increaseAmount(ResourceType.BRICK);\n dc.increaseAmount(ResourceType.BRICK);\n dc.increaseAmount(ResourceType.ORE);\n // This increase should not work\n dc.increaseAmount(ResourceType.ORE);\n assertEquals(1, getAmounts().getOfType(ResourceType.WHEAT));\n assertEquals(2, getAmounts().getOfType(ResourceType.BRICK));\n assertEquals(1, getAmounts().getOfType(ResourceType.ORE));\n }",
"public void itemsSold() {\n quanitySnacks--;\n }",
"@Test\n\tvoid purchaseTest() {\n\t\ttestCrew.setMoney(10000);\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tint currentMoney = testCrew.getMoney();\n\t\t\titem.purchase(testCrew);\n\t\t\tassertEquals(testCrew.getMoney(), currentMoney - item.getPrice());\n\t\t\tassertTrue(testCrew.getMedicalItems().get(0).getClass().isAssignableFrom(item.getClass()));\n\t\t\ttestCrew.removeFromMedicalItems(testCrew.getMedicalItems().get(0));\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"public void testApp() {\n\t\tCapacityItem capacityItem1 = new CapacityItem(\"KAABA00011GN\",\n\t\t\t\t\"2012-12-01\", \"2012-12-31\", \"M10\", 100000, 5000);\n\n\t\t// 12.83 * 0.2 * 0.5 * 100000= 128300.0\n\t\tCapacityItem capacityItem2 = new CapacityItem(\"KEALGYO03ONN\",\n\t\t\t\t\"2012-05-01\", \"2012-05-31\", \"M10\", 100000, 5000);\n\n\t\t// 21.38 * 0.2 * 1.0 * 100000 = 427600.0\n\t\tCapacityItem capacityItem3 = new CapacityItem(\"GEDRAVAS1IIN\",\n\t\t\t\t\"2012-05-01\", \"2012-05-31\", \"M0\", 100000, 5000);\n\t\t// 19.24 * 0.2 * 1.0 * 100000 = 384800.0\n\t\tCapacityItem capacityItem4 = new CapacityItem(\"KETELJCS57EN\",\n\t\t\t\t\"2012-05-01\", \"2012-05-31\", \"M0\", 100000, 5000);\t\t\t\n\n\t\tassertEquals(\"Winter test\", capacityItem1.getSeasonalPrecent(), 0.9);\n\t\tassertEquals(\"Other season test\", capacityItem2.getSeasonalPrecent(),\n\t\t\t\t0.2);\n\n\t\tassertEquals(\"M10 test\", capacityItem1.getTypePrecent(), 0.5);\n\t\tassertEquals(\"M0 test\", capacityItem3.getTypePrecent(), 1.0);\n\n\t\tassertEquals(\"Location type test1\", capacityItem1.getLocationType(),\n\t\t\t\t\"Hazai kilépési\");\n\t\tassertEquals(\"Location type test2\", capacityItem2.getLocationType(),\n\t\t\t\t\"Hazai tárolói belépési\");\n\t\tassertEquals(\"Location type test3\", capacityItem3.getLocationType(),\n\t\t\t\t\"Külföldi belépési\");\n\t\tassertEquals(\"Location type test4\", capacityItem4.getLocationType(),\n\t\t\t\t\"Hazai termelői belépési\");\n\n\t\tassertEquals(\"Fee test1\", capacityItem1.getItemFee(), 159727.5);\n\t\tassertEquals(\"Fee test2\", capacityItem2.getItemFee(), 128300.0);\n\t\tassertEquals(\"Fee test3\", capacityItem3.getItemFee(), 427600.0);\n\t\tassertEquals(\"Fee test4\", capacityItem4.getItemFee(), 384800.0);\n\n\t}",
"public static boolean renderCustomEffect(RenderItem renderItem, ItemStack itemStack, IBakedModel model) {\n/* 765 */ if (enchantmentProperties == null)\n/* */ {\n/* 767 */ return false;\n/* */ }\n/* 769 */ if (itemStack == null)\n/* */ {\n/* 771 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 775 */ int[][] idLevels = getEnchantmentIdLevels(itemStack);\n/* */ \n/* 777 */ if (idLevels.length <= 0)\n/* */ {\n/* 779 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 783 */ HashSet<Integer> layersRendered = null;\n/* 784 */ boolean rendered = false;\n/* 785 */ TextureManager textureManager = Config.getTextureManager();\n/* */ \n/* 787 */ for (int i = 0; i < idLevels.length; i++) {\n/* */ \n/* 789 */ int id = idLevels[i][0];\n/* */ \n/* 791 */ if (id >= 0 && id < enchantmentProperties.length) {\n/* */ \n/* 793 */ CustomItemProperties[] cips = enchantmentProperties[id];\n/* */ \n/* 795 */ if (cips != null)\n/* */ {\n/* 797 */ for (int p = 0; p < cips.length; p++) {\n/* */ \n/* 799 */ CustomItemProperties cip = cips[p];\n/* */ \n/* 801 */ if (layersRendered == null)\n/* */ {\n/* 803 */ layersRendered = new HashSet();\n/* */ }\n/* */ \n/* 806 */ if (layersRendered.add(Integer.valueOf(id)) && matchesProperties(cip, itemStack, idLevels) && cip.textureLocation != null) {\n/* */ \n/* 808 */ textureManager.bindTexture(cip.textureLocation);\n/* 809 */ float width = cip.getTextureWidth(textureManager);\n/* */ \n/* 811 */ if (!rendered) {\n/* */ \n/* 813 */ rendered = true;\n/* 814 */ GlStateManager.depthMask(false);\n/* 815 */ GlStateManager.depthFunc(514);\n/* 816 */ GlStateManager.disableLighting();\n/* 817 */ GlStateManager.matrixMode(5890);\n/* */ } \n/* */ \n/* 820 */ Blender.setupBlend(cip.blend, 1.0F);\n/* 821 */ GlStateManager.pushMatrix();\n/* 822 */ GlStateManager.scale(width / 2.0F, width / 2.0F, width / 2.0F);\n/* 823 */ float offset = cip.speed * (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;\n/* 824 */ GlStateManager.translate(offset, 0.0F, 0.0F);\n/* 825 */ GlStateManager.rotate(cip.rotation, 0.0F, 0.0F, 1.0F);\n/* 826 */ renderItem.func_175035_a(model, -1);\n/* 827 */ GlStateManager.popMatrix();\n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 834 */ if (rendered) {\n/* */ \n/* 836 */ GlStateManager.enableAlpha();\n/* 837 */ GlStateManager.enableBlend();\n/* 838 */ GlStateManager.blendFunc(770, 771);\n/* 839 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 840 */ GlStateManager.matrixMode(5888);\n/* 841 */ GlStateManager.enableLighting();\n/* 842 */ GlStateManager.depthFunc(515);\n/* 843 */ GlStateManager.depthMask(true);\n/* 844 */ textureManager.bindTexture(TextureMap.locationBlocksTexture);\n/* */ } \n/* */ \n/* 847 */ return rendered;\n/* */ }",
"@Test(expected=UnavailableItemException.class)\n\tpublic void testUnavailableItems() throws Exception {\n\t\td.dispense(50, 5);\n\t\td.dispense(50, 18);\n\t\td.dispense(50, 20);\n\t}",
"@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }",
"public void use(Consume item)\r\n {\r\n int gain = item.getRating();\r\n health += gain;\r\n \r\n if (health > maxHealth)\r\n health = maxHealth;\r\n \r\n say(\"I gained \" + gain + \" health by using \" + item.getName() + \" and now have \" + health + \"/\" + maxHealth);\r\n \r\n items.remove(item);\r\n }",
"@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}",
"@Test\n public void testUpdatePositive() throws Exception{\n Item item = new Item();\n item.setName(\"item\");\n item.setType(ItemTypes.ALCOHOLIC_BEVERAGE);\n itemDao.create(item);\n\n item.setType(ItemTypes.NON_ALCOHOLIC_BEVERAGE);\n itemDao.update(item);\n\n Item itemDB = itemDao.read(item.getName());\n Assert.assertEquals(itemDB, item);\n }",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }",
"@Test\n public void decreaseWithDiscardLessThan4() {\n gm.setPlayerInfo(clientPlayer4);\n gm.setThisPlayerIndex(clientPlayer4.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertFalse(dc.getMaxDiscard() >= 4);\n dc.increaseAmount(ResourceType.ORE);\n assertEquals(0, getAmounts().getOfType(ResourceType.ORE));\n dc.decreaseAmount(ResourceType.ORE);\n assertEquals(0, getAmounts().getOfType(ResourceType.ORE));\n }",
"@Test\n public final void testSmallerThanMax() {\n for (ArrayList<TradeGood> planetsGoods : goods) {\n for (TradeGood good : planetsGoods) {\n assertTrue(good.getPrice() < good.type.mhl);\n }\n }\n }",
"private void condenseShoppingCart()\n {\n for(int d = 0; d < PersistentData.ArryShoppingCartItemNo.size(); d++)\n {\n int numberofItems = 0;\n\n boolean itemNoAlreadyCondensed = false;\n if(CondensedShoppingCart.contains(PersistentData.ArryShoppingCartItemNo.get(d)))\n {\n itemNoAlreadyCondensed = true;\n }\n if(itemNoAlreadyCondensed == false)\n {\n for(int y = 0; y < PersistentData.ArryShoppingCartItemNo.size(); y++)\n {\n if(PersistentData.ArryShoppingCartItemNo.get(d) == PersistentData.ArryShoppingCartItemNo.get(y))\n {\n numberofItems++;\n }\n }\n CondensedShoppingCart.add(PersistentData.ArryShoppingCartItemNo.get(d));\n ShoppingCartItemQuantities.add(numberofItems);\n }\n }\n }",
"double getMissChance();",
"protected abstract float _getGrowthChance();",
"@Test\n\tpublic void getCostForDuplicateItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"banana\", 4);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(6, fc) == 0);\n\n\t}",
"protected boolean IsHighExplosive()\r\n {\r\n \t// Wrapper function to make code a little cleaner.\r\n // isInvulnerable() is wrongly named and instead represents the specific\r\n // skull type the wither has launched\r\n \t\r\n \treturn isInvulnerable();\r\n }",
"public void doItemEffect(RobotPeer robot){\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\trobot.updateEnergy(-15);\n\t\t//System.out.println(\"Poison item USED\");\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\t\n\t}",
"@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }",
"public void test_varyingUpdate_SelfCalculation_DreamCruise_plain() {\n // ## Arrange ##\n Purchase purchase = new Purchase();\n purchase.setPurchaseId(3L);\n purchase.setPaymentCompleteFlg_True();\n\n try {\n final List<SqlLogInfo> infoList = new ArrayList<SqlLogInfo>();\n CallbackContext.setSqlLogHandlerOnThread(new SqlLogHandler() {\n public void handle(SqlLogInfo info) {\n infoList.add(info);\n }\n });\n\n // ## Act ##\n PurchaseCB cb = new PurchaseCB();\n PurchaseCB dreamCruiseCB = cb.dreamCruiseCB();\n UpdateOption<PurchaseCB> option = new UpdateOption<PurchaseCB>();\n option.self(new SpecifyQuery<PurchaseCB>() {\n public void specify(PurchaseCB cb) {\n cb.specify().columnPurchasePrice();\n }\n }).multiply(dreamCruiseCB.specify().columnPurchaseCount());\n purchaseBhv.varyingUpdateNonstrict(purchase, option);\n\n // ## Assert ##\n assertHasOnlyOneElement(infoList);\n SqlLogInfo info = infoList.get(0);\n String sql = info.getDisplaySql();\n assertTrue(sql.contains(\"set PURCHASE_PRICE = PURCHASE_PRICE * PURCHASE_COUNT\"));\n assertTrue(sql.contains(\", VERSION_NO = VERSION_NO + 1\"));\n } finally {\n CallbackContext.clearSqlLogHandlerOnThread();\n }\n }",
"@Test(timeout = 4000)\n public void test25() throws Throwable {\n Attribute attribute0 = new Attribute((String) null, (String) null);\n LinkedList<Attribute> linkedList0 = new LinkedList<Attribute>();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>(linkedList0);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"date\", arrayList0, 0);\n Instances instances1 = new Instances(instances0);\n double[] doubleArray0 = new double[1];\n SparseInstance sparseInstance0 = new SparseInstance(1, doubleArray0);\n SparseInstance sparseInstance1 = new SparseInstance((Instance) sparseInstance0);\n instances0.add((Instance) sparseInstance1);\n Discretize discretize0 = new Discretize(\"@attribute\");\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.setMakeBinary(true);\n assertTrue(discretize0.getMakeBinary());\n \n Discretize discretize1 = new Discretize();\n boolean boolean0 = discretize1.setInputFormat(instances1);\n assertFalse(boolean0);\n }",
"public static void main(String[] args) throws InterruptedException {\n Item item1 = new Item(\"Coca-cola\", 200);\n System.out.println(\"Price before discount: \" + item1.getPrice());\n System.out.println(\"Price after discount: \" + item1.calculateDiscount()); //should be same price, 200, there's no doscount for this type\n\n ItemWithDiscount item2 = new ItemWithDiscount(\"Coca-cola Zero\", 2.0);\n System.out.println(\"\\nPrice before discount: \" + item2.getPrice());\n item2.setDiscount(10);\n System.out.println(\"Price after discount: \" + item2.calculateDiscount()); // 2 - 0.2 = 1.8\n\n\n //CHECK BUY PAY DISCOUNT\n BuyMorePayLess item04 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item05 = new BuyMorePayLess(\"Milk\", 10);\n BuyMorePayLess item06 = new BuyMorePayLess(\"Milk\", 1);\n item04.setBuyPayOffer(3,2);\n item04.calculateDiscount();\n\n //Check TakeItAll discount\n ItemTakeItAll item07 = new ItemTakeItAll(\"Tuna\",5.00);\n ItemTakeItAll item08 = new ItemTakeItAll(\"Tuna\",5.00);\n\n// item07.setDiscount(10);\n item07.setMinimumNumber(1);\n System.out.println(\"##################\" + item07.calculateDiscount());\n\n // USERS\n LoyalCustomer customer01 = new LoyalCustomer(\"Giorgi Tsipuria\", \"giobaski\", \"123\",\n \"Gonsiori 33\",\"55945239\");\n\n //B A S K E T S\n Basket basket01 = new Basket(\"Tartu 46\", \"Kairi\", customer01);\n basket01.insertItem(item1); //200 -> 200\n basket01.insertItem(item2); // 2.0 -> 1.8\n System.out.println(\"Total payment in basket: \" + basket01.caclulatePayment()); //201.8 + 201.8 * 0.1 = 221.98\n\n\n\n\n\n //1. Create Store\n Store store = new Store(\"Raua 16\");\n\n //2. sign into store\n Cashier currentCashier = store.cashierAuthentication();\n\n //3.\n Menu currentMenu = store.openMenu();\n\n //4. new basket\n currentMenu.openNewBasket(customer01);\n\n\n //5.Cashier starts adding items into new basket\n System.out.println(currentMenu.getBasket());\n currentMenu.getBasket().insertItem(item1);\n currentMenu.getBasket().insertItem(item2);\n\n\n System.out.println(\"######Basket By ID:\");\n currentMenu.printBasketInfoById(2);\n System.out.println(\"########\");\n\n\n //6. Calculate total price for the current basket\n currentMenu.getBasket().caclulatePayment();\n System.out.println(currentMenu.getBasket());\n System.out.println(\"currents items: \");\n System.out.println(currentMenu.getBasket().getItems());\n\n //7. Logout cashier\n Thread.sleep(10000);\n currentMenu.exit();\n\n\n // Additional features\n System.out.println(\"points of the loyal customer: \" + customer01.getPoints());\n\n System.out.println(\"Bonus for cashier: \" + currentCashier.calculateBonus() + \" Euros\");\n\n\n\n\n\n\n }",
"public void specialEffect() {\n if (getDefense() > 0) {\n setDefense(0);\n setCurrentHealth(currentHealth + 50);\n }\n\n }",
"private void handleShrinking( GameState state )\r\n\t{\n\t\t\r\n\t\tint shrinkLength = (int)(shrinkPercent * entities.length);\r\n\t\t\r\n\t\tif ( size < shrinkLength )\r\n\t\t{\r\n\t\t\tshrinkTime += state.seconds;\r\n\t\t\t\r\n\t\t\tif ( shrinkTime >= shrinkReadyTime )\r\n\t\t\t{\r\n\t\t\t\tentities = Arrays.copyOf( entities, shrinkLength );\r\n\t\t\t\tshrinkTime = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tshrinkTime = 0;\r\n\t\t}\r\n\t}",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Discretize discretize0 = new Discretize(\"If set to true< equal-frequency binning will be used instead of equal-wi~th binnwng.\");\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n System.setCurrentTimeMillis(2L);\n int[] intArray0 = new int[7];\n intArray0[0] = 7;\n intArray0[1] = (-2122219132);\n intArray0[2] = (-3985);\n intArray0[3] = 6;\n intArray0[4] = 19;\n intArray0[5] = (-3677);\n intArray0[6] = 4080;\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(0.0, intArray0, 445);\n SparseInstance sparseInstance0 = new SparseInstance((SparseInstance) binarySparseInstance0);\n // Undeclared exception!\n try { \n discretize0.convertInstance(sparseInstance0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"@Test\n public void increaseWithDiscardLessThan4() throws Exception {\n gm.setPlayerInfo(clientPlayer4);\n gm.setThisPlayerIndex(clientPlayer4.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertFalse(dc.getMaxDiscard() >= 4);\n dc.increaseAmount(ResourceType.WHEAT);\n assertNotEquals(1, getAmounts().getOfType(ResourceType.WHEAT));\n assertEquals(0, getAmounts().getOfType(ResourceType.WOOD));\n dc.increaseAmount(ResourceType.WOOD);\n assertNotEquals(1, getAmounts().getOfType(ResourceType.WOOD));\n }",
"@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"@Test\n public void qualityScalabilityTestICQ1SendAggregatedLarge() throws IOException, DataFormatException {\n performAggregatedBidTest(\"ICQ/ICQ1\", null);\n }",
"public void normaliseProbs() {\n\t\t// Get total\n\t\tdouble sum = 0;\n\t\tfor (Double d : itemProbs_.values()) {\n\t\t\tsum += d;\n\t\t}\n\n\t\t// If already at 1, just return.\n\t\tif ((sum >= 0.9999) && (sum <= 1.0001))\n\t\t\treturn;\n\n\t\t// Normalise\n\t\tint count = itemProbs_.size();\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t// If the sum is 0, everything is equal.\n\t\t\tif (sum == 0)\n\t\t\t\titemProbs_.put(element, 1.0 / count);\n\t\t\telse\n\t\t\t\titemProbs_.put(element, itemProbs_.get(element) / sum);\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}",
"java.lang.String getQuality();",
"float getBonusItemDrop();",
"@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }",
"private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"-R\";\n stringArray0[1] = \"-R\";\n stringArray0[2] = \"Xw\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"\");\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getFindNumBins());\n }",
"@Override\n public long cost() {\n return 100;\n }",
"@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}",
"public void a(PotionEffect paramwq)\r\n/* 44: */ {\r\n/* 45: 52 */ if (this.id != paramwq.id) {\r\n/* 46: 53 */ a.warn(\"This method should only be called for matching effects!\");\r\n/* 47: */ }\r\n/* 48: 55 */ if (paramwq.amplifier > this.amplifier)\r\n/* 49: */ {\r\n/* 50: 56 */ this.amplifier = paramwq.amplifier;\r\n/* 51: 57 */ this.duration = paramwq.duration;\r\n/* 52: */ }\r\n/* 53: 58 */ else if ((paramwq.amplifier == this.amplifier) && (this.duration < paramwq.duration))\r\n/* 54: */ {\r\n/* 55: 59 */ this.duration = paramwq.duration;\r\n/* 56: */ }\r\n/* 57: 60 */ else if ((!paramwq.ambient) && (this.ambient))\r\n/* 58: */ {\r\n/* 59: 61 */ this.ambient = paramwq.ambient;\r\n/* 60: */ }\r\n/* 61: 63 */ this.showParticles = paramwq.showParticles;\r\n/* 62: */ }",
"private static double getOEEQuality(Batch batch) {\n double quality = ((double) batch.getAccepted()) / (((double) batch.getAccepted()) + ((double) batch.getDefect()));\n\n return quality;\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n Discretize discretize0 = new Discretize();\n String[] stringArray0 = discretize0.getOptions();\n discretize0.setOptions(stringArray0);\n assertEquals(6, stringArray0.length);\n \n String string0 = discretize0.globalInfo();\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"An instance filter that discretizes a range of numeric attributes in the dataset into nominal attributes. Discretization is by simple binning. Skips the class attribute if set.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.m_NumBins = (-3104);\n discretize0.m_MakeBinary = true;\n try { \n discretize0.setInputFormat((Instances) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Can't ignore class when changing the number of attributes!\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"@Test\n\tpublic void gapsLeadToBadQuality() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tt1.addValue(new SampledValue(new FloatValue(234F), 60, Quality.BAD));\n\t\tt0.setInterpolationMode(InterpolationMode.STEPS);\n\t\tt1.setInterpolationMode(InterpolationMode.STEPS);\n\t\tfinal ReadOnlyTimeSeries avg = MultiTimeSeriesUtils.getAverageTimeSeries(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0L, 110);\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(59).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(60).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.BAD, avg.getValue(63).getQuality());\n\t\tAssert.assertEquals(\"Unexpected quality\",Quality.GOOD, avg.getValue(70).getQuality());\n\t}",
"@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }",
"public float getQuality();",
"private void upgradeDataDimensionItemsToReportingRateMetric()\r\n {\r\n String sql = \"update datadimensionitem \" +\r\n \"set metric='REPORTING_RATE' \" +\r\n \"where datasetid is not null \" +\r\n \"and metric is null;\";\r\n\r\n executeSql( sql );\r\n }",
"@Override\n public int getMaxItemUseDuration(ItemStack par1ItemStack) {\n return 10;\n }",
"public void calculateEffectiveness(){\n double[] typeEffective = new double[18];\n \n for(int i = 0; i < 18; i++){\n typeEffective[i] = tc.getEffectiveNumber(i, tc.convertType(type1));\n }\n \n if(type2 != null){\n for(int i = 0; i < 18; i++){\n typeEffective[i] *= tc.getEffectiveNumber(i, tc.convertType(type2));\n }\n }\n \n for(int i = 0; i < 18; i++){\n if(typeEffective[i] != 1){\n if(typeEffective[i] > 1){\n double[] newWeak = {i,typeEffective[i]};\n weak.add(newWeak);\n }else{\n double[] newStrong = {i,typeEffective[i]};\n strong.add(newStrong);\n }\n }\n }\n }",
"private void drink()\n { \n if(i.item3 == true && i.used == false)\n {\n p.energy += 70;\n i.item3 = false;\n i.used = true;\n System.out.println(\"Energy: \" + p.energy);\n }\n else if(i.used == true && i.item3 == false) \n {\n System.out.println(\"You already drank a redbull!\"); \n }\n else if(i.item3 == false && i.used == false)\n {\n System.out.println(\"no more drinks left!\");\n }\n }",
"private void applyRules(Product p, int i) {\n /* Produktinfos */\n Properties.ProductTypes type = p.getType();\n int quality = p.getQuality();\n int bestBefore = p.getBestBefore();\n double price = p.getPrice();\n\n /* Qualitätsinfos */\n int minQuality = qualities.get(type).getMinQuality();\n int qualityChange = qualities.get(type).getQualityChange();\n int changeAfterDays = qualities.get(type).getChangeQualAfterDays();\n\n /* Ändere die Qualität nach einer bestimmten Anzahl an Tagen */\n if (i % changeAfterDays == 0\n && quality >= 1) {\n p.setQuality(quality + qualityChange);\n }\n\n /* Wenn die Qualität ein bestimmtes Niveau unterschreitet \n oder wenn das MHD erreicht ist, wird das Produkt entsorgt.\n Gilt nicht für Wein. */\n if (!type.equals(ProductTypes.WEIN)) {\n if ((quality < minQuality || bestBefore < 1)) {\n p.setDisposable(true);\n }\n\n // Tagespreis anpassen\n p.setPrice(price + (0.1 * quality));\n\n // täglich das Verfallsdatum um 1 Tag verringern\n p.setBestBefore(bestBefore - 1);\n }\n\n LOGGER.log(Level.INFO, p.toString());\n }",
"long getQuantite();",
"public void test_varyingQueryUpdate_SelfCalculation_DreamCruise_plain() {\n // ## Arrange ##\n Purchase purchase = new Purchase();\n purchase.setPaymentCompleteFlg_True();\n\n PurchaseCB cb = new PurchaseCB();\n cb.query().setPaymentCompleteFlg_Equal_True();\n\n try {\n final List<SqlLogInfo> infoList = new ArrayList<SqlLogInfo>();\n CallbackContext.setSqlLogHandlerOnThread(new SqlLogHandler() {\n public void handle(SqlLogInfo info) {\n infoList.add(info);\n }\n });\n // ## Act ##\n PurchaseCB dreamCruiseCB = cb.dreamCruiseCB();\n UpdateOption<PurchaseCB> option = new UpdateOption<PurchaseCB>();\n option.self(new SpecifyQuery<PurchaseCB>() {\n public void specify(PurchaseCB cb) {\n cb.specify().columnPurchasePrice();\n }\n }).multiply(dreamCruiseCB.specify().columnPurchaseCount());\n int updatedCount = purchaseBhv.varyingQueryUpdate(purchase, cb, option);\n\n // ## Assert ##\n assertNotSame(0, updatedCount);\n assertHasOnlyOneElement(infoList);\n SqlLogInfo info = infoList.get(0);\n String sql = info.getDisplaySql();\n assertTrue(sql.contains(\"set PURCHASE_PRICE = PURCHASE_PRICE * PURCHASE_COUNT\"));\n assertTrue(sql.contains(\", VERSION_NO = VERSION_NO + 1\"));\n } finally {\n CallbackContext.clearSqlLogHandlerOnThread();\n }\n }",
"public static boolean renderCustomArmorEffect(EntityLivingBase entity, ItemStack itemStack, ModelBase model, float limbSwing, float prevLimbSwing, float partialTicks, float timeLimbSwing, float yaw, float pitch, float scale) {\n/* 854 */ if (enchantmentProperties == null)\n/* */ {\n/* 856 */ return false;\n/* */ }\n/* 858 */ if (Config.isShaders() && Shaders.isShadowPass)\n/* */ {\n/* 860 */ return false;\n/* */ }\n/* 862 */ if (itemStack == null)\n/* */ {\n/* 864 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 868 */ int[][] idLevels = getEnchantmentIdLevels(itemStack);\n/* */ \n/* 870 */ if (idLevels.length <= 0)\n/* */ {\n/* 872 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 876 */ HashSet<Integer> layersRendered = null;\n/* 877 */ boolean rendered = false;\n/* 878 */ TextureManager textureManager = Config.getTextureManager();\n/* */ \n/* 880 */ for (int i = 0; i < idLevels.length; i++) {\n/* */ \n/* 882 */ int id = idLevels[i][0];\n/* */ \n/* 884 */ if (id >= 0 && id < enchantmentProperties.length) {\n/* */ \n/* 886 */ CustomItemProperties[] cips = enchantmentProperties[id];\n/* */ \n/* 888 */ if (cips != null)\n/* */ {\n/* 890 */ for (int p = 0; p < cips.length; p++) {\n/* */ \n/* 892 */ CustomItemProperties cip = cips[p];\n/* */ \n/* 894 */ if (layersRendered == null)\n/* */ {\n/* 896 */ layersRendered = new HashSet();\n/* */ }\n/* */ \n/* 899 */ if (layersRendered.add(Integer.valueOf(id)) && matchesProperties(cip, itemStack, idLevels) && cip.textureLocation != null) {\n/* */ \n/* 901 */ textureManager.bindTexture(cip.textureLocation);\n/* 902 */ float width = cip.getTextureWidth(textureManager);\n/* */ \n/* 904 */ if (!rendered) {\n/* */ \n/* 906 */ rendered = true;\n/* */ \n/* 908 */ if (Config.isShaders())\n/* */ {\n/* 910 */ ShadersRender.layerArmorBaseDrawEnchantedGlintBegin();\n/* */ }\n/* */ \n/* 913 */ GlStateManager.enableBlend();\n/* 914 */ GlStateManager.depthFunc(514);\n/* 915 */ GlStateManager.depthMask(false);\n/* */ } \n/* */ \n/* 918 */ Blender.setupBlend(cip.blend, 1.0F);\n/* 919 */ GlStateManager.disableLighting();\n/* 920 */ GlStateManager.matrixMode(5890);\n/* 921 */ GlStateManager.loadIdentity();\n/* 922 */ GlStateManager.rotate(cip.rotation, 0.0F, 0.0F, 1.0F);\n/* 923 */ float texScale = width / 8.0F;\n/* 924 */ GlStateManager.scale(texScale, texScale / 2.0F, texScale);\n/* 925 */ float offset = cip.speed * (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F;\n/* 926 */ GlStateManager.translate(0.0F, offset, 0.0F);\n/* 927 */ GlStateManager.matrixMode(5888);\n/* 928 */ model.render((Entity)entity, limbSwing, prevLimbSwing, timeLimbSwing, yaw, pitch, scale);\n/* */ } \n/* */ } \n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 935 */ if (rendered) {\n/* */ \n/* 937 */ GlStateManager.enableAlpha();\n/* 938 */ GlStateManager.enableBlend();\n/* 939 */ GlStateManager.blendFunc(770, 771);\n/* 940 */ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n/* 941 */ GlStateManager.matrixMode(5890);\n/* 942 */ GlStateManager.loadIdentity();\n/* 943 */ GlStateManager.matrixMode(5888);\n/* 944 */ GlStateManager.enableLighting();\n/* 945 */ GlStateManager.depthMask(true);\n/* 946 */ GlStateManager.depthFunc(515);\n/* 947 */ GlStateManager.disableBlend();\n/* */ \n/* 949 */ if (Config.isShaders())\n/* */ {\n/* 951 */ ShadersRender.layerArmorBaseDrawEnchantedGlintEnd();\n/* */ }\n/* */ } \n/* */ \n/* 955 */ return rendered;\n/* */ }",
"@Test(timeout = 4000)\n public void test24() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_DefaultCols = \"_3*kK(3?y\";\n discretize0.m_UseBinNumbers = true;\n discretize0.desiredWeightOfInstancesPerIntervalTipText();\n discretize0.setOutputFormat();\n discretize0.setInvertSelection(true);\n Range range0 = new Range(\"Sets the desired weight of instances per interval for equal-frequency binning.\");\n discretize0.m_DiscretizeCols = range0;\n discretize0.getUseEqualFrequency();\n range0.toString();\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"Sets the desired weight of instances per interval for equal-frequency binning.\";\n stringArray0[1] = \"Sets the desired weight of instances per interval for equal-frequency binning.\";\n stringArray0[2] = \"Sets the desired weight of instances per interval for equal-frequency binning.\";\n stringArray0[3] = \"_3*kK(3?y\";\n stringArray0[4] = \"_3*kK(3?y\";\n Discretize.main(stringArray0);\n discretize0.getOptions();\n discretize0.setOutputFormat();\n // Undeclared exception!\n try { \n discretize0.batchFinished();\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // No input instance format defined\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"int getQuantite();",
"int getQuantite();",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getRevision();\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.batchFinished();\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // No input instance format defined\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }",
"public double getCost(StringBuffer detail, boolean ignoreAmmo) {\n double[] costs = new double[15];\n int i = 0;\n\n double cockpitCost = 0;\n if (getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) {\n cockpitCost = 750000;\n } else if (getCockpitType() == Mech.COCKPIT_DUAL) {\n // FIXME\n cockpitCost = 0;\n } else if (getCockpitType() == Mech.COCKPIT_COMMAND_CONSOLE) {\n // Command Consoles are listed as a cost of 500,000.\n // That appears to be in addition to the primary cockpit.\n cockpitCost = 700000;\n } else if (getCockpitType() == Mech.COCKPIT_SMALL) {\n cockpitCost = 175000;\n } else if (getCockpitType() == Mech.COCKPIT_INDUSTRIAL) {\n cockpitCost = 100000;\n } else {\n cockpitCost = 200000;\n }\n if (hasEiCockpit() && getCrew().getOptions().booleanOption(\"ei_implant\")) {\n cockpitCost = 400000;\n }\n costs[i++] = cockpitCost;\n costs[i++] = 50000;// life support\n costs[i++] = weight * 2000;// sensors\n int muscCost = hasTSM() ? 16000 : 2000;\n costs[i++] = muscCost * weight;// musculature\n costs[i++] = EquipmentType.getStructureCost(structureType) * weight;// IS\n costs[i++] = getActuatorCost();// arm and/or leg actuators\n Engine engine = getEngine();\n costs[i++] = engine.getBaseCost() * engine.getRating() * weight / 75.0;\n if (getGyroType() == Mech.GYRO_XL) {\n costs[i++] = 750000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 0.5;\n } else if (getGyroType() == Mech.GYRO_COMPACT) {\n costs[i++] = 400000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 1.5;\n } else if (getGyroType() == Mech.GYRO_HEAVY_DUTY) {\n costs[i++] = 500000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 2;\n } else {\n costs[i++] = 300000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f);\n }\n double jumpBaseCost = 200;\n // You cannot have JJ's and UMU's on the same unit.\n if (hasUMU()) {\n costs[i++] = Math.pow(getAllUMUCount(), 2.0) * weight * jumpBaseCost;\n } else {\n if (getJumpType() == Mech.JUMP_BOOSTER) {\n jumpBaseCost = 150;\n } else if (getJumpType() == Mech.JUMP_IMPROVED) {\n jumpBaseCost = 500;\n }\n costs[i++] = Math.pow(getOriginalJumpMP(), 2.0) * weight * jumpBaseCost;\n }\n // num of sinks we don't pay for\n int freeSinks = hasDoubleHeatSinks() ? 0 : 10;\n int sinkCost = hasDoubleHeatSinks() ? 6000 : 2000;\n // cost of sinks\n costs[i++] = sinkCost * (heatSinks() - freeSinks);\n costs[i++] = hasFullHeadEject()?1725000:0;\n costs[i++] = getArmorWeight() * EquipmentType.getArmorCost(armorType);\n costs[i++] = getWeaponsAndEquipmentCost(ignoreAmmo);\n\n double cost = 0; // calculate the total\n for (int x = 0; x < i; x++) {\n cost += costs[x];\n }\n\n double omniMultiplier = 0;\n if (isOmni()) {\n omniMultiplier = 1.25f;\n cost *= omniMultiplier;\n }\n costs[i++] = -omniMultiplier; // negative just marks it as multiplier\n\n double weightMultiplier = 1 + (weight / 100f);\n costs[i++] = -weightMultiplier; // negative just marks it as multiplier\n cost = Math.round(cost * weightMultiplier);\n if (detail != null) {\n addCostDetails(cost, detail, costs);\n }\n return cost;\n }",
"@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }",
"public float spiderScaleAmount()\n {\nreturn 1F;\n }",
"@Inject(\n at = @At(\"HEAD\"),\n method = \"tick\",\n cancellable = true)\n\n private void removeStunnedIfPCEnchant(CallbackInfo ci) {\n if ((Object) this instanceof PlayerEntity) {\n PlayerEntity entity = (PlayerEntity) (Object) this;\n ItemStack mainHand = getMainHandStack();\n\n if (EnchantmentHelper.getLevel(EnchantsRegistry.STUNNING, mainHand) >= 1\n || mainHand.getItem() == ItemRegistry.getItem(\"axe_highland\").asItem()) {\n this.removeStatusEffect(StatusEffects.NAUSEA);\n this.removeStatusEffect(StatusEffects.SLOWNESS);\n }\n }\n }",
"double getReliability();",
"public double getIBU() {\n\t\tdouble bitterness = 0;\n\t\tfor (RecipeIngredient ri : m_ingredientList) {\n\t\t\tif (ri.getIngredient().getType() == Ingredient.Type.HOPS) {\n\t\t\t\tHops h = (Hops) ri.getIngredient();\n\t\t\t\tbitterness += 0.30 * (h.getBoilTime()/60) * h.getAlphaAcid() * ri.getAmount(); \n\t\t\t}\n\t\t}\n\t\treturn (bitterness / m_batchSize) / 0.01335; \n\t}",
"@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }",
"@Test\n public void testConstantPricePerUnit() throws Exception {\n {\n Product beans = new Product(\n \"Can of Beans\",\n \"SKU-0001\",\n ToMoney.from(Multiply.by(65)));\n\n assertEquals(new Money(0*65),beans.getPrice(0));\n assertEquals(new Money(1*65),beans.getPrice(1));\n assertEquals(new Money(2*65),beans.getPrice(2));\n assertEquals(new Money(3*65),beans.getPrice(3));\n }\n // or, using the speical constructor:\n {\n Product beans = new Product(\n \"Can of Beans\",\n \"SKU-0001\",\n 65);\n\n assertEquals(new Money(0*65),beans.getPrice(0));\n assertEquals(new Money(1*65),beans.getPrice(1));\n assertEquals(new Money(2*65),beans.getPrice(2));\n assertEquals(new Money(3*65),beans.getPrice(3));\n }\n }"
] |
[
"0.6984504",
"0.6842123",
"0.6772207",
"0.6758423",
"0.66982466",
"0.6695969",
"0.66765785",
"0.6647771",
"0.6636598",
"0.662561",
"0.66109866",
"0.6503866",
"0.64698935",
"0.63188666",
"0.6290739",
"0.6174906",
"0.61522603",
"0.6100912",
"0.60815823",
"0.60692036",
"0.5767042",
"0.57257116",
"0.5685191",
"0.5613481",
"0.55873585",
"0.5560339",
"0.552235",
"0.5490204",
"0.54717773",
"0.54608625",
"0.5433958",
"0.5424097",
"0.53995585",
"0.53873336",
"0.5385781",
"0.5383882",
"0.5380544",
"0.5369136",
"0.5362027",
"0.5318363",
"0.52903736",
"0.52901137",
"0.5288617",
"0.527308",
"0.5270961",
"0.52553546",
"0.5233904",
"0.5229373",
"0.521373",
"0.5208963",
"0.52010375",
"0.5177263",
"0.51706386",
"0.51552916",
"0.5150735",
"0.5140515",
"0.5132173",
"0.51231956",
"0.51231074",
"0.5121364",
"0.5109994",
"0.51040035",
"0.51032716",
"0.5096579",
"0.5095106",
"0.509501",
"0.50738037",
"0.50674254",
"0.5065671",
"0.5064073",
"0.5062336",
"0.5058479",
"0.5056967",
"0.5054128",
"0.50531924",
"0.50506663",
"0.5038393",
"0.50382423",
"0.5038111",
"0.5027825",
"0.50247824",
"0.5021224",
"0.500641",
"0.5006301",
"0.50012016",
"0.49889225",
"0.49889225",
"0.49876586",
"0.498658",
"0.49858496",
"0.49853837",
"0.4983052",
"0.4981607",
"0.49798578",
"0.49785048",
"0.4976847",
"0.49768192",
"0.49766272",
"0.4976341",
"0.4970407"
] |
0.80919534
|
0
|
/ addLoanChkBox is called when the "Bill?" checkbox is ticked. If this transaction is a bill, the loan interface is shown, and otherwise it is removed.
|
private void addLoanChkBox(boolean isBill)
{
if (isBill)
{
// Here is where I assign the layout that loanLinParent actually points to.
this.loanLinParent = (LinearLayout) findViewById(R.id.lin_loan_main);
// https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/
// This is a LayoutInflater instance. It is what I am using to add views to the layout.
LayoutInflater layoutInflater = getLayoutInflater();
/* I set the parent to null because I use the addView method of LinearLayouts below this.
* I am using the index such that the loan layout will be placed second-to-last in the main
* view (just above the "add transaction" button).
*/
this.loanLinParent = (LinearLayout) layoutInflater.inflate(
R.layout.content_basic_financial_loan_checkbox, null);
this.moneyOutLinParent.addView(this.loanLinParent,
this.moneyOutLinParent.getChildCount() - 1);
// Here is where I assign which checkbox loanChkBox actually refers to.
this.loanChkBox = (CheckBox) findViewById(R.id.chk_loan);
// Here is where I set up loanChkBox's functionality
this.loanChkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
Log.d(TAG, "Loan? " + String.valueOf(b));
loanChkBoxTicked(b);
}
});
}
else
{
Log.d(TAG, "Attempting to remove the loan checkbox!");
/* If the layout that holds the loan is not in view, this does not get used (to avoid null
* reference calls).
*/
if (!(this.loanLinParent == null))
{
this.moneyOutLinParent.removeView((View) this.loanLinParent);
Log.d(TAG, "Success!");
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void loanChkBoxTicked(boolean isLoan)\r\n {\r\n if (isLoan)\r\n {\r\n // https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/\r\n LinearLayout loanItems;\r\n\r\n LayoutInflater layoutInflater = getLayoutInflater();\r\n\r\n loanItems = (LinearLayout) layoutInflater.inflate(\r\n R.layout.content_basic_financial_loan_view, null);\r\n this.loanLinParent.addView(loanItems);\r\n setUpLoanBtn();\r\n\r\n // This makes it so that pressing the enter button from the interest rate field calculates\r\n // the loan.\r\n EditText interest = (EditText) findViewById(R.id.edit_loan_interest);\r\n interest.setOnKeyListener(new View.OnKeyListener() {\r\n @Override\r\n public boolean onKey(View view, int i, KeyEvent keyEvent) {\r\n if ((keyEvent.getAction() == KeyEvent.ACTION_UP) &&\r\n ((i == KeyEvent.KEYCODE_ENTER) || (i == KeyEvent.KEYCODE_NUMPAD_ENTER)))\r\n {\r\n onCalcLoanBtnClicked();\r\n return true;\r\n }\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n else\r\n {\r\n Log.d(TAG, \"Attempting to remove the loan items!\");\r\n /* If the layout that holds the loan is not in view, this does not get used (to avoid null\r\n * reference calls).\r\n */\r\n if (!(this.loanLinParent == null) && !(findViewById(R.id.lin_loan_main) == null))\r\n {\r\n this.moneyOutLinParent.removeView(findViewById(R.id.lin_loan_main));\r\n Log.d(TAG, \"Success!\");\r\n addLoanChkBox(true);\r\n }\r\n }\r\n }",
"private void setUpCheckBox(final int flag, CheckBox checkBox, LinearLayout llCheckBox) {\n if ((movie.getAvailableExtras() & flag) != 0) {\n checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n flagsApplied = flagsApplied ^ flag;\n updatePriceAndSaving();\n }\n });\n } else {\n llCheckBox.setVisibility(View.GONE);\n }\n }",
"public void checkboxaddClicked(View view) {\n flag++;\n mRlNote.setVisibility(View.GONE);\n mRlAddItem.setVisibility(View.VISIBLE);\n }",
"public Boolean startLoan(Loan loan) {\n\t\tif (canBorrowBook()) {\n\t\t\tloan.getBook().incrementCopiesTakenCount();\n\t\t\tloans.add(loan);\n\t\t\t\n\t\t\tSystem.out.println(name.toUpperCase() + \" must return this book by \" + loan.getFormattedDueDate());\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}",
"public void takeOutLoan(Loan loan) {\n\t\tif (!loans.containsKey(loan.getId())) {\r\n\t\t\tloans.put(loan.getId(), loan);\r\n\t\t}else {\r\n\t\t\tthrow new RuntimeException(\"Duplicate loan added to member\");\r\n\t\t}\t\t\r\n\t}",
"public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}",
"private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }",
"private void setUpLoanBtn() {\r\n if (findViewById(R.id.btn_calculate_loan) != null)\r\n {\r\n /* This is the \"Calculate loan\" button. Its functionality is to update the table values\r\n * below it.\r\n */\r\n Button calcLoanBtn = (Button) findViewById(R.id.btn_calculate_loan);\r\n calcLoanBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n onCalcLoanBtnClicked();\r\n }\r\n });\r\n }\r\n }",
"public void setLoan(int loan) {\n\t\tthis.loan = loan;\n\t}",
"@Override\n public void onCheckClick(String no, String deliv, String rtn, String delegate, String buyer, String status) {\n\n billNo = no;\n delivPlaceName = deliv;\n rtnPlaceName = rtn;\n consigneeCName = buyer;\n forwarderName = delegate;\n flowStatus = status;\n\n getDataList(false);\n }",
"private void addLoanRequestFunction() {\n\t\tloanRequestButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGUILoanRequest loan = new GUILoanRequest();\n\t\t\t\tcloseFrame();\n\t\t\t}\t\t\n\t\t});\n\t}",
"public boolean isActiveLoan();",
"private void butCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butCheckActionPerformed\n\n Borrower bor = createBorrower();\n String date = tfDate.getText();\n\n if (driver.dateFormatValid(date)) {\n //valid date format, perform check out/in\n if (radBorrow.isSelected()) {\n //check out\n\n Book book = createBook();//create book\n\n if (!book.isOnLoan()) {\n //book is not on loan, can be loaned out\n\n //perform loan, inform user of success\n if (bor.borrow(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" loaned successfully to \" + bor.getName());\n\n } else {\n driver.errorMessageNormal(\"Book could not be loaned\");\n }\n\n } else {\n //is on loan\n driver.errorMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is already on loan.\");\n\n }\n\n } else if (radReturn.isSelected()) {\n //check in / returning\n\n Book book = createBook();\n\n if (book.isOnLoan()) {\n //book is on loan, and can be returned\n\n if (bor.returnBook(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" has been returned.\");\n\n } else {\n driver.infoMessageNormal(\"The book could not be returned.\");\n }\n\n } else {\n //not on loan\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is not on loan.\");\n }\n\n } else {\n driver.errorMessageNormal(\"Please select whether the book is being checked in or being returned.\");\n }\n\n } else {\n //invalid format\n driver.errorMessageNormal(\"Please ensure the date is in the format DD/MM/YYY\");\n }\n\n\n }",
"public void CheckIn(){\n if (isIn == false){\n isIn=true;\n// System.out.println(name + \" has been checked into the library.\");\n// }else\n// System.out.println(name + \" is not checked out.\");\n }\n }",
"public void addBill(UtilityBill bill) {\n getBills().add(bill);\n Collections.sort(bills);\n }",
"public void addTrans(View v)\r\n {\r\n Log.d(TAG, \"Add transaction button clicked!\");\r\n\r\n EditText editLabel = (EditText) findViewById(R.id.edit_label);\r\n String label = (editLabel == null)? \"\" : editLabel.getText().toString();\r\n\r\n EditText editAmount = (EditText) findViewById(R.id.edit_amount);\r\n double amount = ((editAmount == null) || (editAmount.getText().toString().equals(\"\")))? 0 :\r\n Double.valueOf(editAmount.getText().toString());\r\n\r\n CheckBox chkBill = (CheckBox) findViewById(R.id.chk_bill);\r\n CheckBox chkLoan = (CheckBox) findViewById(R.id.chk_loan);\r\n String special = \"\";\r\n special = (chkBill == null || !chkBill.isChecked())? special : \"Bill\";\r\n special = (chkLoan == null || !chkLoan.isChecked())? special : \"Loan\";\r\n\r\n\r\n EditText editTag = (EditText) findViewById(R.id.edit_tag);\r\n String tag = (editTag == null)? \"\" : editTag.getText().toString();\r\n\r\n Transaction t = new Transaction(false, amount, label, special, tag);\r\n\r\n Week weekAddedTo = BasicFinancialMainActivity.weeks\r\n .get(BasicFinancialMainActivity.currentWeekIndex);\r\n weekAddedTo.addTrans(t);\r\n BasicFinancialMainActivity.weeks.set(BasicFinancialMainActivity.currentWeekIndex, weekAddedTo);\r\n BasicFinancialMainActivity.saveWeeksData();\r\n\r\n startActivity(new Intent(this, BasicFinancialMainActivity.class));\r\n }",
"protected void addSelectedCheckBox( CheckBox cb ){\r\n\t\tif( selectedCheckBoxes.indexOf( cb ) < 0 ){\r\n\t\t\tselectedCheckBoxes.add( cb );\r\n\t\t}\r\n\t\t\r\n\t}",
"public void CheckOut(){\n if (isIn == true){\n isIn = false;\n// System.out.println(name + \" has been checked out of the library.\");\n// }else\n// System.out.println(name + \" is already checked out.\");\n }\n }",
"private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }",
"public void setLoanAmount(double loanAmount) {\n this.loanAmount = loanAmount;\n }",
"void setCheckedOut(boolean checkedOut);",
"protected void do_chckbxOther_actionPerformed(ActionEvent arg0) {\n\t\tif(chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(true);\n\t\telse if(! chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(false);\n\t\t\t\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n orderFragment.orderListAdpater.setDishHold(true);\n } else {\n orderFragment.orderListAdpater.setDishHold(false);\n }\n }",
"private void m16077d() {\n this.f13516e = (CheckBox) getInflater().inflate(C0633g.abc_list_menu_item_checkbox, this, false);\n addView(this.f13516e);\n }",
"@FXML\r\n\tprivate void btnCalcLoan(ActionEvent event) {\r\n\r\n\t\tSystem.out.println(\"Amount: \" + LoanAmount.getText());\r\n\t\tdouble dLoanAmount = Double.parseDouble(LoanAmount.getText());\r\n\t\tSystem.out.println(\"Amount: \" + dLoanAmount);\t\r\n\t\t\r\n\t\tlblTotalPayemnts.setText(\"123\");\r\n\t\t\r\n\t\tLocalDate localDate = PaymentStartDate.getValue();\r\n\t\tSystem.out.println(localDate);\r\n\t\t\r\n\t\tdouble dInterestRate = Double.parseDouble(InterestRate.getText());\r\n\t\tSystem.out.println(\"Interest Rate: \" + dInterestRate);\r\n\t\t\r\n\t\tint dNbrOfYears = Integer.parseInt(NbrOfYears.getText());\r\n\t\tSystem.out.println(\"Number of Years: \" + dNbrOfYears);\r\n\t\t\r\n\t\tdouble dAdditionalPayment = Double.parseDouble(AdditionalPayment.getText());\r\n\t\t\r\n\t\t\r\n\t\tLoan dLoan = new Loan(dLoanAmount,dInterestRate,dNbrOfYears,dAdditionalPayment,localDate,false,0);\r\n\t\t\r\n\t\tdouble totalInterest = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < dLoan.LoanPayments.size();i++) {\r\n\t\t\tPayment payment = dLoan.LoanPayments.get(i);\r\n\t\t\tloanTable.getItems().add((payment.getPaymentID(),payment.getDueDate(),dAdditionalPayment,payment.getIMPT(),\r\n\t\t\t\t\tpayment.getPPMT(),payment.getTotalPrinciple());\r\n\t\t\ttotalInterest += payment.getIMPT();\r\n\t\t}\r\n\t\t\r\n\t\tTotalPayments.setText(String.valueOf(dLoan.LoanPayments.size()));\r\n\t\tTotalInterest.setText(String.valueOf(totalInterest));\r\n\t\t\r\n\t}",
"public void toglecheckbox(CheckBox ch){\n\t if(ch.isChecked()){\n\t ch.setText(\"This is my business card\");\n\t isyourcard = \"yes\";\n\t }else{\n\t ch.setText(\"This is not my business card\");\n\t isyourcard = \"no\";\n\t }\n\t }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n loan_results_jScrollPane = new javax.swing.JScrollPane();\n loan_results_jTable = new javax.swing.JTable();\n loan_results_jLabel = new javax.swing.JLabel();\n promptLoanIdLabel = new javax.swing.JLabel();\n loanIdTextField = new javax.swing.JTextField();\n checkInButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n loan_results_jTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Borrower Name\", \"Loan_Id\", \"ISBN\", \"Card_Id\", \"Date_Out\", \"Due_Date\", \"Date_In\"\n }\n ));\n loan_results_jScrollPane.setViewportView(loan_results_jTable);\n\n loan_results_jLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n loan_results_jLabel.setText(\"Search Table with query: \"+ get_Search_String());\n\n promptLoanIdLabel.setText(\"Enter Loan Id:\");\n\n checkInButton.setText(\"Check In\");\n checkInButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkInButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loan_results_jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1018, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loan_results_jLabel)\n .addGroup(layout.createSequentialGroup()\n .addComponent(promptLoanIdLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loanIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(checkInButton)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(promptLoanIdLabel)\n .addComponent(loanIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkInButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loan_results_jLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loan_results_jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"public int saveLoan(String ISBN10, int borrower_id) throws SQLException {\n\t\tmySQLJDBC.setPreparedSql(\"select flag from borrower where borrower_id=?;\", borrower_id);\n\t\tResultSet res = mySQLJDBC.excuteQuery();\n\t\tint s = 90;\n\t\tif(res.next())\n\t\t\ts = res.getInt(\"flag\");\n\t\t//check if borrower is NOT flagged\n\t\tif (s == 0) {\n\t\t\tmySQLJDBC.setPreparedSql(\"select isAvailable from book where ISBN10=?;\", ISBN10);\n\t\t\tres = mySQLJDBC.excuteQuery();\n\t\t\tif(res.next())\n\t\t\t\ts = res.getInt(\"isAvailable\");\n\t\t\t//check if book is available\n\t\t\tif(s != 0) {\n\t\t\t\tmySQLJDBC.setPreparedSql(\"insert into book_loan (ISBN10, borrower_id, date_out, due_date) values (?, ?, SYSDATE(), DATE_ADD(SYSDATE(), INTERVAL 14 DAY));\", ISBN10,borrower_id);\n\t\t\t\tint resupdate = mySQLJDBC.executeUpdate();\n\t\t\t\t//if insert was successful, change book availability\n\t\t\t\tif (resupdate != -1) {\n\t\t\t\t\tmySQLJDBC.setPreparedSql(\"update book set isAvailable=0 where ISBN10=?;\", ISBN10);\n\t\t\t\t\tresupdate = mySQLJDBC.executeUpdate();\n\t\t\t\t\t//if update availability was successful, count no. of loans\n\t\t\t\t\tif(resupdate == 1) {\n\t\t\t\t\t\tmySQLJDBC.setPreparedSql(\"select borrower_id, count(*) from book_loan where date_in is null and borrower_id=?;\", borrower_id);\n\t\t\t\t\t\tres = mySQLJDBC.excuteQuery();\n\t\t\t\t\t\tif(res.next())\n\t\t\t\t\t\t\ts = res.getInt(\"count(*)\");\n\t\t\t\t\t\t//if count >= 3, change flag to 1\n\t\t\t\t\t\tif(s >= 3) {\n\t\t\t\t\t\t\tmySQLJDBC.setPreparedSql(\"update borrower set flag = 1 where borrower_id=?;\", borrower_id);\n\t\t\t\t\t\t\tresupdate = mySQLJDBC.executeUpdate();\n\t\t\t\t\t\t\t//if update was successful, return success\n\t\t\t\t\t\t\tif (resupdate != -1) {\n\t\t\t\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//update flag was not successful\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//i count < 3, just return success\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//update availability was not successful\n\t\t\t\t\telse {\n\t\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//insert loan was not successful\n\t\t\t\telse {\n\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//book is checked out\n\t\t\telse {\n\t\t\t\tmySQLJDBC.close();\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t}\n\t\t//borrower is flagged, return reason\n\t\telse {\n\t\t\t//borrower has more than 3 books checked out\n\t\t\t//mySQLJDBC.setPreparedSql(\"select flag from borrower where borrower_id=?;\", borrower_id);\n\t\t\t//res = mySQLJDBC.excuteQuery();\n\t\t\t//if(res.next()) {\n\t\t\t\t//s = res.getInt(\"flag\");\n\t\t\t\t//mySQLJDBC.close();\n\t\t\t//}\n\t\t\tmySQLJDBC.close();\n\t\t\tif(s == 1) { //s=1 --> more than 3 books checked out\n\t\t\t\treturn -3; \n\t\t\t}\n\t\t\telse if(s == 2){ //s=2 --> more than $5 owed\n\t\t\t\treturn -4;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn -5;\n\t\t\t}\n\t\t}\n\t}",
"public Boolean endLoan(Loan loan) {\n\t\tif (loans.contains(loan)) {\n\t\t\tif (loan.isOverdue()) {\n\t\t\t\tSystem.out.println(name.toUpperCase() + \" is returning the book after the return date limit.\");\n\t\t\t}\n\t\t\tloans.remove(loan);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Error: the choosen book couldn't be found in the person's current books.\");\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}",
"public void add (Document inLoan)\n \t{\n \t\tDuplicateLoanDataVO existingLoan;\n \t\tDuplicateLoanDataVO newLoan = new DuplicateLoanDataVO();\n \t\tString results = null;\n \n \t\tnewLoan.setDocument(inLoan);\n \n \t\tString key = XMLParser.getNodeValue(newLoan.getDocument(), \"APSUniqueAwardID\");\n \t\tif (key == null)\n \t\t{\n \t\t\tkey = \"0\";\n \t\t}\n \n \t\tInteger intKey = new Integer(key);\n \t\twhile (awardIdReference.containsKey(intKey))\n \t\t{\n \t\t\tintKey = new Integer(intKey.intValue() + 1);\n \t\t}\n \t\tawardIdReference.put(intKey, new Integer(newLoan.hashCode()));\n \n \t\tString dataProviderType = XMLParser.getNodeValue(newLoan.getDocument(), \"/Award/DataProviderType\");\n \t\tnewLoan.setProviderType(dataProviderType);\n \n \t\ttheLoanList.reset();\n \t\twhile (theLoanList.hasNext())\n \t\t{\n \t\t\texistingLoan = (DuplicateLoanDataVO)theLoanList.next();\n \t\t\tresults = dedupLoans(newLoan, existingLoan);\n \n \t\t\tif (results != null && results.equals(AggregateConstants.DUPLICATE))\n \t\t\t{\n \t\t\t\tlog.debug(\"Adding a duplicate loan\");\n \t\t\t\ttheLoanList.addDuplicate(existingLoan, newLoan);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\ttheLoanList.add(newLoan);\n \t}",
"@Override\n\tpublic void addIncomeBill(IncomeBillPO incomeBillPO) throws RemoteException {\n\t\t\n\t}",
"private void changedChoiceBox(){\n\t\thideLackUserPermissionsLabel();\n\t\thideShowCheckBoxes();\n\t}",
"public SHrsLoan(SDbLoan loan) {\n moLoan = loan;\n maPayrollReceiptEarnings = new ArrayList<>();\n maPayrollReceiptDeductions = new ArrayList<>();\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked){\n createChange.getChangesByTypesList().add(finalRegularChange);\n }else createChange.getChangesByTypesList().remove(finalRegularChange);\n\n\n notifyDataSetChanged();\n\n if (context instanceof AddDishActivity){\n ((AddDishActivity) context).updateSum();\n }\n\n }",
"@Override\n\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\tboolean isChecked) {\n\t\t\tif (isChecked) {\n\t\t\t\taddinfobt.setVisibility(View.VISIBLE);\n\t\t\t\tnameinfoinput.setVisibility(View.VISIBLE);\n\t\t\t\tinfolist.setVisibility(View.VISIBLE);\n\t\t\t} else {\n\t\t\t\taddinfobt.setVisibility(View.GONE);\n\t\t\t\tnameinfoinput.setVisibility(View.GONE);\n\t\t\t\tinfolist.setVisibility(View.GONE);\n\t\t\t}\n\t\t}",
"public void loanAmount_Validation() {\n\t\thelper.assertString(usrLoanAmount_AftrLogin(), payOffOffer.usrLoanAmount_BfrLogin());\n\t\tSystem.out.print(\"The loan amount is: \" + usrLoanAmount_AftrLogin());\n\n\t}",
"public void checkOut(View view) {\n\n //get the grocery that was pressed\n LayoutInflater li = LayoutInflater.from(mContext);\n\n View promptsView = li.inflate(R.layout.grocery_checkout, null);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext);\n\n alertDialogBuilder.setView(promptsView);\n\n final EditText enterAmount = (EditText) promptsView.findViewById(R.id.enter_amount);\n\n alertDialogBuilder\n .setCancelable(false)\n .setPositiveButton(\"Confirm\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (!grocToPurchase.isEmpty()) {\n double totalAmount = Double.parseDouble(enterAmount.getText().toString());\n\n UserList uList = myGroup.getUserList();\n ArrayList arrL = uList.getUserList();\n int userCount = arrL.size();\n\n double amountPerPerson = (totalAmount / userCount);\n\n BillList bl = myGroup.getBillList();\n ArrayList bArr = bl.getBillList();\n\n //bill all users in group evenly\n for (int i = 0; i < userCount; i++) {\n User u = (User) arrL.get(i);\n //TODO add the current user as the userToBill\n Bill newBill = new Bill(\"grocery check out\", amountPerPerson, u.getfName(), currUser.getfName(), myGroup.getGroupId());\n HTTP_Connector.addBill dbAddBill = httpcon.new addBill();\n dbAddBill.execute(newBill);\n }\n\n //set is purchased to true for all things just purchased\n for (int j = 0; j < grocToPurchase.size(); j++) {\n Grocery g = grocToPurchase.get(j);\n\n //change object locally and in database\n g.setIsPurchased(true);\n HTTP_Connector.editGrocery dbEditGroc = httpcon.new editGrocery();\n dbEditGroc.execute(g);\n\n //cant edit two things at once, so do it again\n g.setPurchaseUser(currUser.getfName());\n HTTP_Connector.editGrocery dbEditGroc2 = httpcon.new editGrocery();\n dbEditGroc2.execute(g);\n }\n\n ListView lv = (ListView) findViewById(R.id.list_grocery);\n GroceryRowAdapter adapter = new GroceryRowAdapter(mContext, currentGroc);\n lv.setAdapter(adapter);\n\n String billTest = bArr.toString();\n\n\n //load a new current view to reflect changes\n currentAdapter(lv);\n } else {\n Toast.makeText(GroceryActivity.this, \"You have not purchased anything\", Toast.LENGTH_SHORT).show();\n }\n }\n })\n .setNegativeButton(\"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n // create alert dialog\n alertDialog = alertDialogBuilder.create();\n\n // show it\n alertDialog.show();\n }",
"public void setListenChkBox(JCheckBox listenChkBox) {\r\n\t\tthis.listenChkBox = listenChkBox;\r\n\t}",
"public void checkOut(String nama, ArrayList<Integer> total, ArrayList<Integer> jmlhNoKamar) {\r\n int i = 0;\r\n for (Tamu guest : tamu) {\r\n if(guest.getNama().equals(nama)) {\r\n int tambah = total.get(guest.getJenisKamar()-1) + guest.getJumlahKamar();\r\n total.set(guest.getJenisKamar()-1, tambah);\r\n int kurang = jmlhNoKamar.get(guest.getJenisKamar()-1) - guest.getJumlahKamar();\r\n jmlhNoKamar.set(guest.getJenisKamar()-1, kurang);\r\n guest.setCheckIn(false); \r\n tamu.remove(i);\r\n admin.getTamu().remove(i);\r\n break;\r\n }\r\n i += 1;\r\n }\r\n }",
"@NotifyChange({\"matkulKur\", \"addNew\", \"resetInputIcon\"}) \n @Command(\"batal\")\n public void batal(){\n if (isAddNew()==true) setMatkulKur(getTempMatkulKur()); //\n setResetInputIcon(false);\n setAddNew(false); //apapun itu buat supaya tambah baru selalu kondisi false\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n cakeModel.hasCandles = isChecked;\n cakeView.invalidate();\n }",
"@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}",
"@Override\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\t\tif(!isChecked ){\n \t\t \n\t\t\t\t\t\tsb.setstatusbar(0);\n \t\t\n \t }else{\n \t // sb = \"0\";\n \t \tsb.setstatusbar(1);\n \t }\n\t\t\t\t\t}",
"public void tickCheckBox() {\r\n\t\tcheckBox = driver.findElement(checkBoxSelector);\r\n\t\tcheckBox.click();\r\n\t\t\r\n\t}",
"private void enableCheckChange() {\n this.tree.addListener(Events.CheckChange, new GPCheckListener(visitorDisplay));\n }",
"public void setRememberMeCheckbox(boolean bol) {\r\n\t\tweRemember = utilities.create(inptRemember);\r\n\t\tif(bol) {\r\n\t\t\t//Means you want to activate checkbox\r\n\t\t\tif(!utilities.isCheckboxSelected(weRemember)) {\r\n\t\t\t\tweRemember.click();\t\t\t\t\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t//Means you dont want to activate checkbox\r\n\t\t\t//So we have to be secure that is not selected\r\n\t\t\tif(utilities.isCheckboxSelected(weRemember)) {\r\n\t\t\t\tweRemember.click();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private VBox createBottomOrderBox() {\n\t\tVBox v = new VBox();\n\t\tVBox.setMargin(v, new Insets(5));\n\t\tv.setStyle(\"-fx-border-color: black; \"\n\t\t\t\t+ \"-fx-background-color: gainsboro\");\n\t\tLabel l1 = new Label(\"Please Check Applicable Storage Shelves\");\n\t\tv.getChildren().add(l1);\n\t\t//Iterate into lines of 5 lables and checkboxes\n\t\tfor (int i = 0; i < cf.getShelf().size(); i += 5) {\n\t\t\t\n\t\t\t/*\n\t\t\t * Create the HBox to store up to 5\n\t\t\t * CheckBoxes. Align its contents to the center.\n\t\t\t */\n\t\t\tHBox h = new HBox();\n\t\t\th.setSpacing(10);\n\t\t\tHBox.setMargin(h, new Insets(5));\n\t\t\th.setPadding(new Insets(5));\n\t\t\th.setAlignment(Pos.CENTER);\n\t\t\t/*\n\t\t\t * Decide what to iterate on:\n\t\t\t * If there are >= 5 shelves remaining, \n\t\t\t * iterate against 5. If there are less than 5 \n\t\t\t * shelves, iterate against no.Shelves remaining.\n\t\t\t * This allows blocks of 5 checkboxes and a final\n\t\t\t * dynamicly sized block for the remaining amount.\n\t\t\t */\n\t\t\tif ((cf.getShelf().size()-i) >= 5) {\n\t\t\t\t//For the next 5 StorageShelves\n\t\t\t\tfor (int j = i; j < i+5; j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else if ((cf.getShelf().size()-i) < 5) {\n\t\t\t\t//For the remaining number of shelves\n\t\t\t\tfor (int j = i; j < cf.getShelf().size(); j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"OrderBox Error Found!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//Add HBox and its contents into the VBox\n\t\t\tv.getChildren().add(h);\n\t\t}\n\t\treturn v;\n\t}",
"public int removeLoan(int loan_id, int borrower_id, String ISBN10) throws SQLException {\n\t\tmySQLJDBC.setPreparedSql(\"update book_loan set date_in=SYSDATE() where ISBN10=?;\", ISBN10); //and date_out\n\t\tint resupdate = mySQLJDBC.executeUpdate();\n\t\tif (resupdate != -1) {\n\t\t\tmySQLJDBC.setPreparedSql(\"update book set isAvailable=1 where ISBN10=?;\", ISBN10);\n\t\t\tresupdate = mySQLJDBC.executeUpdate();\n\t\t\tif (resupdate != -1) {\n\t\t\t\tmySQLJDBC.setPreparedSql(\"update borrower set flag=0 where borrower_id=?;\", borrower_id);\n\t\t\t\tresupdate = mySQLJDBC.executeUpdate();\n\t\t\t\tif (resupdate != -1) {\n\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse {//update flag failed\n\t\t\t\t\tmySQLJDBC.close();\n\t\t\t\t\treturn -1; \n\t\t\t\t}\n\t\t\t}\n\t\t\telse {//update isAvailable failed\n\t\t\t\tmySQLJDBC.close();\n\t\t\t\treturn -1; \n\t\t\t}\n\t\t}\n\t\telse {//update date_in failed\n\t\t\tmySQLJDBC.close();\n\t\t\treturn -1; \n\t\t}\n\t}",
"public void saveLoan (Loan loan) throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\t\n\t\ttry{\n\t\t\tString query = \"INSERT INTO loan (client_id, principal_amount, interest_rate, no_years, no_payments_yearly, start_date)\"\n\t\t\t\t\t\t+ \" VALUES ('\"+this.client_id+\"', \"+this.principal_amount+\", \"+this.interest_rate+\", \"+this.no_years+\", \"\n\t\t\t\t\t\t\t\t+ \"\"+this.no_payments_yearly+\", '\"+this.start_date+\"')\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tstat.execute(query);\n\t\t\t\n\t\t\t// Deposit the money in the client's account\n\t\t\tClient client = Client.getClient(client_id);\n\t\t\tClient.deposit(client, principal_amount);\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}",
"@Override\n public void onSureClick(Double value, Double change) {\n checkPresenterImpl.addMemberPayment(value, pwd);\n }",
"public void withdrawalMenu(){\n\t\tstate = ATM_State.WITHDRAW;\n\t\tgui.setDisplay(\"Amount to withdraw: \\n$\");\n\t}",
"public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}",
"public void addCheckboxListener(final Cluster cluster) {\n final JCheckBox wi = allCheckboxes.get(cluster);\n wi.addItemListener(new ItemListener() {\n @Override\n public void itemStateChanged(final ItemEvent e) {\n final Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n final Set<Cluster> clusters =\n Tools.getConfigData().getClusters().getClusterSet();\n \n allCheckboxesListener(clusters, wi);\n }\n });\n thread.start();\n }\n \n });\n }",
"protected void do_owndershipComboBox_actionPerformed(ActionEvent arg0) {\n\t\tif(ownershipComboBox.getSelectedItem().toString().equals(\"Lease\")){\n\t\t\tlblLeaseExpirationDate.setVisible(true);\n\t\t\tleaseMonthComboBox.setVisible(true);\n\t\t\tLeaseDayComboBox.setVisible(true);\n\t\t\tLeaseYearComboBox.setVisible(true);\n\t\t}\n\t\telse if(ownershipComboBox.getSelectedItem().toString().equals(\"Own\")){\n\t\t\tlblLeaseExpirationDate.setVisible(false);\n\t\t\tleaseMonthComboBox.setVisible(false);\n\t\t\tLeaseDayComboBox.setVisible(false);\n\t\t\tLeaseYearComboBox.setVisible(false);\n\t\t}\n\t}",
"private JCheckBox getIgnorePermissionCheck() {\n if (ignorePermissionCheck == null) {\n ignorePermissionCheck = new JCheckBox();\n ignorePermissionCheck.setText(\"Ignore permissions\");\n ignorePermissionCheck.addChangeListener(new ChangeListener() {\n @Override\n public void stateChanged(ChangeEvent e) {\n showDiffTree();\n }\n });\n }\n return ignorePermissionCheck;\n }",
"public void calculateLoan(View view){\n Intent intent = new Intent(this, ResultActivity.class);\n\n //TODO: calculate monthly payment and determine\n double carPrice;\n double downPayment;\n double loadPeriod;\n double interestRate;\n\n \n\n //loan application status; approve or reject\n double monthlyPayment;\n String status;\n\n //Passing data using putExtra method\n //putExtra(TAG, value)\n intent.putExtra(MONTHLY_PAYMENT, monthlyPayment);\n intent.putExtra(LOAN_STATUS, status);\n startActivity(intent);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n LoansGroup = new javax.swing.ButtonGroup();\n jRadioButton4 = new javax.swing.JRadioButton();\n groupFNF = new javax.swing.ButtonGroup();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n tfBookID = new javax.swing.JTextField();\n tfDate = new javax.swing.JTextField();\n tfBorrowerID = new javax.swing.JTextField();\n radBorrow = new javax.swing.JRadioButton();\n radReturn = new javax.swing.JRadioButton();\n radDum = new javax.swing.JRadioButton();\n butCheck = new javax.swing.JButton();\n butAdd = new javax.swing.JButton();\n butClear = new javax.swing.JButton();\n butViewLoans = new javax.swing.JButton();\n scrollPane = new javax.swing.JScrollPane();\n butViewBorrowers = new javax.swing.JButton();\n radFiction = new javax.swing.JRadioButton();\n radNonFiction = new javax.swing.JRadioButton();\n radDum2 = new javax.swing.JRadioButton();\n butUpdate = new javax.swing.JButton();\n butDelete = new javax.swing.JButton();\n\n jRadioButton4.setText(\"jRadioButton4\");\n\n jLabel1.setText(\"Borrower ID:\");\n\n jLabel2.setText(\"Book ID:\");\n\n jLabel3.setText(\"Date:\");\n\n tfDate.setToolTipText(\"Date in the format DD/MM/YYY\");\n\n LoansGroup.add(radBorrow);\n radBorrow.setText(\"Borrowing\");\n\n LoansGroup.add(radReturn);\n radReturn.setText(\"Returning\");\n\n LoansGroup.add(radDum);\n radDum.setText(\"dum\");\n\n butCheck.setText(\"Check in/out\");\n butCheck.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butCheckActionPerformed(evt);\n }\n });\n\n butAdd.setText(\"Add new borrower\");\n butAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butAddActionPerformed(evt);\n }\n });\n\n butClear.setText(\"Clear\");\n butClear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butClearActionPerformed(evt);\n }\n });\n\n butViewLoans.setText(\"View all loans\");\n butViewLoans.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butViewLoansActionPerformed(evt);\n }\n });\n\n butViewBorrowers.setText(\"View all borrowers\");\n butViewBorrowers.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butViewBorrowersActionPerformed(evt);\n }\n });\n\n groupFNF.add(radFiction);\n radFiction.setText(\"Fiction\");\n\n groupFNF.add(radNonFiction);\n radNonFiction.setText(\"Non-fiction\");\n\n groupFNF.add(radDum2);\n radDum2.setText(\"jRadioButton3\");\n\n butUpdate.setText(\"Update borrower\");\n butUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butUpdateActionPerformed(evt);\n }\n });\n\n butDelete.setText(\"Delete borrower\");\n butDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butDeleteActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(radBorrow)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radReturn)\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfDate)\n .addGap(214, 214, 214)\n .addComponent(butCheck)\n .addGap(134, 134, 134))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfBorrowerID, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(scrollPane)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(216, 216, 216)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfBookID, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(radFiction)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(radNonFiction))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(radDum2)\n .addComponent(radDum))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(butAdd)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(butUpdate)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(butDelete)\n .addGap(1, 1, 1)))\n .addComponent(butViewLoans)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(butViewBorrowers)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(butClear)))\n .addGap(12, 12, 12))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(tfBorrowerID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)\n .addComponent(tfBookID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(radFiction)\n .addComponent(radNonFiction))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(radBorrow)\n .addComponent(radReturn)\n .addComponent(jLabel3)\n .addComponent(tfDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(butCheck))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(radDum2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(radDum)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(butAdd)\n .addComponent(butClear)\n .addComponent(butViewLoans)\n .addComponent(butViewBorrowers)\n .addComponent(butUpdate)\n .addComponent(butDelete))\n .addGap(22, 22, 22))))\n );\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateAcctCheckbox() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether proper error message is displayed when continuing with out enabling the accounts check box\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.ValidateCheckboxerror(userProfile);\t \t \t\t\n\t}",
"@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif(isChecked){\r\n\t //update the status of checkbox to checked\r\n\t \r\n\t checkedItem.set(p, true);\r\n\t idList.set(p,id);\r\n\t item.set(p, friend);\r\n\t nameList.set(p, name);\r\n\t }else{\r\n\t //update the status of checkbox to unchecked\r\n\t checkedItem.set(p, false);\r\n\t idList.set(p,null);\r\n\t item.set(p, null);\r\n\t nameList.set(p, null);\r\n\t }\r\n\t\t\t}",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n kc.setChecked(false);\n }\n //do something else\n lbButton = true;\n\n }",
"public void takeOutLoan(double value)\r\n {\r\n loan += value;\r\n addCash(value);\r\n }",
"public void toppingChecked(View view) {\n Log.d(\"Method\", \"toppingChecked()\");\n displayQuantity();\n }",
"@Override\n\tpublic boolean addStockAlarmBill(StockAlarmBillPO bill) throws RemoteException {\n\t\ttry {\t\n\t\t\tStatement statement_1 = con.createStatement();\t\n\t\t\tStatement statement_2 = con.createStatement();\t\n\t\t\tStatement statement_3 = con.createStatement();\t\n\t\t\tint state = BillState.getIntByState(bill.getState());\n\t\t\tString id = bill.getId();\n\t\t\tjava.util.Date date = bill.getDate();\n\t\t\tjava.sql.Date d = new java.sql.Date(date.getTime());\n\t\t\tString operatorid = bill.getOperatorID();\n\t\t\tString wareid = bill.getWareID();\n\t\t\tString sql_1 = \"insert into stockalarmbill values(' \" + state +\"','\"+ id +\"','\"+ d+\"','\"+ operatorid+\"','\"\n\t\t\t\t\t+ wareid+\"')\";\t\t\n\t\t\tstatement_1.execute(sql_1);\n\n\t\t\tArrayList<StockAlarmBillItem> itemList = bill.getItemList();\n\n\t\t\tString sql_2 = \"CREATE TABLE IF NOT EXISTS erp.stock\" + id +\t\t \n\t\t\t\t\t\" (Number char(10), \" +\t\t \n\t\t\t\t\t\"Name char(10), \" +\t\t \n\t\t\t\t\t\"Amount bigint(20),\" +\n\t\t\t\t\t\"AlarmAmount bigint(20));\";\n\t\t\t statement_2.execute(sql_2);\n\t\t\tfor(int i=0 ; i<itemList.size() ; i++) {\n\t\t\t\tStockAlarmBillItem item = itemList.get(i);\n\t\t\t\tString sql_3 = \"insert into stock\"\n\t\t\t\t\t\t+id+ \" values(' \" + item.getNumber() +\"','\"+ item.getName() +\"',\"+ item.getAmount() \n\t\t\t\t\t\t+\",\"+ item.getAlarmAmount()+\")\";\n\t\t\t\tstatement_3.execute(sql_3);\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \t\n\t\treturn false;\n\t}",
"void setENBL(boolean L_flgSTAT)\n\t{ \n\t\tsuper.setENBL(L_flgSTAT);\n\t\ttblPRTLS.clrTABLE();\n\t\ttblGRPLS.clrTABLE();\n\t\ttxtPRTTP.setText(\"C\");\n\t\ttblPRTLS.cmpEDITR[TB1_CHKFL].setEnabled(false);\n\t\ttblPRTLS.cmpEDITR[TB1_PRTCD].setEnabled(false);\n\t\ttblPRTLS.cmpEDITR[TB1_PRTNM].setEnabled(false);\n\t\ttblPRTLS.cmpEDITR[TB1_ADD01].setEnabled(false);\n\t\ttblPRTLS.cmpEDITR[TB1_ZONCD].setEnabled(false);\n\t\t//txtPRTTP.setEnabled(false);\n\t\ttblGRPLS.cmpEDITR[TB2_CHKFL].setEnabled(false);\n\t\ttblGRPLS.cmpEDITR[TB2_PRTCD].setEnabled(false);\n\t\ttblGRPLS.cmpEDITR[TB2_PRTNM].setEnabled(false);\n\t\ttblGRPLS.cmpEDITR[TB2_ADD01].setEnabled(false);\n\t\ttblGRPLS.cmpEDITR[TB2_ZONCD].setEnabled(false);\n\t\tchkNEWRE.setEnabled(false);\n\t\tchkSTRFL.setEnabled(true);\n\t\tchkNEWRE.setVisible(false);\n\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPADD_pbst))\n\t\t{\n\t\t\ttblPRTLS.cmpEDITR[TB1_CHKFL].setEnabled(true);\n\t\t\tchkNEWRE.setEnabled(true);\n\t\t\tchkNEWRE.setVisible(true);\n\t\t}\n\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPDEL_pbst))\n\t\t{\n\t\t\ttblGRPLS.cmpEDITR[TB2_CHKFL].setEnabled(true);\n\t\t}\n\t}",
"public static void enterDetails(int num, double interest){\r\n Scanner s = new Scanner(System.in);\r\n String name;\r\n double amm=0;\r\n int term=-1;\r\n \r\n int loanType;\r\n \r\n do{\r\n System.out.println(\"Press 1: Business Loan\\n\"\r\n + \"Press 2: Personal Loan\");\r\n loanType = parseInt(s.next());\r\n }while(!(loanType == 1 || loanType == 2));\r\n \r\n while(amm <= 0 || amm > 100000){\r\n System.out.print(\"Enter loan ammount: \");\r\n amm = parseDouble(s.next());\r\n if(amm > 100000){\r\n System.out.println(\"Loan exceeds limit\");\r\n }\r\n }\r\n System.out.print(\"Enter the term in years: \");\r\n term = parseInt(s.next());\r\n if(!(term==3 || term==5)){\r\n System.out.println(\"Loan term set to 1 year\");\r\n }\r\n \r\n System.out.print(\"Enter last name: \");\r\n name = s.next();\r\n \r\n switch (loanType) {\r\n case 1:\r\n BusinessLoan b = new BusinessLoan(num, name, amm, term, interest);\r\n if(b.loanNum!=-1){\r\n loan.add(b);\r\n System.out.println(\"Loan approved\");\r\n } \r\n break;\r\n case 2:\r\n PersonalLoan p = new PersonalLoan(num, name, amm, term, interest);\r\n if(p.loanNum!=-1){\r\n loan.add(p);\r\n System.out.println(\"Loan approved\");\r\n }\r\n break;\r\n }\r\n System.out.println(\"---------------------------------------------\");\r\n }",
"abstract public LoanApplicationResponse handleLoanRequest(LoanApplicationRequest loanRequest);",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagLianxiren = !bFlagLianxiren;\r\n\t\t\t\t lianxiren_btn.setChecked(bFlagLianxiren);\r\n\t\t\t }",
"public void withdrawFromChecking(double amount) {\r\n\t\tif(amount > this.getSavingsBalance()) {\r\n\t\t\tSystem.out.println(\"Unsufficient funds\");\r\n\t\t} else {\r\n\t\t\tthis.checkingBalance -= amount;\r\n\t\t\ttotalAmount -= amount;\r\n\t\t}\r\n\t}",
"boolean markPaid(long billId);",
"@Override\n\tpublic void checkWayBillChange(String id) {\n\t\t\n\t}",
"private int adjustLoan(PreparedStatement updateLoan, int loanNumber, float adjustedLoanAmount) throws SQLException {\n updateLoan.setFloat(1, adjustedLoanAmount);\n updateLoan.setInt(2, loanNumber);\n return updateLoan.executeUpdate(); // TODO: call to executeUpdate on a PreparedStatement\n }",
"public void DisableCheckBox(ActionEvent event) throws Exception {\n\n if (!SavingRB.isSelected()) {//if savings is not selected than disable specials acc check box\n SpecialSavingAccCB.setSelected(false);\n SpecialSavingAccCB.setDisable(true);\n } else SpecialSavingAccCB.setDisable(false);\n\n if (!CheckingRB.isSelected()) {//if checkings is not selected than disable direct deposit check boc\n DirectDepositCheckingsCB.setSelected(false);\n DirectDepositCheckingsCB.setDisable(true);\n } else DirectDepositCheckingsCB.setDisable(false);\n\n if (CloseAccRB.isSelected()) {//if and else if to disable textfields based on bank options\n AmountInput.setDisable(true);\n DateInput.setDisable(true);\n } else if (DepositRB.isSelected() || WithdrawAccRB.isSelected()) {\n AmountInput.setDisable(false);\n DateInput.setDisable(true);\n } else {\n AmountInput.setDisable(false);\n DateInput.setDisable(false);\n }\n\n\n }",
"public void listenChkBoxAddListner(ActionListener listener)\r\n\t{\r\n\t\tlistenChkBox.addActionListener(listener);\r\n\t}",
"void ballState(boolean hasBall, String ballPlayer) {\n if (hasBall) {\n hasBallLabel.setText(\"You have the ball\");\n hasBallLabel.setForeground(Color.RED);\n updateComboBox();\n } else {\n hasBallLabel.setText(ballPlayer + \" has the ball\");\n hasBallLabel.setForeground(Color.BLACK);\n }\n menuPlayersComboBox.setEnabled(hasBall);\n menuThrowButton.setEnabled(hasBall);\n menuRefreshButton.setEnabled(hasBall);\n }",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tprefs.edit().putBoolean(\"reject\", reject.isChecked()).commit();\n\t\t\t\tif(isChecked)\n\t\t\t\t{\n\t \t\t\tchoose.setVisibility(View.VISIBLE);\n\t \t\t\tmessageCheck.setVisibility(View.VISIBLE);\n\t \t\t\tif(messageCheck.isChecked())\n\t \t\t\t{\n\t\t\t\t\tmessage.setVisibility(View.VISIBLE);\n\t\t\t\t\tsave.setVisibility(View.VISIBLE);\n\t \t\t\t}\n\t\t\t\t\tif(choose.getSelectedItemId()!=0)\n\t\t \t\t\tcontacts.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t \t\t\tmessageCheck.setVisibility(View.GONE);\n\t \t\t\tchoose.setVisibility(View.GONE);\n\t \t\t\tmessage.setVisibility(View.GONE);\n\t\t\t\t\tsave.setVisibility(View.GONE);\n\t\t\t\t\tcontacts.setVisibility(View.GONE);\n\t \t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"public int getLoanId() {\r\n\t\treturn loanId;\r\n\t}",
"private static boolean checkbox(WebElement element, String sLog, WebElement ajax, int nMaxWaitTime,\n\t\t\tboolean bException, CheckBox checkbox)\n\t{\n\t\t// Is check box enable/selected?\n\t\tboolean bEnabled = Framework.isElementEnabled(element);\n\t\tboolean bChecked = Framework.isElementSelected(element);\n\n\t\t// Does user want to skip taking action?\n\t\tif (checkbox.skip)\n\t\t{\n\t\t\tString sMessage = \"Check box for '\" + sLog + \"' was skipped. The check box was \";\n\t\t\tif (bEnabled)\n\t\t\t\tsMessage += \"enabled\";\n\t\t\telse\n\t\t\t\tsMessage += \"disabled\";\n\n\t\t\tif (bChecked)\n\t\t\t\tsMessage += \" and selected\";\n\t\t\telse\n\t\t\t\tsMessage += \" and not selected\";\n\n\t\t\tLogs.log.info(sMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Do we need to take action based on current state?\n\t\t\tboolean bTakeAction = false;\n\t\t\tif (checkbox.check)\n\t\t\t{\n\t\t\t\tif (bChecked)\n\t\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already selected\");\n\t\t\t\telse\n\t\t\t\t\tbTakeAction = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (bChecked)\n\t\t\t\t\tbTakeAction = true;\n\t\t\t\telse\n\t\t\t\t\tLogs.log.info(\"Check box for '\" + sLog + \"' was already unselected\");\n\t\t\t}\n\n\t\t\t// Only click the check box if it is necessary to make it the desired state by the user\n\t\t\tif (bTakeAction)\n\t\t\t{\n\t\t\t\treturn click(element, sLog, ajax, nMaxWaitTime, bException);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public void onMonthlyCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n TextView send_btn = (TextView) findViewById(R.id.send_donation_text);\n\n int string_id = (checked)? R.string.huhi_ui_do_monthly : R.string.huhi_ui_send_tip;\n String btn_text = getResources().getString(string_id);\n send_btn.setText(btn_text);\n }",
"@Test\r\n\tpublic void testDoLoanChromebook() {\n\r\n\t\tResourceCentre.addChromebook(chromebookList, cb1);\r\n\t\tResourceCentre.addChromebook(chromebookList, cb2);\r\n\r\n\t\t// Item list is not null, newly added item can be loaned out successfully.\r\n\t\tassertNotNull(\"Test that list is not null\", chromebookList);\r\n\t\tassertTrue(\"Test if item can be loaned successfully\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0011\", \"01/01/2010\"));\r\n\r\n\t\t// Item availability is false, when item is loaned out.\r\n\t\tassertFalse(\"Test that itemAvailability is false when loaned out\", cb1.getIsAvailable());\r\n\r\n\t\t// After item is loaned out, it cannot be loaned again.\r\n\t\tassertFalse(\"Test that item cannot be loaned once loaned out\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0011\", \"01/01/2010\"));\r\n\r\n\t\t// Another item in the list can be loaned out successfully.\r\n\t\tassertTrue(\"Test that item can be loaned out successfully\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0012\", \"01/01/2010\"));\r\n\t\tassertFalse(\"Test that itemAvailability is false when loaned out\", cb2.getIsAvailable());\r\n\r\n\t\t// Item can be loaned out again when returned.\r\n\t\tassertTrue(\"Return item.\", ResourceCentre.doReturnChromebook(chromebookList, \"CB0011\"));\r\n\t\tassertTrue(\"Test that item can be loaned again when returned.\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0011\", \"01/01/2010\"));\r\n\r\n\t}",
"private void butAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butAddActionPerformed\n AddBorrower ab = new AddBorrower();\n ab.setVisiblePanel(0);\n ab.setVisible(true);\n }",
"public final void entryRuleCheckbox() throws RecognitionException {\n try {\n // InternalBrowser.g:479:1: ( ruleCheckbox EOF )\n // InternalBrowser.g:480:1: ruleCheckbox EOF\n {\n before(grammarAccess.getCheckboxRule()); \n pushFollow(FOLLOW_1);\n ruleCheckbox();\n\n state._fsp--;\n\n after(grammarAccess.getCheckboxRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"public void onCheckboxClicked(View view) {\n boolean aprendido = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.checkboxAprendido:\n if (aprendido == true) {\n // Put some meat on the sandwich\n break;\n }\n }\n }",
"public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}",
"public void ckbxChanged(CheckBox box,JFXTextField field){\n if(box.isSelected()){\n //unblur and set editable\n unblur(field);\n field.setEditable(true);\n }else{\n //blur and make uneditable\n blur(field);\n field.setEditable(false);\n }\n }",
"@FXML\n\tprivate void botChecked(MouseEvent event) {\n\t\tuserList.setVisible(false);\n\t\tchatView.setText(\"\");\n\t\tif (\tsassiBot) {\n\t\t\tfor (ArrayList <String> conversation : this.conversations) {\n\t\t\t\tif (this.currentConversation.equals(String.join(\", \", conversation))) {\n\t\t\t\t\tclient.updateGroup(conversation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsassiBot = false;\n\t\t\tuserList.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\tsassiBot = true;\n\t\tthis.conversantName.setText(\"SASSIBOT\");\n\t\tthis.conversantImage.setVisible(true);\n\t\tthis.greenCircle.setVisible(false);\n\t}",
"public io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin.Builder addActionLogBuilder() {\n return getActionLogFieldBuilder().addBuilder(\n io.opencannabis.schema.commerce.CommercialOrder.StatusCheckin.getDefaultInstance());\n }",
"boolean isCheckedOut();",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n li.setChecked(false);\n }\n //do something else\n kgButton = true;\n }",
"private JCheckBox getJCheckBox1() {\r\n\t\tif (jCheckBox1 == null) {\r\n\t\t\tjCheckBox1 = new JCheckBox();\r\n\t\t\tjCheckBox1.setToolTipText(\"This brief description will be added to the biclustering results file\");\r\n\t\t\tjCheckBox1.setBounds(32, 316, 184, 24);\r\n\t\t\tjCheckBox1.setText(\"Add description line\");\r\n\t\t\tjCheckBox1.setEnabled(false);\r\n\t\t}\r\n\t\treturn jCheckBox1;\r\n\t}",
"public String uncheckedBill() {\n\t\tMap<String,Object> request = (Map) ActionContext.getContext().get(\"request\");\r\n\t\t\r\n\t\tSet uncheckedBill = creditCardManager.getUncheckedBill(creditCardID);\r\n\t\trequest.put(\"uncheckedBill\", uncheckedBill);\r\n\t\treturn \"uncheckedBill\";\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdouble temp;\r\n\t\t\t\tif(chkBonus.isChecked())\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp = Double.parseDouble(entity.getF_Price()) + 150000;\r\n\t\t\t\t\ttxtTotal.setText(Helper.formatNumberExcel(String.valueOf(temp)));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\ttxtTotal.setText(Helper.formatNumberExcel(entity.getF_Price()));\r\n\t\t\t\t}\r\n\t\t\t}",
"public void submitOrder(View view) {\n //display(2);\n int price = quantity*5;\n CheckBox WhippedCreamCheckBox = (CheckBox) findViewById(R.id.checkbox_view);\n CheckBox ChocalteToppingdCheckbox =(CheckBox) findViewById(R.id.checkboxviewChocalate);\n\n boolean has = WhippedCreamCheckBox.isChecked();\n boolean has2 = ChocalteToppingdCheckbox.isChecked();\n EditText name = (EditText) findViewById(R.id.name_edit_field);\n // String nametext = (String) name.getText();\n\n int totalPrice = getTotalPrice(has,has2);\n createOrederSummary(price,has,has2,name.getText().toString(),totalPrice);\n\n\n //String message=\"Thank You !!\\n\"+\"Your Total: $\"+price;\n //displayMessage(message);\n }",
"@Test\n public void testLoanForeclosure() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n final Integer loanProductID = createLoanProduct(false, NONE);\n\n List<HashMap> charges = new ArrayList<>();\n\n Integer flatAmountChargeOne = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatAmountChargeOne, \"50\", \"01 October 2011\");\n Integer flatAmountChargeTwo = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"100\", true));\n addCharges(charges, flatAmountChargeTwo, \"100\", \"15 December 2011\");\n\n List<HashMap> collaterals = new ArrayList<>();\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"10,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"----------------------------------- APPROVE LOAN -----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"----------------------------------- DISBURSE LOAN ----------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID, \"10,000.00\",\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LOG.info(\"DISBURSE {}\", loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n LOG.info(\"---------------------------------- Make repayment 1 --------------------------------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"2676.24\"), loanID);\n\n LOG.info(\"---------------------------------- FORECLOSE LOAN ----------------------------------------\");\n LOAN_TRANSACTION_HELPER.forecloseLoan(\"08 November 2011\", loanID);\n\n // retrieving the loan status\n loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n // verifying the loan status is closed\n LoanStatusChecker.verifyLoanAccountIsClosed(loanStatusHashMap);\n // retrieving the loan sub-status\n loanStatusHashMap = LoanStatusChecker.getSubStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n // verifying the loan sub-status is foreclosed\n LoanStatusChecker.verifyLoanAccountForeclosed(loanStatusHashMap);\n\n }",
"public void swapCardStatus(final int key, final CheckBox checkBox) {\n synchronized (this) { // activamos o desactivamos una tarjeta a la vez\n final Card card = mUser.mCardsMap.get(key);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n final User.OnUpdate listener = new User.OnUpdate() {\n\n @Override\n public void onPreUpdate() {\n // Do pre stuff\n }\n\n @Override\n public void onPostUpdate(int responceCode, String message) {\n // Do post Stuff\n }\n };\n\n DialogInterface.OnClickListener dialogOnClick = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (which == Dialog.BUTTON_POSITIVE) {\n mUser.changeCardStatus(key, listener);\n checkBox.setEnabled(false);\n } else {\n checkBox.setChecked(card.isActive());\n }\n dialog.dismiss();\n }\n };\n\n if (card.isActive()) {\n builder.setMessage(R.string.dialog_change_status_message_deactivating)\n .setTitle(R.string.dialog_change_status_title_deactivating)\n .setIcon(android.R.attr.alertDialogIcon)\n .setPositiveButton(android.R.string.ok, dialogOnClick)\n .setNegativeButton(android.R.string.cancel, dialogOnClick);\n builder.create().show();\n } else {\n builder.setMessage(R.string.dialog_change_status_message_activating)\n .setTitle(R.string.dialog_change_status_title_activating)\n .setIcon(android.R.attr.alertDialogIcon)\n .setPositiveButton(android.R.string.ok, dialogOnClick)\n .setNegativeButton(android.R.string.cancel, dialogOnClick);\n builder.create().show();\n }\n }\n }",
"boolean hasLedger();",
"public I18nCheckbox() {\n super();\n }",
"public T caseUbqCheckbox(UbqCheckbox object) {\r\n\t\treturn null;\r\n\t}"
] |
[
"0.75622815",
"0.59903693",
"0.5597263",
"0.5319996",
"0.52390504",
"0.506679",
"0.50548387",
"0.49998266",
"0.49767065",
"0.49658066",
"0.49553743",
"0.493862",
"0.490977",
"0.49034724",
"0.48993555",
"0.48548692",
"0.48470077",
"0.48294747",
"0.48199427",
"0.4791791",
"0.47773352",
"0.47461784",
"0.47250572",
"0.47232637",
"0.47173765",
"0.47072497",
"0.46823728",
"0.46764028",
"0.46548146",
"0.46510348",
"0.4637837",
"0.46369222",
"0.4627453",
"0.4622043",
"0.461585",
"0.45897388",
"0.4579476",
"0.45527428",
"0.45513746",
"0.4542044",
"0.4536733",
"0.45365223",
"0.45150068",
"0.45148167",
"0.45089263",
"0.45012626",
"0.450114",
"0.4498312",
"0.4496045",
"0.4494235",
"0.4491841",
"0.4479672",
"0.44678476",
"0.44668084",
"0.44622812",
"0.44621232",
"0.44610244",
"0.44484526",
"0.44480675",
"0.44362432",
"0.44316092",
"0.44255424",
"0.44117707",
"0.4410961",
"0.44027442",
"0.43932647",
"0.43913504",
"0.43890268",
"0.4388749",
"0.438738",
"0.4385606",
"0.43820468",
"0.43775573",
"0.43751314",
"0.43724376",
"0.4370525",
"0.43684465",
"0.4359154",
"0.43523166",
"0.43510854",
"0.43509656",
"0.43505493",
"0.43480507",
"0.43452498",
"0.4342709",
"0.43418965",
"0.4340525",
"0.43382442",
"0.43348145",
"0.43334967",
"0.43321237",
"0.43310523",
"0.43223524",
"0.43219596",
"0.431595",
"0.4315822",
"0.43126976",
"0.43106744",
"0.430708",
"0.4303411"
] |
0.7754583
|
0
|
/ loanChkBoxTicked is called when loanChkBox is ticked. If the given input is true, it adds the additional input fields, pseudotable, and button for the loan tools. Otherwise it removes them
|
private void loanChkBoxTicked(boolean isLoan)
{
if (isLoan)
{
// https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/
LinearLayout loanItems;
LayoutInflater layoutInflater = getLayoutInflater();
loanItems = (LinearLayout) layoutInflater.inflate(
R.layout.content_basic_financial_loan_view, null);
this.loanLinParent.addView(loanItems);
setUpLoanBtn();
// This makes it so that pressing the enter button from the interest rate field calculates
// the loan.
EditText interest = (EditText) findViewById(R.id.edit_loan_interest);
interest.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View view, int i, KeyEvent keyEvent) {
if ((keyEvent.getAction() == KeyEvent.ACTION_UP) &&
((i == KeyEvent.KEYCODE_ENTER) || (i == KeyEvent.KEYCODE_NUMPAD_ENTER)))
{
onCalcLoanBtnClicked();
return true;
}
return false;
}
});
}
else
{
Log.d(TAG, "Attempting to remove the loan items!");
/* If the layout that holds the loan is not in view, this does not get used (to avoid null
* reference calls).
*/
if (!(this.loanLinParent == null) && !(findViewById(R.id.lin_loan_main) == null))
{
this.moneyOutLinParent.removeView(findViewById(R.id.lin_loan_main));
Log.d(TAG, "Success!");
addLoanChkBox(true);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void addLoanChkBox(boolean isBill)\r\n {\r\n if (isBill)\r\n {\r\n // Here is where I assign the layout that loanLinParent actually points to.\r\n this.loanLinParent = (LinearLayout) findViewById(R.id.lin_loan_main);\r\n\r\n // https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/\r\n // This is a LayoutInflater instance. It is what I am using to add views to the layout.\r\n LayoutInflater layoutInflater = getLayoutInflater();\r\n\r\n /* I set the parent to null because I use the addView method of LinearLayouts below this.\r\n * I am using the index such that the loan layout will be placed second-to-last in the main\r\n * view (just above the \"add transaction\" button).\r\n */\r\n this.loanLinParent = (LinearLayout) layoutInflater.inflate(\r\n R.layout.content_basic_financial_loan_checkbox, null);\r\n this.moneyOutLinParent.addView(this.loanLinParent,\r\n this.moneyOutLinParent.getChildCount() - 1);\r\n\r\n // Here is where I assign which checkbox loanChkBox actually refers to.\r\n this.loanChkBox = (CheckBox) findViewById(R.id.chk_loan);\r\n // Here is where I set up loanChkBox's functionality\r\n this.loanChkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\r\n @Override\r\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\r\n Log.d(TAG, \"Loan? \" + String.valueOf(b));\r\n loanChkBoxTicked(b);\r\n }\r\n });\r\n }\r\n\r\n else\r\n {\r\n Log.d(TAG, \"Attempting to remove the loan checkbox!\");\r\n /* If the layout that holds the loan is not in view, this does not get used (to avoid null\r\n * reference calls).\r\n */\r\n if (!(this.loanLinParent == null))\r\n {\r\n this.moneyOutLinParent.removeView((View) this.loanLinParent);\r\n Log.d(TAG, \"Success!\");\r\n }\r\n }\r\n }",
"private void setUpCheckBox(final int flag, CheckBox checkBox, LinearLayout llCheckBox) {\n if ((movie.getAvailableExtras() & flag) != 0) {\n checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n flagsApplied = flagsApplied ^ flag;\n updatePriceAndSaving();\n }\n });\n } else {\n llCheckBox.setVisibility(View.GONE);\n }\n }",
"public void checkboxaddClicked(View view) {\n flag++;\n mRlNote.setVisibility(View.GONE);\n mRlAddItem.setVisibility(View.VISIBLE);\n }",
"public void tickCheckBox() {\r\n\t\tcheckBox = driver.findElement(checkBoxSelector);\r\n\t\tcheckBox.click();\r\n\t\t\r\n\t}",
"void setCheckedOut(boolean checkedOut);",
"private void onCheckBoxTeilungMitte()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\n\t\tif (getJCheckBoxTeilungMitte().isSelected())\n\t\t{\n\t\t\tgetJCheckBoxTeilungLinks().setEnabled(true);\n\t\t\tgetJCheckBoxTeilungRechts().setEnabled(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgetJCheckBoxTeilungLinks().setEnabled(false);\n\t\t\tgetJCheckBoxTeilungRechts().setEnabled(false);\n\t\t\tgetJCheckBoxTeilungLinks().setSelected(false);\n\t\t\tgetJCheckBoxTeilungRechts().setSelected(false);\n\t\t}\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}",
"public void itemStateChanged(ItemEvent check) {\r\n\r\n // Process the reaction class checkboxes. First\r\n // get the components of the relevant panels\r\n // and store in Component arrays (Note: the method\r\n // getComponents() is inherited from the Container\r\n // class by the subclass Panel).\r\n\r\n Component [] components4 = panel4.getComponents();\r\n Component [] components5 = panel5.getComponents();\r\n\r\n // Now process these components that are checkboxes\r\n // (only the first element of each array is). First cast the\r\n // Component to a Checkbox. Then use the getState()\r\n // method of Checkbox to return boolean true if\r\n // checked and false otherwise.\r\n\r\n Checkbox cb4 = (Checkbox)components4[0]; // Checkbox for panel4\r\n Checkbox cb5 = (Checkbox)components5[0]; // Checkbox for panel5\r\n\r\n // Then use the getState() method of Checkbox to\r\n // return boolean true if checked and false otherwise.\r\n // Use this logic to disable one or the other sets of\r\n // choices for temperature and density input.\r\n\r\n if( cb4.getState() ) {\r\n checkBox[1].setState(false); // Seems needed despite CheckBoxGroup\r\n rho.disable();\r\n rho.setBackground(disablebgColor);\r\n rhoL.setForeground(disablefgColor);\r\n T9.disable();\r\n T9.setBackground(disablebgColor);\r\n T9L.setForeground(disablefgColor);\r\n profile.enable();\r\n profile.setBackground(panelBackColor);\r\n profileL.setForeground(panelForeColor);\r\n } else if ( cb5.getState() ) {\r\n checkBox[0].setState(false);\r\n rho.enable();\r\n rho.setBackground(panelBackColor);\r\n rhoL.setForeground(panelForeColor);\r\n T9.enable();\r\n T9.setBackground(panelBackColor);\r\n T9L.setForeground(panelForeColor);\r\n profile.disable();\r\n profile.setBackground(disablebgColor);\r\n profileL.setForeground(disablefgColor);\r\n }\r\n }",
"@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {\n if (!isChecked) {\n //show password of door\n type3.setTransformationMethod(PasswordTransformationMethod.getInstance());\n new1.setTransformationMethod(PasswordTransformationMethod.getInstance());\n } else {\n //hide password of door\n type3.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n new1.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n }\n }",
"private JPanel createInputPanel() {\n\t\tJPanel inputPanelWrapper = new JPanel();\n\t\tinputPanelWrapper.setLayout(new BoxLayout(inputPanelWrapper, BoxLayout.PAGE_AXIS));\n\t\t\n\t JCheckBox checkbox1 = new JCheckBox(\"Print algorithm best iterations\");\n\t checkbox1.setToolTipText(GuiMsg.TipSettPrintAlgIter);\n\t checkbox1.setSelected(Config.PRINT_ALGORITHM_BEST_ITER);\n\t \n\t JCheckBox checkbox2 = new JCheckBox(\"Print algorithm results\");\n\t checkbox2.setToolTipText(GuiMsg.TipSettPrintAlgRes);\n\t checkbox2.setSelected(Config.PRINT_ALGORITHM_RESULTS);\n\t \n\t JCheckBox checkbox3 = new JCheckBox(\"Plot algorithm results\");\n\t checkbox3.setToolTipText(GuiMsg.TipSettPlotAlgRes);\n\t checkbox3.setSelected(Config.PLOT_ALGORITHM_RESULTS);\n\t \n\t JCheckBox checkbox4 = new JCheckBox(\"Export results to excel\");\n\t checkbox4.setToolTipText(GuiMsg.TipSettExcel);\n\t checkbox4.setSelected(Config.EXPORT_RESULTS_EXCEL);\n\t \n\t JCheckBox checkbox5 = new JCheckBox(\"Debug mode\");\n\t checkbox5.setToolTipText(GuiMsg.TipSettDebug);\n\t checkbox5.setSelected(Config.DEBUG_MODE);\n\t \n\t JCheckBox checkbox6 = new JCheckBox(\"Print details\");\n\t checkbox6.setToolTipText(GuiMsg.TipSettDetails);\n\t checkbox6.setSelected(Config.PRINT_DETAILS);\n\t \n\t JCheckBox checkbox7 = new JCheckBox(\"Print cost details\");\n\t checkbox7.setToolTipText(GuiMsg.TipSettCost);\n\t checkbox7.setSelected(Config.PRINT_COST_DETAILS);\n\t \n\t JCheckBox checkbox8 = new JCheckBox(\"Dynamic simulation\");\n\t checkbox8.setToolTipText(GuiMsg.TipSettDynamic);\n\t checkbox8.setSelected(Config.DYNAMIC_SIMULATION);\n\t \n\t JCheckBox checkbox9 = new JCheckBox(\"Allow migration\");\n\t checkbox9.setToolTipText(GuiMsg.TipSettMigration);\n\t checkbox9.setSelected(Config.ALLOW_MIGRATION);\n\t \n\t checkbox1.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.PRINT_ALGORITHM_BEST_ITER = e.getStateChange() == 1 ? true : false;\n }\n\t });\n\t \n\t checkbox2.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.PRINT_ALGORITHM_RESULTS = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox3.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.PLOT_ALGORITHM_RESULTS = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox4.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.EXPORT_RESULTS_EXCEL = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox5.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.DEBUG_MODE = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox6.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.PRINT_DETAILS = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox7.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.PRINT_COST_DETAILS = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox8.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.DYNAMIC_SIMULATION = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n\t checkbox9.addItemListener(new ItemListener() {\n public void itemStateChanged(ItemEvent e) {\n \tConfig.ALLOW_MIGRATION = e.getStateChange() == 1 ? true : false;\n }\n });\n\t \n inputPanelWrapper.add(checkbox1);\n inputPanelWrapper.add(checkbox2);\n inputPanelWrapper.add(checkbox3);\n inputPanelWrapper.add(checkbox4);\n inputPanelWrapper.add(checkbox5);\n inputPanelWrapper.add(checkbox6);\n inputPanelWrapper.add(checkbox7);\n inputPanelWrapper.add(checkbox8);\n inputPanelWrapper.add(checkbox9);\n \n\t\treturn inputPanelWrapper;\n\t}",
"public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n cakeModel.hasCandles = isChecked;\n cakeView.invalidate();\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"private void onCheckBoxTeilungRechts()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}",
"public void finalcheckbox() {\n\t\tthis.finalcheckbox.click();\n\t}",
"public void onCheckboxClicked(View view) {\n boolean aprendido = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.checkboxAprendido:\n if (aprendido == true) {\n // Put some meat on the sandwich\n break;\n }\n }\n }",
"private void drawCheck(Graphics2D g2, Component c, boolean enabled, int x, int y, int w, int h)\r\n/* 201: */ {\r\n/* 202:235 */ g2.translate(x, y);\r\n/* 203:236 */ if (enabled)\r\n/* 204: */ {\r\n/* 205:237 */ g2.setColor(UIManager.getColor(\"RadioButton.check\"));\r\n/* 206:238 */ g2.fillOval(0, 0, w, h);\r\n/* 207:239 */ UIManager.getIcon(\"RadioButton.checkIcon\").paintIcon(c, g2, 0, 0);\r\n/* 208: */ }\r\n/* 209: */ else\r\n/* 210: */ {\r\n/* 211:241 */ g2.setColor(MetalLookAndFeel.getControlDisabled());\r\n/* 212:242 */ g2.fillOval(0, 0, w, h);\r\n/* 213: */ }\r\n/* 214:244 */ g2.translate(-x, -y);\r\n/* 215: */ }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n kc.setChecked(false);\n }\n //do something else\n lbButton = true;\n\n }",
"public void toppingChecked(View view) {\n Log.d(\"Method\", \"toppingChecked()\");\n displayQuantity();\n }",
"public void toglecheckbox(CheckBox ch){\n\t if(ch.isChecked()){\n\t ch.setText(\"This is my business card\");\n\t isyourcard = \"yes\";\n\t }else{\n\t ch.setText(\"This is not my business card\");\n\t isyourcard = \"no\";\n\t }\n\t }",
"void onCheckedTriStateChanged(TriStateCheckBox triStateCheckBox, State state);",
"public void CheckIn(){\n if (isIn == false){\n isIn=true;\n// System.out.println(name + \" has been checked into the library.\");\n// }else\n// System.out.println(name + \" is not checked out.\");\n }\n }",
"private void drawCheck(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 97: */ {\r\n/* 98:140 */ g2.setColor(enabled ? UIManager.getColor(\"CheckBox.check\") : MetalLookAndFeel.getControlDisabled());\r\n/* 99: */ \r\n/* 100: */ \r\n/* 101:143 */ int right = x + width;\r\n/* 102:144 */ int bottom = y + height;\r\n/* 103:145 */ int startY = y + height / 3;\r\n/* 104:146 */ int turnX = x + width / 2 - 2;\r\n/* 105:147 */ g2.drawLine(x, startY, turnX, bottom - 3);\r\n/* 106:148 */ g2.drawLine(x, startY + 1, turnX, bottom - 2);\r\n/* 107:149 */ g2.drawLine(x, startY + 2, turnX, bottom - 1);\r\n/* 108:150 */ g2.drawLine(turnX + 1, bottom - 2, right, y);\r\n/* 109:151 */ g2.drawLine(turnX + 1, bottom - 1, right, y + 1);\r\n/* 110:152 */ g2.drawLine(turnX + 1, bottom, right, y + 2);\r\n/* 111: */ }",
"@Override\n\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\t\tif(checkedId == R.id.radio0){\n\t\t\t\t\ttipAfterTax=false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttipAfterTax=true;\n\t\t\t\t}\n\t\t\t\tupdateStandard();\n\t\t\t\tupdateCustom();\n\t\t\t}",
"private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservation.setText(\"Reservation\");\n\n //listener for 3 checkboxes\n deliver.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n pick_up.setSelected(false);\n reservation.setSelected(false);\n }\n });\n pick_up.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n reservation.setSelected(false);\n }\n });\n reservation.selectedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n deliver.setSelected(false);\n pick_up.setSelected(false);\n\n }\n });\n\n //add all\n checkbox.getChildren().addAll(deliver,pick_up,reservation);\n return checkbox;\n }",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n li.setChecked(false);\n }\n //do something else\n kgButton = true;\n }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\tHandheldAuthorization.getInstance().setWarningState(isChecked, TimeManager.getInstance().getMonth());\n\t}",
"@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif(isChecked){\r\n\t //update the status of checkbox to checked\r\n\t \r\n\t checkedItem.set(p, true);\r\n\t idList.set(p,id);\r\n\t item.set(p, friend);\r\n\t nameList.set(p, name);\r\n\t }else{\r\n\t //update the status of checkbox to unchecked\r\n\t checkedItem.set(p, false);\r\n\t idList.set(p,null);\r\n\t item.set(p, null);\r\n\t nameList.set(p, null);\r\n\t }\r\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\t\tboolean isChecked) {\n\t\t\t\t\tObject tag = check.getTag();\r\n\r\n\t\t\t\t\tif (isChecked) {\r\n\t\t\t\t\t\t// perform logic\r\n\t\t\t\t\t\tif (!(checkedpositions.contains(tag))) {\r\n\t\t\t\t\t\t\tcheckedpositions.add((Integer) tag);\r\n\t\t\t\t\t\t\tLog.d(\"Checkbox\", \"added \" + tag);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tcheckedpositions.remove(tag);\r\n\t\t\t\t\t\tLog.d(\"Checkbox\", \"removed \" + (Integer) tag);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"protected void do_chckbxOther_actionPerformed(ActionEvent arg0) {\n\t\tif(chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(true);\n\t\telse if(! chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(false);\n\t\t\t\n\t}",
"public T caseUbqCheckbox(UbqCheckbox object) {\r\n\t\treturn null;\r\n\t}",
"public I18nCheckbox() {\n super();\n }",
"public VirtualCheckBox createCheckBox ();",
"@Override\n protected void listenToUi(UiWatcher watcher) {\n Logger.debug(\"Listening to the checkbox\");\n watcher.listenTo(theCheckBox);\n }",
"@Override\n public void loadPanel () {\n\n // do we need these??\n out_top.load_selected_tab_panel();\n out_bottom.load_selected_tab_panel();\n\n // Q: should do setState on the checkboxes?\n // A: only if flags were changed programatically without doing that,,,,\n\n // old ways....\n //\n // switch (stall_model_type) {\n // case STALL_MODEL_IDEAL_FLOW: \n // bt3.setBackground(Color.yellow);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // break;\n // case STALL_MODEL_DFLT: \n // bt3.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // bt4_1.setBackground(Color.yellow);\n // break;\n // case STALL_MODEL_REFINED: \n // bt3.setBackground(Color.white);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.yellow);\n // break;\n // }\n // if (ar_lift_corr) {\n // bt6.setBackground(Color.white);\n // bt5.setBackground(Color.yellow);\n // } else {\n // bt5.setBackground(Color.white);\n // bt6.setBackground(Color.yellow);\n // }\n // if (induced_drag_on) {\n // bt8.setBackground(Color.white);\n // bt7.setBackground(Color.yellow);\n // } else {\n // bt7.setBackground(Color.white);\n // bt8.setBackground(Color.yellow);\n // }\n // if (re_corr) {\n // bt10.setBackground(Color.white);\n // bt9.setBackground(Color.yellow);\n // } else {\n // bt9.setBackground(Color.white);\n // bt10.setBackground(Color.yellow);\n // }\n // switch (bdragflag) {\n // case 1: \n // cbt1.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 2:\n // cbt2.setBackground(Color.yellow);\n // cbt1.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 3:\n // cbt3.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt1.setBackground(Color.white);\n // break;\n // }\n // if (stab_aoa_correction) \n // stab_bt_aoa.setBackground(Color.yellow);\n // else\n // stab_bt_aoa.setBackground(Color.white);\n\n // do nto do this, ause stack overflow\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n }",
"private void m16077d() {\n this.f13516e = (CheckBox) getInflater().inflate(C0633g.abc_list_menu_item_checkbox, this, false);\n addView(this.f13516e);\n }",
"@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked){\r\n\t\t\t\t\tsp.edit().putBoolean(\"theft\", true).commit();\r\n\t\t\t\t\tcb_set.setText(\"防盗保护开启\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsp.edit().putBoolean(\"theft\", false).commit();\r\n\t\t\t\t\tcb_set.setText(\"防盗保护没有开启\");\r\n\t\t\t\t}\r\n\t\t\t}",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.LED1:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED1 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED1 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED2:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED2 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED2 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED3:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED3 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED2 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED4:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED4 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED4 OFF\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n // TODO: Veggie sandwich\n }\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n orderFragment.orderListAdpater.setDishHold(true);\n } else {\n orderFragment.orderListAdpater.setDishHold(false);\n }\n }",
"private void addHandlersToCheckBox() {\n\t\tmyMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tallMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmyLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tallLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton button,\n boolean isChecked) {\n if (isChecked) {\n\n show_hide_password.setText(R.string.hide_pwd);// change\n // checkbox\n // text\n\n password.setInputType(InputType.TYPE_CLASS_TEXT);\n password.setTransformationMethod(HideReturnsTransformationMethod\n .getInstance());// show password\n } else {\n show_hide_password.setText(R.string.show_pwd);// change\n // checkbox\n // text\n\n password.setInputType(InputType.TYPE_CLASS_TEXT\n | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n password.setTransformationMethod(PasswordTransformationMethod\n .getInstance());// hide password\n\n }\n\n }",
"public CheckBoxWrapper(CheckBox element, boolean isObligatory, \n\t\t\tAsyncEventListener listener) {\n\t\tthis(element, isObligatory, listener, null);\n\t\t\n\t\t\n\t\tthis.localChecker = null;\n\t\t}",
"private void changedChoiceBox(){\n\t\thideLackUserPermissionsLabel();\n\t\thideShowCheckBoxes();\n\t}",
"public void CheckOut(){\n if (isIn == true){\n isIn = false;\n// System.out.println(name + \" has been checked out of the library.\");\n// }else\n// System.out.println(name + \" is already checked out.\");\n }\n }",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton pos, boolean isChecked) {\n\t\t\t\tif (isChecked) {\n\t\t\t\t\tif (!listCheckedData.contains(lists.get(posit))) {\n\t\t\t\t\t\tlistCheckedData.add(lists.get(posit));\n\t\t\t\t\t}\n\t\t\t\t\tisCheckedMap.put(posit, isChecked);\n\t\t\t\t} else {\n\t\t\t\t\tif (listCheckedData.contains(lists.get(posit))) {\n\t\t\t\t\t\tlistCheckedData.remove(lists.get(posit));\n\t\t\t\t\t}\n\t\t\t\t\tisCheckedMap.remove(posit);\n\t\t\t\t}\n\t\t\t}",
"private JCheckBox getJCheckBox1() {\r\n\t\tif (jCheckBox1 == null) {\r\n\t\t\tjCheckBox1 = new JCheckBox();\r\n\t\t\tjCheckBox1.setToolTipText(\"This brief description will be added to the biclustering results file\");\r\n\t\t\tjCheckBox1.setBounds(32, 316, 184, 24);\r\n\t\t\tjCheckBox1.setText(\"Add description line\");\r\n\t\t\tjCheckBox1.setEnabled(false);\r\n\t\t}\r\n\t\treturn jCheckBox1;\r\n\t}",
"@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tif(sw.isChecked())\n\t\t\t{\n\t\t\t\tpartybool=true;\n\t\t\t\tDnDlevel=2;\n\t\t\t\tToast.makeText(con,\"\"+DnDlevel+\" \"+partybool,Toast.LENGTH_LONG).show();\n\t\t\t\tsb.setProgress(100);\n\t\t\t}\n\t\t}",
"@Override\n public void onCheckStocksRaised() {\n if (coffeeStock <= 0) {\n coffeeButton.setEnabled(false);\n }\n if (espressoStock <= 0) {\n espressoButton.setEnabled(false);\n }\n if (teaStock <= 0) {\n teaButton.setEnabled(false);\n }\n if (soupStock <= 0) {\n soupButton.setEnabled(false);\n }\n if (icedTeaStock <= 0) {\n icedTeaButton.setEnabled(false);\n }\n if (syrupStock <= 0) {\n optionSugar.setEnabled(false);\n }\n if (vanillaStock <= 0) {\n optionIceCream.setEnabled(false);\n }\n if (milkStock <= 0) {\n optionMilk.setEnabled(false);\n }\n if (breadStock <= 0) {\n optionBread.setEnabled(false);\n }\n if (sugarStock <= 4) {\n sugarSlider.setMaximum(sugarStock);\n }\n }",
"private void onCheckBoxTeilungLinks()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}",
"public void acceptTerms(View view) {\n if(((CheckBox)view).isChecked()){\n register.setEnabled(true);\n }\n else\n register.setEnabled(false);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n gripeSim = new javax.swing.JCheckBox();\n gripeNao = new javax.swing.JCheckBox();\n jLabel2 = new javax.swing.JLabel();\n bebidaSim = new javax.swing.JCheckBox();\n bebidaNao = new javax.swing.JCheckBox();\n jLabel3 = new javax.swing.JLabel();\n tatuagemSim = new javax.swing.JCheckBox();\n tatuagemNao = new javax.swing.JCheckBox();\n jLabel4 = new javax.swing.JLabel();\n vacinaSim = new javax.swing.JCheckBox();\n vacinaNao = new javax.swing.JCheckBox();\n jLabel5 = new javax.swing.JLabel();\n herpesSim = new javax.swing.JCheckBox();\n herpesNao = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n faSim = new javax.swing.JCheckBox();\n faNao = new javax.swing.JCheckBox();\n jLabel7 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n concluir = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel1.setText(\"Teve resfriado na semana anterior a doação : \");\n\n gripeSim.setBackground(new java.awt.Color(255, 255, 255));\n gripeSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeSim.setText(\"Sim\");\n gripeSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeSimActionPerformed(evt);\n }\n });\n\n gripeNao.setBackground(new java.awt.Color(255, 255, 255));\n gripeNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n gripeNao.setText(\"Não\");\n gripeNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n gripeNaoActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel2.setText(\"Ingeriu bebida alcóolica nas últimas 12 horas :\");\n\n bebidaSim.setBackground(new java.awt.Color(255, 255, 255));\n bebidaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaSim.setText(\"Sim\");\n bebidaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaSimActionPerformed(evt);\n }\n });\n\n bebidaNao.setBackground(new java.awt.Color(255, 255, 255));\n bebidaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n bebidaNao.setText(\"Não\");\n bebidaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bebidaNaoActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel3.setText(\"Fez tatuagem permanente no último ano :\");\n\n tatuagemSim.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemSim.setText(\"Sim\");\n tatuagemSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemSimActionPerformed(evt);\n }\n });\n\n tatuagemNao.setBackground(new java.awt.Color(255, 255, 255));\n tatuagemNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n tatuagemNao.setText(\"Não\");\n tatuagemNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tatuagemNaoActionPerformed(evt);\n }\n });\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel4.setText(\"Tomou vacina para gripe nas últimas 48 horas :\");\n\n vacinaSim.setBackground(new java.awt.Color(255, 255, 255));\n vacinaSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaSim.setText(\"Sim\");\n vacinaSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaSimActionPerformed(evt);\n }\n });\n\n vacinaNao.setBackground(new java.awt.Color(255, 255, 255));\n vacinaNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n vacinaNao.setText(\"Não\");\n vacinaNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n vacinaNaoActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel5.setText(\"Possui herpes labial ou genital :\");\n\n herpesSim.setBackground(new java.awt.Color(255, 255, 255));\n herpesSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesSim.setText(\"Sim\");\n herpesSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesSimActionPerformed(evt);\n }\n });\n\n herpesNao.setBackground(new java.awt.Color(255, 255, 255));\n herpesNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n herpesNao.setText(\"Não\");\n herpesNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n herpesNaoActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel6.setText(\"Esteve atualmente em (AC AM AP RO RR MA MG PA TO) :\");\n\n faSim.setBackground(new java.awt.Color(255, 255, 255));\n faSim.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faSim.setText(\"Sim\");\n faSim.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faSimActionPerformed(evt);\n }\n });\n\n faNao.setBackground(new java.awt.Color(255, 255, 255));\n faNao.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n faNao.setText(\"Não\");\n faNao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n faNaoActionPerformed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Georgia\", 0, 18)); // NOI18N\n jLabel7.setText(\"Triagem\");\n\n concluir.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n concluir.setText(\"Concluir\");\n concluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n concluirActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(206, 206, 206))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(faSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(faNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(herpesSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(herpesNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(gripeSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(gripeNao))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(vacinaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(vacinaNao))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(tatuagemSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tatuagemNao))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(bebidaSim, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(bebidaNao))))\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(195, 195, 195))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7)\n .addGap(14, 14, 14)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(gripeSim)\n .addComponent(gripeNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(bebidaSim)\n .addComponent(bebidaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tatuagemSim)\n .addComponent(tatuagemNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(vacinaSim)\n .addComponent(vacinaNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(herpesSim)\n .addComponent(herpesNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(faSim)\n .addComponent(faNao))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(concluir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(17, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public void submitOrder(View view) {\n //display(2);\n int price = quantity*5;\n CheckBox WhippedCreamCheckBox = (CheckBox) findViewById(R.id.checkbox_view);\n CheckBox ChocalteToppingdCheckbox =(CheckBox) findViewById(R.id.checkboxviewChocalate);\n\n boolean has = WhippedCreamCheckBox.isChecked();\n boolean has2 = ChocalteToppingdCheckbox.isChecked();\n EditText name = (EditText) findViewById(R.id.name_edit_field);\n // String nametext = (String) name.getText();\n\n int totalPrice = getTotalPrice(has,has2);\n createOrederSummary(price,has,has2,name.getText().toString(),totalPrice);\n\n\n //String message=\"Thank You !!\\n\"+\"Your Total: $\"+price;\n //displayMessage(message);\n }",
"protected void setCheckedBoxes() {\n checkBoxIfInPreference(findViewById(R.id.concordiaShuttle));\n checkBoxIfInPreference(findViewById(R.id.elevators));\n checkBoxIfInPreference(findViewById(R.id.escalators));\n checkBoxIfInPreference(findViewById(R.id.stairs));\n checkBoxIfInPreference(findViewById(R.id.accessibilityInfo));\n checkBoxIfInPreference(findViewById(R.id.stepFreeTrips));\n }",
"public final void rule__Checkbox__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1931:1: ( ( 'checkbox' ) )\n // InternalBrowser.g:1932:1: ( 'checkbox' )\n {\n // InternalBrowser.g:1932:1: ( 'checkbox' )\n // InternalBrowser.g:1933:2: 'checkbox'\n {\n before(grammarAccess.getCheckboxAccess().getCheckboxKeyword_0()); \n match(input,28,FOLLOW_2); \n after(grammarAccess.getCheckboxAccess().getCheckboxKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Override\n public void onCheckedChanged(CompoundButton button,\n boolean isChecked) {\n if (isChecked) {\n show_hide_password.setText(R.string.hide_pwd);// change\n // checkbox\n // text\n password.setInputType(InputType.TYPE_CLASS_TEXT);\n password.setTransformationMethod(HideReturnsTransformationMethod\n .getInstance());// show password\n } else {\n show_hide_password.setText(R.string.show_pwd);// change\n // checkbox\n // text\n password.setInputType(InputType.TYPE_CLASS_TEXT\n | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n password.setTransformationMethod(PasswordTransformationMethod\n .getInstance());// hide password\n }\n }",
"public void onMonthlyCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n TextView send_btn = (TextView) findViewById(R.id.send_donation_text);\n\n int string_id = (checked)? R.string.huhi_ui_do_monthly : R.string.huhi_ui_send_tip;\n String btn_text = getResources().getString(string_id);\n send_btn.setText(btn_text);\n }",
"private void addCheckBoxes(VerticalPanel vpTest, boolean editable) {\r\n\t\tlabels = description.split(\";\");\r\n\t\tFlexTable ft = new FlexTable();\r\n\t\tif( editable ){\r\n\t\t\tfor( CheckBox cbOld : checkBoxes ){\r\n\t\t\t\tcbOld.removeFromParent();\r\n\t\t\t}\r\n\t\t\tft = ftEdit;\r\n\t\t}\r\n\t\tfinal CheckBoxElement thisFE = this;\r\n\t\tint columnCount = 3;\r\n\t\tint counter = 0;\r\n\t\tfor( String s : labels ){\r\n\t\t\tCheckBox cb = new CheckBox( s );\r\n\t\t cb.addClickListener(new ClickListener() {\r\n\t\t\t public void onClick(Widget sender) {\r\n\t\t\t \t CheckBox cb = (CheckBox)sender;\r\n\t\t\t \t boolean checked = cb.isChecked();\r\n\t\t\t \t if( checked ){\r\n\t\t\t \t\t thisFE.addSelectedCheckBox( cb );\r\n\t\t\t \t }\r\n\t\t\t \t else{\r\n\t\t\t \t\t thisFE.removeSelectedCheckBox(cb);\r\n\t\t\t \t }\r\n\t\t\t }\r\n\t\t\t });\r\n\t\t ft.setWidget( counter/columnCount, counter%columnCount, cb);\r\n\t\t counter++;\r\n\t\t\tif( editable ){\r\n\t\t\t\tcheckBoxes.add( cb );\r\n\t\t\t}\r\n\t\t}\r\n\t\tvpTest.add( ft );\r\n\t}",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.checkbox_termos:\n if (checked) {\n termosAceitos = true;\n }else {\n termosAceitos = false;\n }\n break;\n }\n }",
"@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tSystem.out.println(\"Entered in ckFun OnUnCheck\");\r\n\t\t\t\tchecAll(getFunTbl().getModel().getData(), false);\r\n\t\t\t\tgetFunTbl().updateUI();\r\n\t\t\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n mTarea.setEntregada(isChecked);\n }",
"@Override\n\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\tboolean isChecked) {\n\t\t\tif (isChecked) {\n\t\t\t\taddinfobt.setVisibility(View.VISIBLE);\n\t\t\t\tnameinfoinput.setVisibility(View.VISIBLE);\n\t\t\t\tinfolist.setVisibility(View.VISIBLE);\n\t\t\t} else {\n\t\t\t\taddinfobt.setVisibility(View.GONE);\n\t\t\t\tnameinfoinput.setVisibility(View.GONE);\n\t\t\t\tinfolist.setVisibility(View.GONE);\n\t\t\t}\n\t\t}",
"public void addCheckboxListener(final Cluster cluster) {\n final JCheckBox wi = allCheckboxes.get(cluster);\n wi.addItemListener(new ItemListener() {\n @Override\n public void itemStateChanged(final ItemEvent e) {\n final Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n final Set<Cluster> clusters =\n Tools.getConfigData().getClusters().getClusterSet();\n \n allCheckboxesListener(clusters, wi);\n }\n });\n thread.start();\n }\n \n });\n }",
"public final TCheckbox addCheckbox(final int x, final int y,\n final String label, final boolean checked) {\n\n return new TCheckbox(this, x, y, label, checked);\n }",
"private void createCheckboxComposite() {\n\t\t\n\t\tcheckboxComposite = new Composite(generalSettingsGroup, SWT.NONE);\n\t\tGridLayout gl_composite = new GridLayout(3, false);\n\t\tgl_composite.horizontalSpacing = 12;\n\t\tgl_composite.marginWidth = 0;\n\t\tcheckboxComposite.setLayout(gl_composite);\n\t\tcheckboxComposite.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 3, 1));\n\t\t\n\t\t//------------------------------------------------\n\t\t// sortResult Checkbox\n\t\t//------------------------------------------------\n\t\tsortResultCheckbox = new Button(checkboxComposite, SWT.CHECK);\n\t\tsortResultCheckbox.setText(\" sort Result\");\n\t\tsortResultCheckbox.setSelection(true);\n\t\t\n\t\tcontrolDecoration = new ControlDecoration(sortResultCheckbox, SWT.LEFT | SWT.TOP);\n\t\tcontrolDecoration.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tcontrolDecoration.setDescriptionText(\"If true, the rows will be sorted from A-Z by the\\n\"\n\t\t\t\t\t\t\t\t\t\t\t+ \"values in the specified identifier column. \");\n\n\t\t//------------------------------------------------\n\t\t// makeUnique Checkbox\n\t\t//------------------------------------------------\n\t\t\n\t\tmakeUniqueCheckbox = new Button(checkboxComposite, SWT.CHECK);\n\t\tmakeUniqueCheckbox.setText(\"make Identifiers unique\");\n\t\tmakeUniqueCheckbox.setSelection(true);\n\t\t\n\t\tmakeUniqueDeco = new ControlDecoration(makeUniqueCheckbox, SWT.LEFT | SWT.TOP);\n\t\tmakeUniqueDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tmakeUniqueDeco.setDescriptionText(\"If in one file two or more rows have the same identifying value,\\n\"\n\t\t\t\t\t\t\t\t\t\t\t + \"a number in braces like “[1]” is added to the values to make them unique.\");\n\t\t\n\t\t//------------------------------------------------\n\t\t// resultQuotes Checkbox\n\t\t//------------------------------------------------\n\t\tresultQuotesCheckbox = new Button(checkboxComposite, SWT.CHECK);\n\t\tresultQuotesCheckbox.setText(\"add Quotes\");\n\t\tresultQuotesCheckbox.setSelection(false);\n\t\t\n\t\tSWTGUIUtils.addInfoDeco(resultQuotesCheckbox, \n\t\t\t\t\"Adds quotes to the result.\", \n\t\t\t\tSWT.LEFT | SWT.TOP);\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {\n if(isChecked){\n //选中的情况下,将下一个布局显示为可改变\n Lnotification.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n initTimePicker(tv_notifyTime,\"Set Time\");\n pvTime.show();\n }\n });\n }else{\n //未选中\n Lnotification.setAlpha((float) 0.2);\n Lnotification.setOnClickListener(null); //只需如此设置,即可达到效果\n }\n }",
"private void butCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butCheckActionPerformed\n\n Borrower bor = createBorrower();\n String date = tfDate.getText();\n\n if (driver.dateFormatValid(date)) {\n //valid date format, perform check out/in\n if (radBorrow.isSelected()) {\n //check out\n\n Book book = createBook();//create book\n\n if (!book.isOnLoan()) {\n //book is not on loan, can be loaned out\n\n //perform loan, inform user of success\n if (bor.borrow(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" loaned successfully to \" + bor.getName());\n\n } else {\n driver.errorMessageNormal(\"Book could not be loaned\");\n }\n\n } else {\n //is on loan\n driver.errorMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is already on loan.\");\n\n }\n\n } else if (radReturn.isSelected()) {\n //check in / returning\n\n Book book = createBook();\n\n if (book.isOnLoan()) {\n //book is on loan, and can be returned\n\n if (bor.returnBook(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" has been returned.\");\n\n } else {\n driver.infoMessageNormal(\"The book could not be returned.\");\n }\n\n } else {\n //not on loan\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is not on loan.\");\n }\n\n } else {\n driver.errorMessageNormal(\"Please select whether the book is being checked in or being returned.\");\n }\n\n } else {\n //invalid format\n driver.errorMessageNormal(\"Please ensure the date is in the format DD/MM/YYY\");\n }\n\n\n }",
"private CheckBox createThingView(Thing thing) {\n CheckBox checkBox = new CheckBox(this);\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.topMargin = (int) (10 / getResources().getDisplayMetrics().density);\n checkBox.setLayoutParams(params);\n checkBox.setText(capitalize(thing.getThingName()));\n checkBox.setTag(thing);\n checkBox.setOnCheckedChangeListener(thingSelectListener);\n return checkBox;\n }",
"@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagLianxiren = !bFlagLianxiren;\r\n\t\t\t\t lianxiren_btn.setChecked(bFlagLianxiren);\r\n\t\t\t }",
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n \t \t\n \t \ttouched.isFinal = !touched.isFinal;\n \t \tinvalidate();\n \t \tpwindo.dismiss();\n \t }",
"@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tchecAll(getSchTbl().getModel().getData(), false);\r\n\t\t\t\tgetSchTbl().updateUI();\r\n\t\t\t}",
"@FXML\n protected void onCheckBoxSelect(){\n damping.setDisable(schwingungstyp.isSelected());\n dampingFunc.setDisable(schwingungstyp.isSelected());\n }",
"@Override\r\n\t\t\tpublic void OnUnCheck(Object o) {\n\t\t\t\tchecAll(getPackTbl().getModel().getData(), false);\r\n\t\t\t\tgetPackTbl().updateUI();\r\n\t\t\t}",
"public final void entryRuleCheckbox() throws RecognitionException {\n try {\n // InternalBrowser.g:479:1: ( ruleCheckbox EOF )\n // InternalBrowser.g:480:1: ruleCheckbox EOF\n {\n before(grammarAccess.getCheckboxRule()); \n pushFollow(FOLLOW_1);\n ruleCheckbox();\n\n state._fsp--;\n\n after(grammarAccess.getCheckboxRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateCheckboxField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the whether error message is getting displayed when the user doesnot marks Terms and conditions check box \"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.validateCheckboxTermsAndCnds(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}",
"private void enableComponents(boolean input){\n jButton11.setEnabled(input);\n jButton12.setEnabled(input);\n jButton13.setEnabled(input);\n jButton21.setEnabled(input);\n jButton22.setEnabled(input);\n jButton23.setEnabled(input);\n jButton31.setEnabled(input);\n jButton32.setEnabled(input);\n jButton33.setEnabled(input);\n jButton2.setEnabled(!input);\n jTextNome.setEditable(!input);\n }",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 7;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-7;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"private void enableCheckChange() {\n this.tree.addListener(Events.CheckChange, new GPCheckListener(visitorDisplay));\n }",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 5;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-5;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 5;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-5;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 5;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-5;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif(isChecked==true)\n\t\t\t\t{\n\t\t\t\t\tvlq=vlq + 5;\n\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t}else\n\t\t\t\t\tif(isChecked==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tvlq=vlq-5;\n\t\t\t\t\t\tvalue.setText(String.valueOf(vlq));\n\t\t\t\t\t}\n\t\t\t}",
"@NotifyChange({\"matkulKur\", \"addNew\", \"resetInputIcon\"}) \n @Command(\"batal\")\n public void batal(){\n if (isAddNew()==true) setMatkulKur(getTempMatkulKur()); //\n setResetInputIcon(false);\n setAddNew(false); //apapun itu buat supaya tambah baru selalu kondisi false\n }",
"public void ClickPrivacyPolicycheckbox(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Privacy Policy checkbox should be checked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"rdcheckoutprivacypolicy\"));\r\n\t\t\tSystem.out.println(\"Privacy Policy checkbox is checked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Privacy Policy checkbox is checked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Privacy Policy checkbox is not checked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"rdcheckoutprivacypolicy\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}",
"@Override\n protected void ignoreUi(UiWatcher watcher) {\n Logger.debug(\"Ignoring to the checkbox\");\n watcher.ignore(theCheckBox);\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n editor.putBoolean(\"changText\", true);\n } else {\n editor.putBoolean(\"changText\", false);\n }\n editor.commit();\n }",
"@Override\n public void payeeInputVisible(boolean yes) {\n\t\n }",
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (!isChecked) {\n // show password\n edtxt_password.setTransformationMethod(PasswordTransformationMethod.getInstance());\n } else {\n // hide password\n edtxt_password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());\n }\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked){\n createChange.getChangesByTypesList().add(finalRegularChange);\n }else createChange.getChangesByTypesList().remove(finalRegularChange);\n\n\n notifyDataSetChanged();\n\n if (context instanceof AddDishActivity){\n ((AddDishActivity) context).updateSum();\n }\n\n }",
"public void onCheckboxClicked(View view) {\n checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.checkBox2:\n if (checked)\n {\n email_confirmation.setChecked(false);\n email_notification.setChecked(false);\n emailPref = \"No\";\n\n }\n else\n {\n emailPref = \"Yes\";\n email_confirmation.setChecked(true);\n email_notification.setChecked(true);\n }\n break;\n\n }\n }",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.cb_cod:\n if (cb_cod.isChecked()) {\n cod = \"1\";\n } else {\n cod = \"0\";\n }\n\n\n break;\n }\n }",
"public I18nCheckbox(String text) {\n super(text);\n }",
"public I18nCheckbox(Action a) {\n super(a);\n }",
"private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(price.isEnabled()){\n price.setEnabled(false);\n \n }else{\n price.setEnabled(true);\n }\n \n ;\n // if(price.enabled(true))\n // {}\n \n \n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n \t if(item.isChecked()){\n item.setChecked(false);\n \t \t isHintOn = false;\n \t \t Toast.makeText(getApplicationContext(), \"Game Hint is OFF\", Toast.LENGTH_SHORT).show();\n \t \t }\n else{\n item.setChecked(true);\n \t isHintOn = true;\n \t Toast.makeText(getApplicationContext(), \"Game Hint is ON\", Toast.LENGTH_SHORT).show();\n }\n \t return true;\n }",
"@Override\r\n\t\t\tpublic void OnCkeck(Object o) {\n\t\t\t\tSystem.out.println(\"Entered in ckFun OnCheck\");\r\n\t\t\t\tchecAll(getFunTbl().getModel().getData(), true);\r\n\t\t\t\tgetFunTbl().updateUI();\r\n\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox_1.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox.setSelected(false);\r\n // disable the combox box drop down\r\n comboBox.setEnabled(false);\r\n // enable the textfield for the user input\r\n textField_3.setEnabled(true);\r\n textField_3.setText(\"\");\r\n // disable the refresh rooms button\r\n btnNewButton.setEnabled(false);\r\n }\r\n }",
"public final EObject ruleCheckBox() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_checkBox_1_0=null;\n\n enterRule(); \n \n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1884:28: ( (otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) ) ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1885:1: (otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) ) )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1885:1: (otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1885:3: otherlv_0= 'checkBox' ( (lv_checkBox_1_0= RULE_STRING ) )\n {\n otherlv_0=(Token)match(input,45,FOLLOW_45_in_ruleCheckBox3752); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getCheckBoxAccess().getCheckBoxKeyword_0());\n \n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1889:1: ( (lv_checkBox_1_0= RULE_STRING ) )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1890:1: (lv_checkBox_1_0= RULE_STRING )\n {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1890:1: (lv_checkBox_1_0= RULE_STRING )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1891:3: lv_checkBox_1_0= RULE_STRING\n {\n lv_checkBox_1_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleCheckBox3769); \n\n \t\t\tnewLeafNode(lv_checkBox_1_0, grammarAccess.getCheckBoxAccess().getCheckBoxSTRINGTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getCheckBoxRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"checkBox\",\n \t\tlv_checkBox_1_0, \n \t\t\"STRING\");\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox_1.setSelected(false);\r\n // enable the combox box drop down\r\n comboBox.setEnabled(true);\r\n // disable the textfield for the user input\r\n textField_3.setEnabled(false);\r\n textField_3.setText(\"\");\r\n // enable the refresh rooms button\r\n btnNewButton.setEnabled(true);\r\n }\r\n }",
"public void ckbxChanged(CheckBox box,JFXTextField field){\n if(box.isSelected()){\n //unblur and set editable\n unblur(field);\n field.setEditable(true);\n }else{\n //blur and make uneditable\n blur(field);\n field.setEditable(false);\n }\n }"
] |
[
"0.69017124",
"0.5712063",
"0.534321",
"0.5234169",
"0.52203333",
"0.5189626",
"0.51657325",
"0.51636255",
"0.510627",
"0.5104965",
"0.5087519",
"0.5059027",
"0.5015615",
"0.5013338",
"0.50106233",
"0.50086224",
"0.49932167",
"0.49789876",
"0.49410373",
"0.49404678",
"0.4939656",
"0.4934179",
"0.4919081",
"0.4908715",
"0.4898587",
"0.48897198",
"0.4875953",
"0.4860398",
"0.48403075",
"0.48271587",
"0.48088884",
"0.47992027",
"0.479698",
"0.4781922",
"0.47766656",
"0.47752917",
"0.4771324",
"0.47640178",
"0.4763324",
"0.47570986",
"0.47517067",
"0.4749954",
"0.47393125",
"0.4738762",
"0.4736278",
"0.47279188",
"0.4727124",
"0.47253942",
"0.47249135",
"0.47245902",
"0.47241062",
"0.47099572",
"0.47090748",
"0.47087985",
"0.4705082",
"0.46936268",
"0.46861437",
"0.46850008",
"0.4683057",
"0.4680488",
"0.4671963",
"0.46687227",
"0.46587694",
"0.4653479",
"0.4650589",
"0.46462667",
"0.4640365",
"0.46377486",
"0.46371305",
"0.46302012",
"0.46177152",
"0.46109304",
"0.46082735",
"0.4607966",
"0.46041256",
"0.4596823",
"0.45941815",
"0.45925888",
"0.45811376",
"0.45811376",
"0.45811376",
"0.45811376",
"0.4574346",
"0.4563519",
"0.45606142",
"0.45605037",
"0.45572227",
"0.45571336",
"0.45509595",
"0.4543238",
"0.45400268",
"0.45379487",
"0.45362985",
"0.45353675",
"0.45315415",
"0.45308176",
"0.4526245",
"0.4526091",
"0.45211676",
"0.4514402"
] |
0.767928
|
0
|
/ setUpLoanBtn sets the onClickListener for the "Calculate loan" button, which calls onCalcLoanBtnClicked().
|
private void setUpLoanBtn() {
if (findViewById(R.id.btn_calculate_loan) != null)
{
/* This is the "Calculate loan" button. Its functionality is to update the table values
* below it.
*/
Button calcLoanBtn = (Button) findViewById(R.id.btn_calculate_loan);
calcLoanBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onCalcLoanBtnClicked();
}
});
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}",
"private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }",
"public void calculateLoan(View view){\n Intent intent = new Intent(this, ResultActivity.class);\n\n //TODO: calculate monthly payment and determine\n double carPrice;\n double downPayment;\n double loadPeriod;\n double interestRate;\n\n \n\n //loan application status; approve or reject\n double monthlyPayment;\n String status;\n\n //Passing data using putExtra method\n //putExtra(TAG, value)\n intent.putExtra(MONTHLY_PAYMENT, monthlyPayment);\n intent.putExtra(LOAN_STATUS, status);\n startActivity(intent);\n }",
"private void onCalcLoanBtnClicked()\r\n {\r\n /* Here I declare the values that are to be passed into the public calculation methods of this\r\n * class (calculateMonths, monthlyPaymentFinishInYear), and if they are not filled in (or are\r\n * null) they become zero.\r\n */\r\n Log.d(TAG, \"Calculate loan button clicked\");\r\n double princ;\r\n double interest;\r\n double payment;\r\n\r\n if (findViewById(R.id.edit_loan_balance) != null) {\r\n EditText editPrincipal = (EditText)findViewById(R.id.edit_loan_balance);\r\n if (\"\".equals(editPrincipal.getText().toString()))\r\n {\r\n Log.d(TAG, \"Defaulting principal amount to zero because empty field\");\r\n princ = 0.0;\r\n }\r\n else\r\n {\r\n Log.d(TAG, \"Setting principal amount to possibly non-zero value\");\r\n princ = Double.valueOf(editPrincipal.getText().toString());\r\n }\r\n }\r\n else {\r\n Log.d(TAG, \"Defaulting principal amount to zero because null EditText\");\r\n princ = 0.0;\r\n }\r\n\r\n if (findViewById(R.id.edit_loan_interest) != null) {\r\n EditText editInterest = (EditText)findViewById(R.id.edit_loan_interest);\r\n if (\"\".equals(editInterest.getText().toString()))\r\n {\r\n Log.d(TAG, \"Defaulting interest amount to zero because empty field\");\r\n interest = 0.0;\r\n }\r\n else\r\n {\r\n Log.d(TAG, \"Setting interest amount to possibly non-zero value\");\r\n interest = Double.valueOf(editInterest.getText().toString());\r\n }\r\n }\r\n else {\r\n Log.d(TAG, \"Defaulting interest amount to zero because null EditText\");\r\n interest = 0.0;\r\n }\r\n\r\n if (findViewById(R.id.edit_amount) != null) {\r\n EditText editAmt = (EditText)findViewById(R.id.edit_amount);\r\n if (\"\".equals(editAmt.getText().toString()))\r\n {\r\n Log.d(TAG, \"Defaulting payment amount to zero because empty field\");\r\n payment = 0.0;\r\n }\r\n else\r\n {\r\n Log.d(TAG, \"Setting payment amount to possibly non-zero value\");\r\n payment = Double.valueOf(editAmt.getText().toString());\r\n }\r\n }\r\n else {\r\n Log.d(TAG, \"Defaulting payment amount to zero because null EditText\");\r\n payment = 0.0;\r\n }\r\n\r\n if (findViewById(R.id.txt_loan_how_many_months_value) != null)\r\n {\r\n TextView howManyMonths = findViewById(R.id.txt_loan_how_many_months_value);\r\n howManyMonths.setText(calculateMonths(princ, interest, payment));\r\n }\r\n\r\n if (findViewById(R.id.txt_loan_min_payment_year_value) != null)\r\n {\r\n TextView minPayment = findViewById(R.id.txt_loan_min_payment_year_value);\r\n minPayment.setText(monthlyPaymentFinishInYear(princ, interest));\r\n }\r\n }",
"@FXML\r\n\tprivate void btnCalcLoan(ActionEvent event) {\r\n\r\n\t\tSystem.out.println(\"Amount: \" + LoanAmount.getText());\r\n\t\tdouble dLoanAmount = Double.parseDouble(LoanAmount.getText());\r\n\t\tSystem.out.println(\"Amount: \" + dLoanAmount);\t\r\n\t\t\r\n\t\tlblTotalPayemnts.setText(\"123\");\r\n\t\t\r\n\t\tLocalDate localDate = PaymentStartDate.getValue();\r\n\t\tSystem.out.println(localDate);\r\n\t\t\r\n\t\tdouble dInterestRate = Double.parseDouble(InterestRate.getText());\r\n\t\tSystem.out.println(\"Interest Rate: \" + dInterestRate);\r\n\t\t\r\n\t\tint dNbrOfYears = Integer.parseInt(NbrOfYears.getText());\r\n\t\tSystem.out.println(\"Number of Years: \" + dNbrOfYears);\r\n\t\t\r\n\t\tdouble dAdditionalPayment = Double.parseDouble(AdditionalPayment.getText());\r\n\t\t\r\n\t\t\r\n\t\tLoan dLoan = new Loan(dLoanAmount,dInterestRate,dNbrOfYears,dAdditionalPayment,localDate,false,0);\r\n\t\t\r\n\t\tdouble totalInterest = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < dLoan.LoanPayments.size();i++) {\r\n\t\t\tPayment payment = dLoan.LoanPayments.get(i);\r\n\t\t\tloanTable.getItems().add((payment.getPaymentID(),payment.getDueDate(),dAdditionalPayment,payment.getIMPT(),\r\n\t\t\t\t\tpayment.getPPMT(),payment.getTotalPrinciple());\r\n\t\t\ttotalInterest += payment.getIMPT();\r\n\t\t}\r\n\t\t\r\n\t\tTotalPayments.setText(String.valueOf(dLoan.LoanPayments.size()));\r\n\t\tTotalInterest.setText(String.valueOf(totalInterest));\r\n\t\t\r\n\t}",
"private void addLoanRequestFunction() {\n\t\tloanRequestButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGUILoanRequest loan = new GUILoanRequest();\n\t\t\t\tcloseFrame();\n\t\t\t}\t\t\n\t\t});\n\t}",
"private void CalculateJButtonActionPerformed(java.awt.event.ActionEvent evt) { \n // read the inputs and calculate payment of loan\n //constants for max values, and number of comoundings per year\n final double MAX_AMOUNT = 100000000;\n final double MAX_INTEREST_RATE = 100;\n final int COUMPOUNDINGS = 12;\n final double MAX_YEARS = 50;\n final double PERIOD_INTEREST = COUMPOUNDINGS * 100;\n String errorMessage = \"Please enter a positive number for all required fields\"\n + \"\\nLoan amount must be in reange (0, \" + MAX_AMOUNT + \"]\"\n + \"\\nInterest rate must be in range [0, \" + MAX_INTEREST_RATE + \"]\"\n + \"\\nYears must be in range [0, \" + MAX_INTEREST_RATE + \"]\";\n \n counter++;\n CounterJTextField.setText(String.valueOf(counter));\n \n //get inputs\n double amount = Double.parseDouble(PrincipalJTextField.getText());\n double rate = Double.parseDouble(RateJTextField.getText());\n double years = Double.parseDouble(YearsJTextField.getText());\n \n //calculate paymets using formula\n double payment = (amount * rate/PERIOD_INTEREST)/\n (1 - Math.pow((1 + rate/PERIOD_INTEREST),\n years * (-COUMPOUNDINGS)));\n double interest = years * COUMPOUNDINGS * payment - amount;\n \n //displays results\n DecimalFormat dollars = new DecimalFormat(\"$#,##0.00\");\n\n PaymentJTextField.setText(dollars.format(payment));\n InterestJTextField.setText(dollars.format(interest));\n \n }",
"public void setLoan(int loan) {\n\t\tthis.loan = loan;\n\t}",
"private void loanChkBoxTicked(boolean isLoan)\r\n {\r\n if (isLoan)\r\n {\r\n // https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/\r\n LinearLayout loanItems;\r\n\r\n LayoutInflater layoutInflater = getLayoutInflater();\r\n\r\n loanItems = (LinearLayout) layoutInflater.inflate(\r\n R.layout.content_basic_financial_loan_view, null);\r\n this.loanLinParent.addView(loanItems);\r\n setUpLoanBtn();\r\n\r\n // This makes it so that pressing the enter button from the interest rate field calculates\r\n // the loan.\r\n EditText interest = (EditText) findViewById(R.id.edit_loan_interest);\r\n interest.setOnKeyListener(new View.OnKeyListener() {\r\n @Override\r\n public boolean onKey(View view, int i, KeyEvent keyEvent) {\r\n if ((keyEvent.getAction() == KeyEvent.ACTION_UP) &&\r\n ((i == KeyEvent.KEYCODE_ENTER) || (i == KeyEvent.KEYCODE_NUMPAD_ENTER)))\r\n {\r\n onCalcLoanBtnClicked();\r\n return true;\r\n }\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n else\r\n {\r\n Log.d(TAG, \"Attempting to remove the loan items!\");\r\n /* If the layout that holds the loan is not in view, this does not get used (to avoid null\r\n * reference calls).\r\n */\r\n if (!(this.loanLinParent == null) && !(findViewById(R.id.lin_loan_main) == null))\r\n {\r\n this.moneyOutLinParent.removeView(findViewById(R.id.lin_loan_main));\r\n Log.d(TAG, \"Success!\");\r\n addLoanChkBox(true);\r\n }\r\n }\r\n }",
"public LoanCalculator() {\n initComponents();\n this.setLocationRelativeTo(null); //centers form\n this.getRootPane().setDefaultButton(CalculateJButton);\n \n // set icon for form\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(\"\\\\\\\\zeus\\\\profile$\\\\955331307\\\\my documents\\\\CS 141\\\\Lab 2\\\\Lab 2 -- Loan Calculator\\\\eclipse.png\"));\n PrincipalJTextField.requestFocus();\n setDate();\n }",
"@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}",
"@Override\n public void onClick(View view) {\n double loan = Double.parseDouble(binding.loanAmount.getText().toString());\n\n // get tenure amount from the textView and convert it to double\n double tenure = Double.parseDouble(binding.loanTenure.getText().toString());\n\n // get interest amount from the textView and convert it to double, then divide it by 12 to get the interest per month\n double interest = Double.parseDouble(binding.interestRate.getText().toString()) / 12.0;\n\n // variable to hold the (1-i)^n value\n double i = Math.pow((1.0 + interest / 100.0), (tenure * 12.0));\n // equation to calculate EMI (equated monthly installments)\n double emi = loan * (interest/100.0) * i / ( i - 1 );\n\n // after calculated EMI, set it to the textView in the interface\n binding.monthlyPayment.setText(\"$\" + String.format(\"%.2f\", emi));\n }",
"public void setLoanAmount(double loanAmount) {\n this.loanAmount = loanAmount;\n }",
"@Test\n public void testHomeLoanCalculator() {\n LoanTerms loanTerms = new LoanTerms(10, 50000, LoanType.ING, 28, 1000, 8000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$2,771.81\"));\n }",
"public SHrsLoan(SDbLoan loan) {\n moLoan = loan;\n maPayrollReceiptEarnings = new ArrayList<>();\n maPayrollReceiptDeductions = new ArrayList<>();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n Button homeAndAuto = (Button) findViewById(R.id.home_auto);\n homeAndAuto.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, LoanCalculator.class));\n finish();\n }\n });\n\n Button rothIRA = (Button) findViewById(R.id.rothIRA);\n rothIRA.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, RothIRAInvestment.class));\n finish();\n }\n });\n\n\n }",
"@Test\n public void testDecimalAutoLoan() {\n LoanTerms loanTerms = new LoanTerms(30, 500000, LoanType.SCB, 40, 3000, 21000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$466.15\"));\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n primaryStage.setTitle(\"Loan Calculator\");\n primaryStage.setOnCloseRequest(e -> {\n e.consume();\n closeProgram(primaryStage);\n });\n\n //Border Pane (Main Pane)\n BorderPane mainPane = new BorderPane();\n\n //Initialize basic UI\n initUI(mainPane);\n\n //Center grid pane\n GridPane centerGrid = new GridPane();\n centerGrid.setPadding(new Insets(70, 10, 10, 10));\n centerGrid.setVgap(65);\n centerGrid.setHgap(5);\n centerGrid.setStyle(\"-fx-background-color: BEIGE\");\n\n //Defining text fields and labels for loan amount, loan term and interest rate\n TextField loanAmountField = new TextField();\n loanAmountField.setPromptText(\"Enter the loan amount\");\n GridPane.setConstraints(loanAmountField, 0, 0);\n Label loanAmountLabel = new Label(\"€\");\n GridPane.setConstraints(loanAmountLabel, 1, 0);\n\n TextField interestRateField = new TextField();\n interestRateField.setPromptText(\"Enter interest rate\");\n GridPane.setConstraints(interestRateField, 0, 2);\n Label interestRateLabel = new Label(\"%\");\n GridPane.setConstraints(interestRateLabel, 1, 2);\n\n TextField loanTermYearsField = new TextField();\n loanTermYearsField.setPromptText(\"Enter Years\");\n GridPane.setConstraints(loanTermYearsField, 0, 1);\n TextField loanTermMonthsField = new TextField();\n loanTermMonthsField.setPromptText(\"Enter Months\");\n GridPane.setConstraints(loanTermMonthsField, 1, 1);\n\n centerGrid.getChildren().addAll(loanAmountField, interestRateField, loanTermYearsField, loanTermMonthsField, loanAmountLabel, interestRateLabel);\n\n //Defining Loan type choice box\n ChoiceBox<String> loanTypeBox = new ChoiceBox<>();\n loanTypeBox.getItems().addAll(\"Annuity\", \"Linear\");\n loanTypeBox.setValue(\"Annuity\");\n GridPane.setConstraints(loanTypeBox, 0, 3);\n centerGrid.getChildren().add(loanTypeBox);\n\n //Defining action buttons\n Button showGraph = new Button(\"Show Graph\");\n showGraph.setMinSize(100, 50);\n Button saveFile = new Button(\"Save to File\");\n saveFile.setMinSize(100, 50);\n Button showTable = new Button(\"Show Table\");\n showTable.setMinSize(100, 50);\n\n //Bottom HBox\n HBox bottomLayout = new HBox(20);\n bottomLayout.getChildren().addAll(showTable, showGraph, saveFile);\n bottomLayout.setStyle(\"-fx-background-color: #8c8c7b;\");\n bottomLayout.setPadding(new Insets(50,60,50,50));\n bottomLayout.setAlignment(Pos.CENTER_RIGHT);\n\n //Handling Graph Button press\n showGraph.setOnAction(e -> {\n if(userData.validateInput(loanAmountField, loanTermYearsField, loanTermMonthsField, interestRateField)) {\n userData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, loanTypeBox.getValue(), interestRateField);\n userData.calculateLoan();\n if(userData.getLoanType().equals(\"Annuity\"))\n loanChart.display(\"Annuity Chart\", \"Annuity Loan Chart\", userData, new BorderPane());\n else\n loanChart.display(\"Linear Chart\", \"Linear Loan Chart\", userData, new BorderPane());\n }\n });\n\n //Handling save file button press\n final String[] loanStatement = new String[1];\n\n saveFile.setOnAction(e -> {\n if(userData.validateInput(loanAmountField, loanTermYearsField, loanTermMonthsField, interestRateField)) {\n userData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, loanTypeBox.getValue(), interestRateField);\n userData.calculateLoan();\n if(loanTypeBox.getValue() == \"Annuity\")\n otherUserData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, \"Linear\", interestRateField);\n else\n otherUserData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, \"Annuity\", interestRateField);\n\n otherUserData.calculateLoan();\n\n String loanStatementStart = new String();\n\n for(int i = 0; i < userData.getLoanTermTotal(); i++)\n loanStatementStart = loanStatementStart.concat(userData.getMonthNumber()[i] + \" \" + Math.round(userData.getMonthlyPayment()[i] * 100) / 100.0 + \" \" +\n Math.round(userData.getMonthlyContribution()[i] * 100) / 100.0 + \" \" + Math.round(userData.getMonthlyInterest()[i] * 100) / 100.0 + \" \" +\n Math.round(userData.getLoanLeft()[i] * 100) / 100.0 + \"\\n\");\n\n loanStatement[0] = \"Loan amount: \" + userData.getLoanAmount() + \" Total loan term: \" + userData.getLoanTermTotal() + \" Interest rate: \" + userData.getInterestRate() * 12 * 100 + \" \\n\" + userData.getLoanType()\n + \" total paid amount: \" + Math.round(userData.getTotalPaid() * 100) / 100.0 + \"| Total Interest paid: \" + Math.round(userData.getTotalInterestPaid() * 100) / 100.0 + \"\\n\"\n + otherUserData.getLoanType() + \" total paid amount: \" + Math.round(otherUserData.getTotalPaid() * 100) / 100.0 + \"| Total Interest paid: \" + Math.round(otherUserData.getTotalInterestPaid() * 100) / 100.0 + \"\\n\"\n + \"Difference in total paid:\" + ((userData.getTotalPaid() > otherUserData.getTotalPaid()) ? Math.round((userData.getTotalPaid() - otherUserData.getTotalPaid()) * 100) / 100.0 : Math.round((otherUserData.getTotalPaid() - userData.getTotalPaid()) * 100) / 100.0 )\n + \"\\n\\n|Month| \" + \"|Monthly Payment| \" + \"|Monthly Contribution| \" + \"|Monthly Interest| \" + \"|Left to pay| \\n\\n\" + loanStatementStart;\n\n FileChooser fileChooser = new FileChooser();\n\n FileChooser.ExtensionFilter extensionFilter = new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n fileChooser.getExtensionFilters().add(extensionFilter);\n\n //Show dialog\n File file = fileChooser.showSaveDialog(primaryStage);\n\n if (file != null) {\n saveTextToFile(loanStatement[0], file);\n }\n }\n });\n\n //Handling Show Table button press\n showTable.setOnAction(e ->{\n if(userData.validateInput(loanAmountField, loanTermYearsField, loanTermMonthsField, interestRateField)) {\n userData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, loanTypeBox.getValue(), interestRateField);\n userData.calculateLoan();\n if(userData.getLoanType().equals(\"Annuity\")) {\n new LoanTable();\n loanTable.display(\"Annuity Table\", \"Annuity Loan Table\", userData, new BorderPane());\n }\n else {\n new LoanTable();\n loanTable.display(\"Linear Table\", \"Linear Loan Table\", userData, new BorderPane());\n }\n }\n });\n\n //Set up main Border Pane\n mainPane.setCenter(centerGrid);\n mainPane.setBottom(bottomLayout);\n\n Scene primaryScene = new Scene(mainPane, 600, 800);\n\n primaryStage.setScene(primaryScene);\n primaryStage.show();\n }",
"public void setCurrentLoan(Loan currentLoan) {\n\t\tthis.currentLoan = currentLoan;\n\t}",
"public Loan(){\n\t\tthis(\"\", 0, 0, 0, 0);\n\t\tstart_date = null;\n\t}",
"public Loan(int loanId, Book bOoK, Member mEmBeR, Date dueDate) { ////changed 'BoOk' to 'book' and changed 'MeMbEr' to 'member' and DuE_dAtE to dueDate\r\n\t\tthis.LoAn_Id = loanId; //changed 'LoAn_Id' to 'loanId'\r\n\t\tthis.BoOk = book; //changed 'BoOk' to 'book'\r\n\t\tthis.MeMbEr = member; //changed 'MeMbEr' to 'member'\r\n\t\tthis.DaTe = dueDate; //changed DuE_dAtE to dueDate\r\n\t\tthis.state = loanState.current; //changed 'StAtE' to 'state' and lOaN_sTaTe.CURRENT to loanState.current\r\n\r\n\t}",
"public Loan(double annualInterestRate, int numberOfYears, double loanAmount)\n {\n setAnnualInterestRate(annualInterestRate);\n setNumberOfYears(numberOfYears);\n setLoanAmount(loanAmount);\n loanDate = new Date();\n }",
"public LoanCalculatorTest(LoanPayoutSummary results, LoanPayoutSummary expectedResults) {\n this.results = results;\n this.expectedResults = expectedResults;\n }",
"public FinanceEventListener(Loan loan){\n super();\n this.loan = loan;\n }",
"public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {\n this.annualInterestRate = annualInterestRate;\n this.numberOfYears = numberOfYears;\n this.loanAmount = loanAmount;\n loanDate = new java.util.Date();\n }",
"private void addLoanChkBox(boolean isBill)\r\n {\r\n if (isBill)\r\n {\r\n // Here is where I assign the layout that loanLinParent actually points to.\r\n this.loanLinParent = (LinearLayout) findViewById(R.id.lin_loan_main);\r\n\r\n // https://www.bignerdranch.com/blog/understanding-androids-layoutinflater-inflate/\r\n // This is a LayoutInflater instance. It is what I am using to add views to the layout.\r\n LayoutInflater layoutInflater = getLayoutInflater();\r\n\r\n /* I set the parent to null because I use the addView method of LinearLayouts below this.\r\n * I am using the index such that the loan layout will be placed second-to-last in the main\r\n * view (just above the \"add transaction\" button).\r\n */\r\n this.loanLinParent = (LinearLayout) layoutInflater.inflate(\r\n R.layout.content_basic_financial_loan_checkbox, null);\r\n this.moneyOutLinParent.addView(this.loanLinParent,\r\n this.moneyOutLinParent.getChildCount() - 1);\r\n\r\n // Here is where I assign which checkbox loanChkBox actually refers to.\r\n this.loanChkBox = (CheckBox) findViewById(R.id.chk_loan);\r\n // Here is where I set up loanChkBox's functionality\r\n this.loanChkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\r\n @Override\r\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\r\n Log.d(TAG, \"Loan? \" + String.valueOf(b));\r\n loanChkBoxTicked(b);\r\n }\r\n });\r\n }\r\n\r\n else\r\n {\r\n Log.d(TAG, \"Attempting to remove the loan checkbox!\");\r\n /* If the layout that holds the loan is not in view, this does not get used (to avoid null\r\n * reference calls).\r\n */\r\n if (!(this.loanLinParent == null))\r\n {\r\n this.moneyOutLinParent.removeView((View) this.loanLinParent);\r\n Log.d(TAG, \"Success!\");\r\n }\r\n }\r\n }",
"public abstract double calculateLoanPayment(double principalAmount, double annualPrimeIntRate, int monthsAmort);",
"private void setUpUI(View view) {\n etMobileNumberZestmoney = view.findViewById(R.id.etZestmoneyMobileNumber);\n Button mBtnCheckEligibility = view.findViewById(R.id.btnCheckElibility);\n mTvEligibilityMessage = view.findViewById(R.id.tvEligibilityMessage);\n mBtnCheckEligibility.setOnClickListener(this);\n }",
"private int adjustLoan(PreparedStatement updateLoan, int loanNumber, float adjustedLoanAmount) throws SQLException {\n updateLoan.setFloat(1, adjustedLoanAmount);\n updateLoan.setInt(2, loanNumber);\n return updateLoan.executeUpdate(); // TODO: call to executeUpdate on a PreparedStatement\n }",
"@Override\n public void onClick(View v) {\n switch (goalRadioGroup.getCheckedRadioButtonId()) {\n case R.id.lose_weight_radio_button:\n goalSign = -1;\n break;\n case R.id.maintain_weight_radio_button:\n goalSign = 0;\n break;\n case R.id.gain_weight_radio_button:\n goalSign = 1;\n break;\n }\n /* Check which Goal Speed radio button was clicked and set amount of calories to\n add or gain */\n switch (goalSpeedRadioGroup.getCheckedRadioButtonId()) {\n case R.id.aggressive_radio_button:\n additionalGoalCalories = 500;\n break;\n case R.id.suggested_radio_button:\n additionalGoalCalories = 250;\n break;\n case R.id.slowly_radio_button:\n additionalGoalCalories = 100;\n break;\n }\n // Calculate calories to meet user's goal based on their stats and display the amount\n calculateGoalCalories(tdee, goalSign, additionalGoalCalories);\n goalCaloriesTextView.setText(String.valueOf(goalCalories));\n }",
"private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }",
"public void setLoanAmount(double loanAmount)\n {\n if (loanAmount <= 0)\n {\n throw new IllegalArgumentException(\"The loan amount has to be greater than 0.\");\n }\n\n this.loanAmount = loanAmount;\n }",
"private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }",
"public void getMonthlyPayment(View view) {\n //Get all the EditText ids\n EditText principal = findViewById(R.id.principal);\n EditText interestRate = findViewById(R.id.interestRate);\n EditText loanTerm = findViewById(R.id.loanTerm);\n\n //Get the values for principal, MIR and the term of the loan\n double p = Double.parseDouble(principal.getText().toString());\n double r = Double.parseDouble(interestRate.getText().toString());\n double n = Double.parseDouble(loanTerm.getText().toString());\n\n\n //Calculate the monthly payment and round the number to 2 decimal points\n TextView display = findViewById(R.id.display);\n double monthlyPayment;\n DecimalFormat df = new DecimalFormat(\"#.##\");\n monthlyPayment = (p*r/1200.0)/(1-Math.pow((1.0+r/1200.0),(-12*n)));\n\n //Display the number in TextView\n display.setText(String.valueOf(df.format(monthlyPayment)));\n\n\n }",
"public Loan() {\n this(2.5, 1, 1000);\n }",
"public void saveLoan (Loan loan) throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\t\n\t\ttry{\n\t\t\tString query = \"INSERT INTO loan (client_id, principal_amount, interest_rate, no_years, no_payments_yearly, start_date)\"\n\t\t\t\t\t\t+ \" VALUES ('\"+this.client_id+\"', \"+this.principal_amount+\", \"+this.interest_rate+\", \"+this.no_years+\", \"\n\t\t\t\t\t\t\t\t+ \"\"+this.no_payments_yearly+\", '\"+this.start_date+\"')\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tstat.execute(query);\n\t\t\t\n\t\t\t// Deposit the money in the client's account\n\t\t\tClient client = Client.getClient(client_id);\n\t\t\tClient.deposit(client, principal_amount);\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}",
"public static void editLoanCost() {\n //We can only edit loan cost on Videos.\n char[] type = {'v'};\n String oldID = getExistingID(\"Video\", type);\n\n //Validate ID\n if (oldID != null) {\n //Run input validation\n String[] choiceOptions = {\"4\", \"6\"};\n int newLoan = Integer.parseInt(receiveStringInput(\"Enter new Loan Fee:\", choiceOptions, true, 1));\n try {\n //Replace the loan fee\n inv.replaceLoan(oldID, newLoan);\n } catch (IncorrectDetailsException e) {\n System.out.println(Utilities.ERROR_MESSAGE + \" Adding failed due to \" + e + \" with error message: \\n\" + e.getMessage());\n }\n } else System.out.println(Utilities.INFORMATION_MESSAGE + \"Incorrect ID, nothing was changed.\");\n }",
"public Loan(int loanId, book book, member member, Date dueDate) { // class name should be start with upper case.\r\n\t\tthis.id = loanId; //chage from ID to id,naming convention\r\n\t\tthis.b = book;\t//chage from B to b,naming convention\r\n\t\tthis.m = member; //chage from M to m,naming convention\r\n\t\tthis.d = dueDate; //chage from D to d,naming convention\r\n\t\tthis.state = LoanState.CURRENT;\t//Changes from LOAN_STATE to LoanState, enum naming convention\r\n\t}",
"private void setonclickListener() {\n\n\t\ttry {\n\n\t\t\t// rf_booking_loyalty_pts_value_\n\t\t\t// .addTextChangedListener(new TextWatcher() {\n\t\t\t//\n\t\t\t// @Override\n\t\t\t// public void onTextChanged(CharSequence s, int start,\n\t\t\t// int before, int count) {\n\t\t\t// // TODO Auto-generated method stub\n\t\t\t//\n\t\t\t// System.out.println(\"!!!!!!!!!!!!!!!!!!!Shikha\");\n\t\t\t//\n\t\t\t// try {\n\t\t\t// if (SharedPreference\n\t\t\t// .get_user_loyalty_pts(getApplicationContext()) != \"\") {\n\t\t\t// System.out\n\t\t\t// .println(\"!!!!!!!!!!!!!!!!!!!Shikha2\");\n\t\t\t// int points = Integer\n\t\t\t// .parseInt(rf_booking_loyalty_pts_value_\n\t\t\t// .getText().toString());\n\t\t\t//\n\t\t\t// if (Integer.parseInt(SharedPreference\n\t\t\t// .get_user_loyalty_pts(getApplicationContext())) >=\n\t\t\t// Global_variable.min_lp_to_redeem) {\n\t\t\t// if (Integer.parseInt(SharedPreference\n\t\t\t// .get_user_loyalty_pts(getApplicationContext())) <=\n\t\t\t// Global_variable.max_lp_to_redeem) {\n\t\t\t// if (points <= Integer.parseInt(SharedPreference\n\t\t\t// .get_user_loyalty_pts(getApplicationContext()))) {\n\t\t\t// loyalty_flag = true;\n\t\t\t// } else {\n\t\t\t// loyalty_flag = false;\n\t\t\t// Toast.makeText(\n\t\t\t// getApplicationContext(),\n\t\t\t// getString(R.string.str_You_dont),\n\t\t\t// Toast.LENGTH_SHORT)\n\t\t\t// .show();\n\t\t\t// }\n\t\t\t// } else {\n\t\t\t// loyalty_flag = false;\n\t\t\t// Toast.makeText(\n\t\t\t// getApplicationContext(),\n\t\t\t// getString(R.string.str_Your_Loyalty)\n\t\t\t// + Global_variable.max_lp_to_redeem,\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t// }\n\t\t\t// } else {\n\t\t\t// loyalty_flag = false;\n\t\t\t// Toast.makeText(\n\t\t\t// getApplicationContext(),\n\t\t\t// getString(R.string.str_less_than)\n\t\t\t// + Global_variable.min_lp_to_redeem,\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t// }\n\t\t\t// } else {\n\t\t\t// loyalty_flag = false;\n\t\t\t// Toast.makeText(getApplicationContext(),\n\t\t\t// getString(R.string.str_You_dont),\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t\t// }\n\t\t\t//\n\t\t\t//\n\t\t\t//\n\t\t\t// } catch (NumberFormatException e) {\n\t\t\t// e.printStackTrace();\n\t\t\t// }\n\t\t\t//\n\t\t\t// }\n\t\t\t//\n\t\t\t// @Override\n\t\t\t// public void beforeTextChanged(CharSequence s,\n\t\t\t// int start, int count, int after) {\n\t\t\t// // TODO Auto-generated method stub\n\t\t\t//\n\t\t\t// }\n\t\t\t//\n\t\t\t// @Override\n\t\t\t// public void afterTextChanged(Editable s) {\n\t\t\t// // TODO Auto-generated method stub\n\t\t\t//\n\t\t\t// }\n\t\t\t// });\n\n\t\t\trf_booking_submit_button\n\t\t\t\t\t.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\t\t/** check Internet Connectivity */\n\t\t\t\t\t\t\t\t\tif (cd.isConnectingToInternet()) {\n\t\t\t\t\t\t\t\t\t\tif (SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t.getuser_id(getApplicationContext()) != \"\") {\n\t\t\t\t\t\t\t\t\t\t\tif (SharedPreference.getuser_id(\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext())\n\t\t\t\t\t\t\t\t\t\t\t\t\t.length() != 0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (rf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText().toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"0\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t|| rf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew GetValidOrderDateTime()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()) != \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!Shikha2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!Pattern\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.matches(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"^[0-9 ]*$\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()))\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.numeric_validation_error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_.setError(Html.fromHtml(\"<font color='#ff0000'>\"+getString(R.string.numeric_validation_error)+</font> \"));\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_.requestFocus();\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trf_booking_loyalty_pts_value_\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setError(getString(R.string.numeric_validation_error));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint points = Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(rf_booking_loyalty_pts_value_\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getText()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!Global_variable.min_lp_to_redeem\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.min_lp_to_redeem);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!Global_variable.max_lp_to_redeem\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.max_lp_to_redeem);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext())) >= Global_variable.min_lp_to_redeem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& points <= Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()))) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!one\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (points <= Global_variable.max_lp_to_redeem) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!two\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (points <= Integer\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.parseInt(SharedPreference\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get_user_loyalty_pts(getApplicationContext()))) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!three\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = true;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew GetValidOrderDateTime()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.execute();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!four\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_You_dont),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\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} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!five\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_Your_Loyalty)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.max_lp_to_redeem,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\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} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!six\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_less_than)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ Global_variable.min_lp_to_redeem,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tloyalty_flag = false;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!seven\");\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_You_dont),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t\t\t\t\t//\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.please_login,\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method\n\t\t\t\t\t\t\t\t\t\t\t\t// stub\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\trf_booking_date_icon.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetCalenderView();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\trf_booking_time_icon.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgetTimeView();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\trf_booking_plus_box.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tint val = Integer.parseInt(rf_booking_people_box.getText()\n\t\t\t\t\t\t\t.toString());\n\n\t\t\t\t\trf_booking_people_box.setText(String.valueOf(val + 1));\n\n\t\t\t\t\tGlobal_variable.str_booking_number_of_people = String\n\t\t\t\t\t\t\t.valueOf(val + 1);\n\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_number_of_people_header.setText(Global_variable.str_booking_number_of_people);\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t\trf_booking_minus_box.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tint val = Integer.parseInt(rf_booking_people_box.getText()\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t\tif (val <= 1) {\n\t\t\t\t\t\trf_booking_people_box.setText(\"1\");\n\t\t\t\t\t\tGlobal_variable.str_booking_number_of_people = \"1\";\n\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_number_of_people_header.setText(Global_variable.str_booking_number_of_people);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trf_booking_people_box.setText(String.valueOf(val - 1));\n\t\t\t\t\t\tGlobal_variable.str_booking_number_of_people = String\n\t\t\t\t\t\t\t\t.valueOf(val - 1);\n\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_number_of_people_header.setText(Global_variable.str_booking_number_of_people);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void butCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butCheckActionPerformed\n\n Borrower bor = createBorrower();\n String date = tfDate.getText();\n\n if (driver.dateFormatValid(date)) {\n //valid date format, perform check out/in\n if (radBorrow.isSelected()) {\n //check out\n\n Book book = createBook();//create book\n\n if (!book.isOnLoan()) {\n //book is not on loan, can be loaned out\n\n //perform loan, inform user of success\n if (bor.borrow(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" loaned successfully to \" + bor.getName());\n\n } else {\n driver.errorMessageNormal(\"Book could not be loaned\");\n }\n\n } else {\n //is on loan\n driver.errorMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is already on loan.\");\n\n }\n\n } else if (radReturn.isSelected()) {\n //check in / returning\n\n Book book = createBook();\n\n if (book.isOnLoan()) {\n //book is on loan, and can be returned\n\n if (bor.returnBook(book, date)) {\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" has been returned.\");\n\n } else {\n driver.infoMessageNormal(\"The book could not be returned.\");\n }\n\n } else {\n //not on loan\n driver.infoMessageNormal(\"\\\"\" + book.getTitle() + \"\\\" is not on loan.\");\n }\n\n } else {\n driver.errorMessageNormal(\"Please select whether the book is being checked in or being returned.\");\n }\n\n } else {\n //invalid format\n driver.errorMessageNormal(\"Please ensure the date is in the format DD/MM/YYY\");\n }\n\n\n }",
"@Test(enabled=false)\n\tpublic void loanDetails(){\n\t\n\t\ttry{\n\t\tHomePage homePage=new HomePage(driver);\n\t\thomePage.clickOnSignIn();\n\t\t\n\t\tLoginActions loginAction=new LoginActions();\n\t\tloginAction.login(driver, \"username\", \"password\");\n\t\t\n\t\tAccountSummaryPage accountsummary= new AccountSummaryPage(driver);\n\t\taccountsummary.isAccountSummary();\n\t\t\n\t\tAccountActivityPage accountActivity=new AccountActivityPage(driver);\n\t\taccountActivity.clickOnAccountActivity();\n\t\t\n\t\taccountActivity.selectLoanAccount();\n\t\t\n\t\taccountActivity.getRowdata();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getRowdata(), \"RENT\");\t\n\t\t\n\t\tSystem.out.println(accountActivity.getRowdata());\n\t\t\n\t\t// Test case no - AccActShow_04 -no results for credit card are verified under this test only\n\t\n\t\taccountActivity.getCreditCard();\n\t\t\n\t\tAssert.assertEquals(accountActivity.getCreditCard(), \"No Results\");\n\t\t}\n\t\t\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.getMessage();\n\t\t}\n\t}",
"public void loanAmount_Validation() {\n\t\thelper.assertString(usrLoanAmount_AftrLogin(), payOffOffer.usrLoanAmount_BfrLogin());\n\t\tSystem.out.print(\"The loan amount is: \" + usrLoanAmount_AftrLogin());\n\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tGUILoanRequest loan = new GUILoanRequest();\n\t\t\t\tcloseFrame();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n // Needs to be reversed here due to the setting of the team in the\n // Inkast module\n if (team1.isChecked()) {\n GlobalVars.setFirstTeam(team2.getText().toString());\n } else if (team2.isChecked()) {\n GlobalVars.setFirstTeam(team1.getText().toString());\n }\n\n GlobalVars.setTurnNumber(1);\n GlobalVars.initializegame();\n\n GlobalVars.addToString(\"{{Game initialize}}\\n\");\n Intent processturn = new Intent(\"ca.longship.planetkubb.TURNINKAST\");\n\n startActivity(processturn);\n\n }",
"public void makeGetRPButton() {\r\n JButton getRP = new JButton(\"Check if a champion can be purchased with Riot Points\");\r\n new Button(getRP, main);\r\n// getRP.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// getRP.setPreferredSize(new Dimension(2500, 100));\r\n// getRP.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n getRP.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n getRiotPointsBalanceDifference();\r\n }\r\n });\r\n// main.add(getRP);\r\n }",
"@Test\n public void retrieveLoanTest() throws ApiException {\n Long loanId = null;\n GetSelfLoansLoanIdResponse response = api.retrieveLoan(loanId);\n\n // TODO: test validations\n }",
"public Boolean startLoan(Loan loan) {\n\t\tif (canBorrowBook()) {\n\t\t\tloan.getBook().incrementCopiesTakenCount();\n\t\t\tloans.add(loan);\n\t\t\t\n\t\t\tSystem.out.println(name.toUpperCase() + \" must return this book by \" + loan.getFormattedDueDate());\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void makeObtainButton() {\r\n JButton obtain = new JButton(\"Obtain a new champion using Riot Points\");\r\n new Button(obtain, main);\r\n// obtain.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// obtain.setPreferredSize(new Dimension(2500, 100));\r\n// obtain.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n obtain.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n obtainChampionUsingRiotPoints();\r\n }\r\n });\r\n// main.add(obtain);\r\n }",
"public static void log(LoanResponse loanResponse) {\n }",
"private void addadvanceOneMonthButtonFunction() {\n\t\tadvanceOneMonthButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tBank.getInstance().passOneMonth();\n\t\t\t\tsuccess.setText(\"success! One month has passed..\");\n\t\t\t}\t\t\n\t\t});\n\t\t\n\t}",
"public void onClick(View clickedButton) {\n switch (clickedButton.getId()) {\n case R.id.calculateButton:\n calculate();\n break;\n case R.id.saveButton:\n save();\n break;\n case R.id.previousResultsButton:\n show();\n break;\n }\n }",
"public void settingBtnClick() {\n\t}",
"public void takeOutLoan(Loan loan) {\n\t\tif (!loans.containsKey(loan.getId())) {\r\n\t\t\tloans.put(loan.getId(), loan);\r\n\t\t}else {\r\n\t\t\tthrow new RuntimeException(\"Duplicate loan added to member\");\r\n\t\t}\t\t\r\n\t}",
"private void setupClickEvents() {\n btnCreateUser.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (edtEnterPin.getText().toString().equals(edtConfirmPin.getText().toString())) {\n if (validate())\n createNewUser();\n } else\n Toast.makeText(CreatePinActivity.this, Constants.ERR_MSG_PIN_MUST_SAME, Toast.LENGTH_SHORT).show();\n }\n });\n\n rgGender.setOnCheckedChangeListener((radioGroup, i) -> {\n selectedGenderId = rgGender.getCheckedRadioButtonId();\n rbGender = findViewById(selectedGenderId);\n });\n\n edtDateOfBirth.setOnClickListener(view -> {\n DTU.showDatePickerDialog(context, DTU.FLAG_OLD_AND_NEW, edtDateOfBirth);\n });\n }",
"public void onAddPaymentClickListner(){\n AddPayment = (Button)findViewById(R.id.btnAdd);\n\n AddPayment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addPayment(StudentIDPos, ClassIDPos);\n }\n });\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct5++;\r\n\t\t\t\tdtAdd5.setText(\"\" + dct5);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"@Test\n public void testLoanForeclosure() {\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n final Integer loanProductID = createLoanProduct(false, NONE);\n\n List<HashMap> charges = new ArrayList<>();\n\n Integer flatAmountChargeOne = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatAmountChargeOne, \"50\", \"01 October 2011\");\n Integer flatAmountChargeTwo = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanSpecifiedDueDateJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"100\", true));\n addCharges(charges, flatAmountChargeTwo, \"100\", \"15 December 2011\");\n\n List<HashMap> collaterals = new ArrayList<>();\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplication(clientID, loanProductID, charges, null, \"10,000.00\", collaterals);\n Assertions.assertNotNull(loanID);\n\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"----------------------------------- APPROVE LOAN -----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(\"20 September 2011\", loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"----------------------------------- DISBURSE LOAN ----------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(\"20 September 2011\", loanID, \"10,000.00\",\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LOG.info(\"DISBURSE {}\", loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n LOG.info(\"---------------------------------- Make repayment 1 --------------------------------------\");\n LOAN_TRANSACTION_HELPER.makeRepayment(\"20 October 2011\", Float.parseFloat(\"2676.24\"), loanID);\n\n LOG.info(\"---------------------------------- FORECLOSE LOAN ----------------------------------------\");\n LOAN_TRANSACTION_HELPER.forecloseLoan(\"08 November 2011\", loanID);\n\n // retrieving the loan status\n loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n // verifying the loan status is closed\n LoanStatusChecker.verifyLoanAccountIsClosed(loanStatusHashMap);\n // retrieving the loan sub-status\n loanStatusHashMap = LoanStatusChecker.getSubStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n // verifying the loan sub-status is foreclosed\n LoanStatusChecker.verifyLoanAccountForeclosed(loanStatusHashMap);\n\n }",
"@Override\n public void onClick(View view) {\n String nPensil = etPensil.getText().toString();\n String nPena = etPena.getText().toString();\n String nBuku = etBuku.getText().toString();\n\n //mengecek apakah editText kosong\n //kondisi ketika panjangnya kosong\n if(nPensil.isEmpty()){\n //memberi warning berupa error\n etPensil.setError(\"Nilai Tidak Boleh Kosong\");\n }else if (nPena.isEmpty()){\n etPena.setError(\"Nilai tidak boleh kosong\");\n }else if (nBuku.isEmpty()){\n etBuku.setError(\"Nilai tidak boleh kosong\");\n }else{\n //mengubah nilai dari string k integer\n int aPensil = Integer.parseInt(nPensil);\n int aPena = Integer.parseInt(nPena);\n int aBuku = Integer.parseInt(nBuku);\n\n int hasilTotal = (aBuku * 7000) + (aPena * 3500) + (aPensil * 2500);\n\n //menampilkan hasil hitung ke widget textView\n lblTotal.setText(\"Total Belanjaan = Rp\" + hasilTotal);\n }\n }",
"@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(totalBillEditText.getText().toString().trim())) {\n\n totalBillEditText.setError(\"Can't leave field empty.\");\n return;\n }\n\n if (tipPercent == 0)\n return;\n\n tipPercent -= 1;\n updateFields();\n populateUI();\n\n }",
"public Loan(String cId, double pA, double iR, int nY, int nPy, String date){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\tstart_date = date;\n\t}",
"private static void currentLoan() {\n\t\toutput(\"\");\r\n\t\tfor (loan loan : library.currentLoan()) {// method name changes CURRENT_LOANS to currentLoan() , variable name LIB to library\r\n\t\t\toutput(loan + \"\\n\");\r\n\t\t}\t\t\r\n\t}",
"public void setAmount(double amount) {\nloanAmount = amount;\n}",
"private void setupAddMonitorByBtn(){\n\n Button btn = (Button) findViewById(R.id.addMonitorByBtn);\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n EditText emailInput = (EditText) findViewById(R.id.emailET);\n String email = emailInput.getText() + \"\";\n\n Call<User> caller = proxy.getUserByEmail(email);\n ProxyBuilder.callProxyForUser(AddWhomUserMointor.this, caller, returnedUser -> responseAddMonitorBy(returnedUser));\n\n }\n });\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct1++;\r\n\t\t\t\tdtAdd1.setText(\"\" + dct1);\r\n\t\t\t\tdttotal = dttotal + 120;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct2++;\r\n\t\t\t\tdtAdd2.setText(\"\" + dct2);\r\n\t\t\t\tdttotal = dttotal + 180;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"public double makeAPayment(double annualLeaseAmount){\n double paymentMade = 0.0;//\n return paymentMade;\n /*Now it's 0.0. There must be a place somewhere\n that has a 'make a payment'\n button or text field or whatever...\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ \n }",
"public void buttonAC (View view){\n resultView.setText(\"0\");\n result = 0;\n expressionView.setText(\"\");\n result = 0;\n }",
"public void onBankClick(View view) {\n bankUserScore();\n }",
"public double getLoanAmount() {\n return loanAmount;\n }",
"private void setupUpdateButton() {\n\n /* Get the button */\n Button updateButton = this.getStatusUpdateButton();\n\n /* Setup listener */\n View.OnClickListener updateButtonClicked = new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n statusUpdater.updateStatus();\n }\n };\n\n /* Set listener to button */\n updateButton.setOnClickListener(updateButtonClicked);\n }",
"public Loan(int s) {\r\n\t\tstockId = s;\r\n\t\tloanId = nextLoanId;\r\n\t\tnextLoanId++;\r\n\t\tloanFine = new Fine();\t\t\r\n\t\tloanDate = LocalDate.now();\r\n\t}",
"@Override\n public void onClick(View v) {\n int year = dpStartDate.getYear();\n int month = dpStartDate.getMonth();\n int day = dpStartDate.getDayOfMonth();\n String startDate = Input.formatDateUserInput (\"dateYearFirst\", day, month, year,\n 0,0);\n year = dpEndDate.getYear();\n month = dpEndDate.getMonth();\n day = dpEndDate.getDayOfMonth();\n String endDate = Input.formatDateUserInput (\"dateYearFirst\", day, month, year,\n 0,0);\n\n ReportCalorieBalancePerPeriodAsyncTask reportCaloriePerPeriodAsyncTask = new ReportCalorieBalancePerPeriodAsyncTask();\n reportCaloriePerPeriodAsyncTask.execute(startDate, endDate);\n }",
"private void addListenerOnButton() {\n\t\t\tfinal Context context = this;\n\t\t\t\n\t\t\tgetFromDate=MainActivity.fromdate;\n\t\t\tgetToDate=MainActivity.todate;\n\t\t\t//Create a class implementing “OnClickListener” and set it as the on click listener for the button\n\t\t\tbtnSkip.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif(editDetailsflag==false){\n\t\t\t\t\t\tIntent intent = new Intent(getApplicationContext(), menu.class);\n\t\t\t\t\t startActivity(intent);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\t builder.setMessage(\"Are you sure, you want to reset all fields? \")\n\t\t\t\t .setCancelable(false)\n\t\t\t\t .setPositiveButton(\"Yes\", \n\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\t\t\t\t\tetGetAddr.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tsGetPostal.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\teGetPhone.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\teGetFax.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\teGetEmailid.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetGetWebSite.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetMVATnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetServiceTaxnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetPanNo.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetMVATnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetServiceTaxnum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tetRegNum.setText(\"\"); \n\t\t\t\t\t\t\t\t\t\t\t\tetFcraNum.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\tbtnRegDate.setText(Startup.getfinancialFromDate());\n\t\t\t\t\t\t\t\t\t\t\t\tbtnFcraDate.setText(Startup.getfinancialFromDate());\n\t\t\t\t\t\t\t\t\t\t\t\tgetstate.setSelection(0);\n\t\t\t\t\t\t\t\t\t\t\t\tgetcity.setSelection(0);\n\t\t\t\t }\n\t\t })\n\t\t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t dialog.cancel();\n\t\t\t }\n\t\t });\n\t\t AlertDialog alert = builder.create();\n\t\t alert.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}); \n\t\t\tbtnorgDetailSave.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tsavedeatils();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}); \n\t\t\tbtnDeleteOrg.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\tprivate TextView tvWarning;\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n \tLayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\t\t\tView layout = inflater.inflate(R.layout.import_organisation, (ViewGroup) findViewById(R.id.layout_root));\n\t\t\t\t\t//Building DatepPcker dialog\n\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\t\tbuilder.setView(layout);\n\t\t\t\t\t//builder.setTitle(\"Delete orginsation for given financial year\");\n\t\t\t\t\ttrOrgnisation = (TableRow) layout.findViewById(R.id.trQuestion);\n\t\t\t\t\ttvWarning = (TextView) layout.findViewById(R.id.tvWarning);\n\t\t\t\t\ttrOrgnisation.setVisibility(View.GONE);\n\t\t\t\t\tgetFinancialyear = (Spinner)layout.findViewById(R.id.sYear);\n\t\t\t\t\tbtnDelete = (Button)layout.findViewById(R.id.btnImport);\n\t\t\t\t\tButton btnCancel = (Button) layout.findViewById(R.id.btnExit);\n\t\t\t\t\tbtnCancel.setText(\"Cancel\");\n\t\t\t TextView tvalertHead1 = (TextView) layout.findViewById(R.id.tvalertHead1);\n\t\t\t tvalertHead1.setText(\"Delete \"+getOrgName+\" orgnisation for given financial year?\");\n\t\t\t\t\tbtnDelete.setText(\"Delete\");\n\t\t\t\t\tSystem.out.println(\"print orgname : \"+getOrgName);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\taddListnerOnFinancialSpinner();\n\t\t\t\t\t\tbtnDelete.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(fromDate.equals(financialFrom)&&toDate.equals(financialTo))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tmessage = \"Are you sure you want to permanently delete currently logged in \"+getOrgName+\" for financialyear \"+fromDate+\" To \"+toDate+\"?\\n\" +\n\t\t\t\t\t\t\t \t\t\"your data will be permanetly lost and session will be closed !\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tmessage = \"Are you sure you want to permanently delete \"+getOrgName+\" for financialyear \"+fromDate+\" To \"+toDate+\"?\\n\" +\n\t\t\t\t\t\t\t \t\t\"It will be permenantly lost !\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//tvalertHead1 \n\t\t\t\t\t\t\t System.out.println(\"print orgname : \"+getOrgName);\n\t\t\t\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\t\t\t\t\t builder.setMessage(message)\n\t\t\t\t\t\t\t .setCancelable(false)\n\t\t\t\t\t\t\t .setPositiveButton(\"Ok\",\n\t\t\t\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t \t//parameters pass to core_engine xml_rpc functions\n\t\t\t\t\t\t\t \t//addListnerOnFinancialSpinner();\n\t\t\t\t\t\t\t \tSystem.out.println(\"dlete params: \"+getOrgName+\"\"+fromDate+\"\"+toDate);\n\t\t\t\t\t\t\t \t\t\t\tdeleteprgparams=new Object[]{getOrgName,fromDate,toDate};\n\t\t\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t\t\t \t\t\t\tdeleted = startup.deleteOrgnisationName(deleteprgparams);\n\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t \t\t\t\tif(fromDate.equals(financialFrom)&&toDate.equals(financialTo))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t \t\t\t\t\t//To pass on the activity to the next page\n\t\t\t\t\t\t\t \t\t\t\t\tIntent intent = new Intent(context,MainActivity.class);\n\t\t\t\t\t\t\t \t\t\t\t\tstartActivity(intent);\n//\t\t\t\t\t\t\t \t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"In org details\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taddListnerOnFinancialSpinner();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttvWarning.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttvWarning.setText(\"Deleted \"+getOrgName+\" for \"+fromDate+\" to \"+toDate);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t \t\t\t\t \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t })\n\t\t\t\t\t\t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t dialog.cancel();\n\t\t\t\t\t\t\t dialog.dismiss();\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t AlertDialog alert = builder.create();\n\t\t\t\t\t\t\t alert.show();\n \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t});\n\t\t\t\t\t\tbtnCancel.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tdialog=builder.create();\n\t \t\tdialog.show();\n\t \t\t\n\t \t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n\t\t\t\t\t//customizing the width and location of the dialog on screen \n\t\t\t\t\tlp.copyFrom(dialog.getWindow().getAttributes());\n\t\t\t\t\tlp.width = 700;\n\t\t\t\t\tdialog.getWindow().setAttributes(lp);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnRegDate.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t//for showing a date picker dialog that allows the user to select a date (Registration Date)\n\t\t\t\t\tString regDate = (String) btnRegDate.getText();\n\t\t\t\t\tString dateParts[] = regDate.split(\"-\");\n\t\t\t\t\tsetfromday = dateParts[0];\n\t\t\t\t\tsetfrommonth = dateParts[1];\n\t\t\t\t\tsetfromyear = dateParts[2];\n\t\t \n\t\t\t\t\tSystem.out.println(\"regdate is:\"+regDate);\n\t\t\t\t\tshowDialog(REG_DATE_DIALOG_ID);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnFcraDate.setOnClickListener(new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t//for showing a date picker dialog that allows the user to select a date (FCRA Registration Date)\n\t\t\t\t\tString fcraDate = (String) btnFcraDate.getText();\n\t\t\t\t\tString dateParts[] = fcraDate.split(\"-\");\n\t\t\t\t\tsetfromday1 = dateParts[0];\n\t\t\t\t\tsetfrommonth1 = dateParts[1];\n\t\t\t\t\tsetfromyear1 = dateParts[2];\n\t \n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromday1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfrommonth1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromyear1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+fcraDate);\n\t\t\t\t\tshowDialog(FCRA_DATE_DIALOG_ID);\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(totalBillEditText.getText().toString().trim())) {\n\n totalBillEditText.setError(\"Can't leave field empty.\");\n return;\n }\n tipPercent += 1;\n updateFields();\n populateUI();\n\n }",
"private void goalsConfigButton(){\n if(!goalsOpened){\n goalsUI = new GoalsUI(this, false);\n goalsOpened = true;\n }\n }",
"private void setupButtons() {\n compareButton.setOnClickListener((View view) -> {\n if (comparisonCompaniesAdapter.getDataSet() == null\n || comparisonCompaniesAdapter.getDataSet().size() < 2) {\n Toast.makeText(getApplicationContext(),\n \"Select at least 2 companies!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent moveToGraph = new Intent(this, GraphActivity.class);\n\n moveToGraph.putStringArrayListExtra(\"COMPARISON_COMPANIES\",\n extractTickers((ArrayList<Company>) comparisonCompaniesAdapter.getDataSet()));\n startActivity(moveToGraph);\n\n });\n }",
"@Override\n public void onClick(View theView) {\n setUp();\n\n\n }",
"public void OnNumberButtonClick_land(View v) {\n try {\n Button b = (Button) v;\n expressionView.setText(expressionView.getText().toString() + b.getText());\n calculate();\n isOperator=false;\n }catch (Exception e)\n {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }",
"private void parseLoan(String[] info, Account account) {\n Loan l = new Loan(Float.parseFloat(info[1]), info[2],\n LocalDate.parse(info[3], dateTimeFormatter),\n Loan.Type.ALL);\n l.updateExistingLoan(info[4], info[5], Integer.parseInt(info[6]), Float.parseFloat(info[7]));\n account.getLoans().add(l);\n }",
"public void initializeButtons(){\n logOutButton = findViewById(R.id.bLogOut);\n logOutButton.setOnClickListener(v -> {\n displayViewModel.signOut();\n Toast.makeText(this, R.string.signed_out, LENGTH_SHORT).show();\n Intent intent = new Intent(this, LoginXActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n finish();\n });\n unPairButton = findViewById(R.id.bUnpair);\n unPairButton.setOnClickListener(view -> {\n displayViewModel.setInterval(Constants.SOS_INTERVAL);\n displayViewModel.unPair();\n logOutButton.callOnClick();\n });\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n loan_results_jScrollPane = new javax.swing.JScrollPane();\n loan_results_jTable = new javax.swing.JTable();\n loan_results_jLabel = new javax.swing.JLabel();\n promptLoanIdLabel = new javax.swing.JLabel();\n loanIdTextField = new javax.swing.JTextField();\n checkInButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n loan_results_jTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Borrower Name\", \"Loan_Id\", \"ISBN\", \"Card_Id\", \"Date_Out\", \"Due_Date\", \"Date_In\"\n }\n ));\n loan_results_jScrollPane.setViewportView(loan_results_jTable);\n\n loan_results_jLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n loan_results_jLabel.setText(\"Search Table with query: \"+ get_Search_String());\n\n promptLoanIdLabel.setText(\"Enter Loan Id:\");\n\n checkInButton.setText(\"Check In\");\n checkInButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkInButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loan_results_jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1018, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loan_results_jLabel)\n .addGroup(layout.createSequentialGroup()\n .addComponent(promptLoanIdLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loanIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(checkInButton)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(promptLoanIdLabel)\n .addComponent(loanIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkInButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loan_results_jLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loan_results_jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct3++;\r\n\t\t\t\tdtAdd3.setText(\"\" + dct3);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"@Override\n\tprotected void initView() {\n\t\tsetContentView(R.layout.activity_money_manage);\n\t\t\n\t\tfindViewById(R.id.bt_title_left).setOnClickListener(this);\n\t\tfindViewById(R.id.bt_ok).setOnClickListener(this);\n\t}",
"private void initView() {\n \t textDate = (TextView) findViewById(R.id.nextInspectionDate);\n \t textTime = (TextView) findViewById(R.id.nextInspectionTime);\n \t textAddress = (TextView) findViewById(R.id.textAddressInspection);\n \t textPermitType = (TextView) findViewById(R.id.textPermitType);\n \t buttonScheduleInspection = (Button) findViewById(R.id.buttonScheduleInspection);\n \t buttonViewInspections = (Button) findViewById(R.id.buttonViewInspections);\n \t loadingProgress = (ProgressBar) findViewById(R.id.spinnerInpsection);\n \t LinearLayout landingNextInspectionId = (LinearLayout) findViewById(R.id.landingNextInspectionId);\n \t landingNextInspectionId.setOnClickListener(new View.OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(projectsLoader.getNextInspection()!=null){\n\t\t\t\t\tString recordId = projectsLoader.getNextInspection().getRecordId_id();\n\t\t\t\t\tif(recordId==null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tActivityUtils.startScheduleInspectionActivity(LandingPageActivity.this, projectsLoader.getParentProject(recordId).getProjectId(), recordId, projectsLoader.getNextInspection(), AppConstants.CANCEL_INSPECTION_SOURCE_OTHER);\n\t\t\t\t}\n\t\t\t}\t\n\t\t});\n\t}",
"@Override\n public void onClick(View v) {\n if (TextUtils.isEmpty(totalBillEditText.getText().toString().trim())) {\n\n totalBillEditText.setError(\"Can't leave field empty.\");\n return;\n }\n if(noPersons == 1)\n return;\n\n noPersons -= 1;\n updateFields();\n populateUI();\n\n }",
"private void setupMakeLoveButton() {\n final FloatingActionButton makeLoveButton = (FloatingActionButton) findViewById(R.id.make_love);\n makeLoveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final MakeLoveDialogFragment makeLoveDialogFragment;\n if (user.equals(currentUser)) {\n makeLoveDialogFragment = MakeLoveDialogFragment.newInstance(new User(\"[email protected]\", \"\"));\n } else {\n makeLoveDialogFragment = MakeLoveDialogFragment.newInstance(user);\n }\n makeLoveDialogFragment.setOnSuccessCallback(new MakeLoveDialogFragment.SuccessCallback() {\n @Override\n public void onSuccess() {\n /*\n * If we're on the user's own view, reload their sent loves. Otherwise, reload\n * the received loves.\n */\n int tabIndex = (user.equals(currentUser)) ? LovesPagerAdapter.SENT_TAB_INDEX : LovesPagerAdapter.RECEIVED_TAB_INDEX;\n UserLoveFragment fragment = (UserLoveFragment) fragmentAdapter.getRegisteredFragment(tabIndex);\n fragment.reloadLoves();\n }\n });\n makeLoveDialogFragment.show(getFragmentManager(), \"makeLoveDialog\");\n }\n });\n }",
"private void assignClickHandlers()\n {\n btnNext.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n currentDate.add(Calendar.MONTH, 1);\n updateAttendanceDetails();\n }\n });\n\n // subtract one month and refresh UI\n btnPrev.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n currentDate.add(Calendar.MONTH, -1);\n updateAttendanceDetails();\n }\n });\n\n\n\n\n txtDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new DatePickerDialog(AttendanceDetailsActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\ttargetSteps=(np.getValue()+1)*500;\r\n\t\t\t\t\t\ttvTargetSteps.setText(targetSteps+\"\");\r\n\t\t\t\t\t\ttvTargetStepsCenter.setText(targetSteps+\"\");\r\n\t\t\t\t\t\tfloat percent=BleService.totalSteps*100f/targetSteps;\r\n\t\t\t\t\t\tif(percent>100){\r\n\t\t\t\t\t\t\ttvComplete.setText(\"100%\");\r\n\t\t\t\t\t\t}else if(percent<0){\r\n\t\t\t\t\t\t\ttvComplete.setText(\"0%\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\ttvComplete.setText(percent2String(percent)+\"%\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint currentCount=BleService.totalSteps*100/targetSteps;\r\n\t\t\t\t\t\tif(currentCount>100){\r\n\t\t\t\t\t\t\tpgTotalSteps.setCurrentCount(100);\r\n\t\t\t\t\t\t}else if(currentCount<0){\r\n\t\t\t\t\t\t\tpgTotalSteps.setCurrentCount(0);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tpgTotalSteps.setCurrentCount(currentCount);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tgetSharedPreferences(\"sport_data\", Context.MODE_PRIVATE).edit().putInt(\"targetSteps\", targetSteps).commit();\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct1--;\r\n\t\t\t\tif(dct1<0){\r\n\t\t\t\t\tdct1 = 0;\r\n\t\t\t\t\tdttotal = dttotal - 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdct1 = dct1;\r\n\t\t\t\t\tdttotal = dttotal - 120;\r\n\t\t\t\t}\r\n\t\t\t\tdtAdd1.setText(\"\" + dct1);\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tp = Float.parseFloat(InterestCalc.this.Principal.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tr = Float.parseFloat(InterestCalc.this.Rate.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tn = Float.parseFloat(InterestCalc.this.Years.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tf = Float.parseFloat(InterestCalc.this.Freq.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tr = (float) (r / (f * 100));\n\t\t\t\ta = (float) (p * Math.pow((1 + r), (f * n)));\n\t\t\t\ts = String.valueOf(a);\n\n\t\t\t\tans.setText(s);\n\t\t\t}",
"private void payButtonClicked() {\n if (checkBoxAgreedTAC.isChecked()) {\n boolean validCard = validateCard();\n if (validCard) {\n Double payAmount = Double.parseDouble(textViewPrepaidPrice.getText().toString());\n MainActivity.bus.post(new PrepayPaymentAttemptEvent(payAmount, Long.parseLong(litersToBuy.getText().toString())));\n if (PrepayCalculatorFragment.this.payDialog != null) {\n PrepayCalculatorFragment.this.payDialog.dismiss();\n }\n }\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.TACMustAgreedMessage), Toast.LENGTH_SHORT).show();\n }\n\n }",
"public static void enterDetails(int num, double interest){\r\n Scanner s = new Scanner(System.in);\r\n String name;\r\n double amm=0;\r\n int term=-1;\r\n \r\n int loanType;\r\n \r\n do{\r\n System.out.println(\"Press 1: Business Loan\\n\"\r\n + \"Press 2: Personal Loan\");\r\n loanType = parseInt(s.next());\r\n }while(!(loanType == 1 || loanType == 2));\r\n \r\n while(amm <= 0 || amm > 100000){\r\n System.out.print(\"Enter loan ammount: \");\r\n amm = parseDouble(s.next());\r\n if(amm > 100000){\r\n System.out.println(\"Loan exceeds limit\");\r\n }\r\n }\r\n System.out.print(\"Enter the term in years: \");\r\n term = parseInt(s.next());\r\n if(!(term==3 || term==5)){\r\n System.out.println(\"Loan term set to 1 year\");\r\n }\r\n \r\n System.out.print(\"Enter last name: \");\r\n name = s.next();\r\n \r\n switch (loanType) {\r\n case 1:\r\n BusinessLoan b = new BusinessLoan(num, name, amm, term, interest);\r\n if(b.loanNum!=-1){\r\n loan.add(b);\r\n System.out.println(\"Loan approved\");\r\n } \r\n break;\r\n case 2:\r\n PersonalLoan p = new PersonalLoan(num, name, amm, term, interest);\r\n if(p.loanNum!=-1){\r\n loan.add(p);\r\n System.out.println(\"Loan approved\");\r\n }\r\n break;\r\n }\r\n System.out.println(\"---------------------------------------------\");\r\n }",
"public Loan(String cId, double pA, double iR, int nY, int nPy){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\t\n\t\tDate current_time = new Date();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t// Adapt the java data format to the mysql one\n\t\tstart_date = sdf.format(current_time);\n\t}",
"public void makePurchaseButton() {\r\n JButton purchase = new JButton(\"Purchase premium currency\");\r\n new Button(purchase, main);\r\n// purchase.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// purchase.setPreferredSize(new Dimension(2500, 100));\r\n// purchase.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n purchase.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n doBuyRiotPoints();\r\n }\r\n });\r\n// main.add(purchase);\r\n }",
"private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct6++;\r\n\t\t\t\tdtAdd6.setText(\"\" + dct6);\r\n\t\t\t\tdttotal = dttotal + 130;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"private void setClaimButton()\t{\n\t\t\n\t\tif(Integer.parseInt(scanCount) >= Integer.parseInt(maxScans))\t{\n\n\t\t\t/*\tImage*/Button ib = (/*Image*/Button) findViewById(R.id.ibClaim);\n\t\t\tib.setVisibility(View.VISIBLE);\n\t\t\t/*\tib.setPadding(0, 0, 0, 0);*/\n\t\t\tib.setLayoutParams(new LinearLayout.LayoutParams((int) (width*0.8),(int) (height*0.15)));\n\n\t\t\tib.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\t\tif(getSharedPrefs(\"userDetails\", \"allInfo\", \"\").equals(\"true\"))\t{\n\t\t\t\t\t\t\n\t\t\t\t\tAlertDialog.Builder adb = new AlertDialog.Builder(DisplayActivity.this);\n\t\t\t\t\tadb.setMessage(\"Once you click 'YES', you will have 5 minutes to claim your item from the cashier.\\nAre you by the cashier?\");\n\t\t\t\t\t\n\t\t\t\t\tadb.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\t\tString uuid = getSharedPrefs(\"userDetails\", \"uuid\", \"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString url = \"http://www.loyal3.co.za/redeem?uuid=\"+uuid+\"&shop=\"+shopName;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tnew ValidateCounts().execute(url.trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\n\n\t\t\t\t\t//Neg Button does nothing.\n\t\t\t\t\tadb.setNegativeButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tadb.show();\t\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(getBaseContext(), \"Please update your information in your Profile Page in order to claim your free item\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\t\n\t}",
"public void makeAcquireButton() {\r\n JButton acquire = new JButton(\"Acquire a new champion with Blue Essence\");\r\n new Button(acquire, main);\r\n// acquire.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// acquire.setPreferredSize(new Dimension(2500, 100));\r\n// acquire.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n acquire.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n acquireChampionUsingBlueEssence();\r\n }\r\n });\r\n// main.add(acquire);\r\n }",
"public double getLoan()\r\n {\r\n return loan;\r\n }"
] |
[
"0.69336605",
"0.6910996",
"0.67832613",
"0.673625",
"0.67262995",
"0.64504224",
"0.6289802",
"0.6251937",
"0.61118907",
"0.6039767",
"0.59565616",
"0.58956516",
"0.58443785",
"0.583342",
"0.57738096",
"0.5750728",
"0.5738355",
"0.572314",
"0.5652372",
"0.5620058",
"0.56199676",
"0.56090355",
"0.5558115",
"0.5538981",
"0.54933065",
"0.5468656",
"0.546263",
"0.54289716",
"0.54180664",
"0.5397374",
"0.53451407",
"0.534359",
"0.5311519",
"0.5306946",
"0.52971214",
"0.5295054",
"0.52932984",
"0.52887344",
"0.52268785",
"0.52263665",
"0.5206347",
"0.519245",
"0.51878047",
"0.5187",
"0.5176844",
"0.5170628",
"0.5169494",
"0.51690465",
"0.51680166",
"0.5165176",
"0.5164221",
"0.5137119",
"0.5136412",
"0.5131602",
"0.51272565",
"0.5111982",
"0.5097268",
"0.5088559",
"0.5083575",
"0.50776505",
"0.5071376",
"0.507088",
"0.5064311",
"0.50575817",
"0.50566405",
"0.5042538",
"0.50360084",
"0.50330794",
"0.50326586",
"0.5026673",
"0.5012679",
"0.50124556",
"0.500374",
"0.5001269",
"0.5000972",
"0.4993447",
"0.49870372",
"0.49828452",
"0.49796966",
"0.49778196",
"0.49767658",
"0.49745604",
"0.49735302",
"0.49721387",
"0.4971082",
"0.49588504",
"0.49478814",
"0.49434048",
"0.49414292",
"0.49412942",
"0.4932041",
"0.49308878",
"0.49302137",
"0.49279976",
"0.49272883",
"0.49227667",
"0.49224046",
"0.49213645",
"0.4919344",
"0.49190232"
] |
0.8599008
|
0
|
/ onCalcLoanBtnClicked updates the bottom row's text values in lin_loan_table by using the calculateMonths and monthlyPaymentFinishInYear methods.
|
private void onCalcLoanBtnClicked()
{
/* Here I declare the values that are to be passed into the public calculation methods of this
* class (calculateMonths, monthlyPaymentFinishInYear), and if they are not filled in (or are
* null) they become zero.
*/
Log.d(TAG, "Calculate loan button clicked");
double princ;
double interest;
double payment;
if (findViewById(R.id.edit_loan_balance) != null) {
EditText editPrincipal = (EditText)findViewById(R.id.edit_loan_balance);
if ("".equals(editPrincipal.getText().toString()))
{
Log.d(TAG, "Defaulting principal amount to zero because empty field");
princ = 0.0;
}
else
{
Log.d(TAG, "Setting principal amount to possibly non-zero value");
princ = Double.valueOf(editPrincipal.getText().toString());
}
}
else {
Log.d(TAG, "Defaulting principal amount to zero because null EditText");
princ = 0.0;
}
if (findViewById(R.id.edit_loan_interest) != null) {
EditText editInterest = (EditText)findViewById(R.id.edit_loan_interest);
if ("".equals(editInterest.getText().toString()))
{
Log.d(TAG, "Defaulting interest amount to zero because empty field");
interest = 0.0;
}
else
{
Log.d(TAG, "Setting interest amount to possibly non-zero value");
interest = Double.valueOf(editInterest.getText().toString());
}
}
else {
Log.d(TAG, "Defaulting interest amount to zero because null EditText");
interest = 0.0;
}
if (findViewById(R.id.edit_amount) != null) {
EditText editAmt = (EditText)findViewById(R.id.edit_amount);
if ("".equals(editAmt.getText().toString()))
{
Log.d(TAG, "Defaulting payment amount to zero because empty field");
payment = 0.0;
}
else
{
Log.d(TAG, "Setting payment amount to possibly non-zero value");
payment = Double.valueOf(editAmt.getText().toString());
}
}
else {
Log.d(TAG, "Defaulting payment amount to zero because null EditText");
payment = 0.0;
}
if (findViewById(R.id.txt_loan_how_many_months_value) != null)
{
TextView howManyMonths = findViewById(R.id.txt_loan_how_many_months_value);
howManyMonths.setText(calculateMonths(princ, interest, payment));
}
if (findViewById(R.id.txt_loan_min_payment_year_value) != null)
{
TextView minPayment = findViewById(R.id.txt_loan_min_payment_year_value);
minPayment.setText(monthlyPaymentFinishInYear(princ, interest));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@FXML\r\n\tprivate void btnCalcLoan(ActionEvent event) {\r\n\r\n\t\tSystem.out.println(\"Amount: \" + LoanAmount.getText());\r\n\t\tdouble dLoanAmount = Double.parseDouble(LoanAmount.getText());\r\n\t\tSystem.out.println(\"Amount: \" + dLoanAmount);\t\r\n\t\t\r\n\t\tlblTotalPayemnts.setText(\"123\");\r\n\t\t\r\n\t\tLocalDate localDate = PaymentStartDate.getValue();\r\n\t\tSystem.out.println(localDate);\r\n\t\t\r\n\t\tdouble dInterestRate = Double.parseDouble(InterestRate.getText());\r\n\t\tSystem.out.println(\"Interest Rate: \" + dInterestRate);\r\n\t\t\r\n\t\tint dNbrOfYears = Integer.parseInt(NbrOfYears.getText());\r\n\t\tSystem.out.println(\"Number of Years: \" + dNbrOfYears);\r\n\t\t\r\n\t\tdouble dAdditionalPayment = Double.parseDouble(AdditionalPayment.getText());\r\n\t\t\r\n\t\t\r\n\t\tLoan dLoan = new Loan(dLoanAmount,dInterestRate,dNbrOfYears,dAdditionalPayment,localDate,false,0);\r\n\t\t\r\n\t\tdouble totalInterest = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < dLoan.LoanPayments.size();i++) {\r\n\t\t\tPayment payment = dLoan.LoanPayments.get(i);\r\n\t\t\tloanTable.getItems().add((payment.getPaymentID(),payment.getDueDate(),dAdditionalPayment,payment.getIMPT(),\r\n\t\t\t\t\tpayment.getPPMT(),payment.getTotalPrinciple());\r\n\t\t\ttotalInterest += payment.getIMPT();\r\n\t\t}\r\n\t\t\r\n\t\tTotalPayments.setText(String.valueOf(dLoan.LoanPayments.size()));\r\n\t\tTotalInterest.setText(String.valueOf(totalInterest));\r\n\t\t\r\n\t}",
"private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }",
"public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}",
"@Override\n public void onClick(View view) {\n double loan = Double.parseDouble(binding.loanAmount.getText().toString());\n\n // get tenure amount from the textView and convert it to double\n double tenure = Double.parseDouble(binding.loanTenure.getText().toString());\n\n // get interest amount from the textView and convert it to double, then divide it by 12 to get the interest per month\n double interest = Double.parseDouble(binding.interestRate.getText().toString()) / 12.0;\n\n // variable to hold the (1-i)^n value\n double i = Math.pow((1.0 + interest / 100.0), (tenure * 12.0));\n // equation to calculate EMI (equated monthly installments)\n double emi = loan * (interest/100.0) * i / ( i - 1 );\n\n // after calculated EMI, set it to the textView in the interface\n binding.monthlyPayment.setText(\"$\" + String.format(\"%.2f\", emi));\n }",
"private void setUpLoanBtn() {\r\n if (findViewById(R.id.btn_calculate_loan) != null)\r\n {\r\n /* This is the \"Calculate loan\" button. Its functionality is to update the table values\r\n * below it.\r\n */\r\n Button calcLoanBtn = (Button) findViewById(R.id.btn_calculate_loan);\r\n calcLoanBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n onCalcLoanBtnClicked();\r\n }\r\n });\r\n }\r\n }",
"public void getMonthlyPayment(View view) {\n //Get all the EditText ids\n EditText principal = findViewById(R.id.principal);\n EditText interestRate = findViewById(R.id.interestRate);\n EditText loanTerm = findViewById(R.id.loanTerm);\n\n //Get the values for principal, MIR and the term of the loan\n double p = Double.parseDouble(principal.getText().toString());\n double r = Double.parseDouble(interestRate.getText().toString());\n double n = Double.parseDouble(loanTerm.getText().toString());\n\n\n //Calculate the monthly payment and round the number to 2 decimal points\n TextView display = findViewById(R.id.display);\n double monthlyPayment;\n DecimalFormat df = new DecimalFormat(\"#.##\");\n monthlyPayment = (p*r/1200.0)/(1-Math.pow((1.0+r/1200.0),(-12*n)));\n\n //Display the number in TextView\n display.setText(String.valueOf(df.format(monthlyPayment)));\n\n\n }",
"private void CalculateJButtonActionPerformed(java.awt.event.ActionEvent evt) { \n // read the inputs and calculate payment of loan\n //constants for max values, and number of comoundings per year\n final double MAX_AMOUNT = 100000000;\n final double MAX_INTEREST_RATE = 100;\n final int COUMPOUNDINGS = 12;\n final double MAX_YEARS = 50;\n final double PERIOD_INTEREST = COUMPOUNDINGS * 100;\n String errorMessage = \"Please enter a positive number for all required fields\"\n + \"\\nLoan amount must be in reange (0, \" + MAX_AMOUNT + \"]\"\n + \"\\nInterest rate must be in range [0, \" + MAX_INTEREST_RATE + \"]\"\n + \"\\nYears must be in range [0, \" + MAX_INTEREST_RATE + \"]\";\n \n counter++;\n CounterJTextField.setText(String.valueOf(counter));\n \n //get inputs\n double amount = Double.parseDouble(PrincipalJTextField.getText());\n double rate = Double.parseDouble(RateJTextField.getText());\n double years = Double.parseDouble(YearsJTextField.getText());\n \n //calculate paymets using formula\n double payment = (amount * rate/PERIOD_INTEREST)/\n (1 - Math.pow((1 + rate/PERIOD_INTEREST),\n years * (-COUMPOUNDINGS)));\n double interest = years * COUMPOUNDINGS * payment - amount;\n \n //displays results\n DecimalFormat dollars = new DecimalFormat(\"$#,##0.00\");\n\n PaymentJTextField.setText(dollars.format(payment));\n InterestJTextField.setText(dollars.format(interest));\n \n }",
"public void displayLoanToJTable()\n {\n DefaultTableModel model = (DefaultTableModel) loan_results_jTable.getModel();\n Object rowData[] = new Object[7];\n for(int i = 0; i < _list.size(); i++)\n {\n rowData[0] = _list.get(i)._Bname;\n rowData[1] = _list.get(i)._LoanId;\n rowData[2] = _list.get(i)._ISBN;\n rowData[3] = _list.get(i)._CardId;\n rowData[4] = _list.get(i)._DateOut;\n rowData[5] = _list.get(i)._DueDate;\n rowData[6] = _list.get(i)._DateIn; \n model.addRow(rowData);\n } \n }",
"public void calculateLoan(View view){\n Intent intent = new Intent(this, ResultActivity.class);\n\n //TODO: calculate monthly payment and determine\n double carPrice;\n double downPayment;\n double loadPeriod;\n double interestRate;\n\n \n\n //loan application status; approve or reject\n double monthlyPayment;\n String status;\n\n //Passing data using putExtra method\n //putExtra(TAG, value)\n intent.putExtra(MONTHLY_PAYMENT, monthlyPayment);\n intent.putExtra(LOAN_STATUS, status);\n startActivity(intent);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n loan_results_jScrollPane = new javax.swing.JScrollPane();\n loan_results_jTable = new javax.swing.JTable();\n loan_results_jLabel = new javax.swing.JLabel();\n promptLoanIdLabel = new javax.swing.JLabel();\n loanIdTextField = new javax.swing.JTextField();\n checkInButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n loan_results_jTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Borrower Name\", \"Loan_Id\", \"ISBN\", \"Card_Id\", \"Date_Out\", \"Due_Date\", \"Date_In\"\n }\n ));\n loan_results_jScrollPane.setViewportView(loan_results_jTable);\n\n loan_results_jLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n loan_results_jLabel.setText(\"Search Table with query: \"+ get_Search_String());\n\n promptLoanIdLabel.setText(\"Enter Loan Id:\");\n\n checkInButton.setText(\"Check In\");\n checkInButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n checkInButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loan_results_jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1018, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(loan_results_jLabel)\n .addGroup(layout.createSequentialGroup()\n .addComponent(promptLoanIdLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loanIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(checkInButton)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(promptLoanIdLabel)\n .addComponent(loanIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkInButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loan_results_jLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(loan_results_jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"public abstract double calculateLoanPayment(double principalAmount, double annualPrimeIntRate, int monthsAmort);",
"private void SummaryProfile() {\n //format the date & number\n DateFormat df = DateFormat.getDateInstance( DateFormat.LONG, Locale.ENGLISH );\n NumberFormat nf = NumberFormat.getCurrencyInstance( new Locale(\"id\",\"id\"));\n \n GregorianCalendar gregorian = new GregorianCalendar( );\n \n String[] displayMonths = new DateFormatSymbols().getMonths();\n \n //month and year variable ( month start from 0, so 0 is january, 11 is december )\n int gregorianmonth = gregorian.get(Calendar.MONTH);\n int gregorianyear = gregorian.get(Calendar.YEAR);\n \n \n //the title of the summary\n //ok, we must use temporary variable because of missmatch with db standard date\n int displaygregorianmonth = gregorianmonth;\n int displaygregorianyear = gregorianyear;\n \n //december watchout\n //if the current month is january ( 0 ) then we must display summary for \n //dec ( 11 ) last year ( current year - 1 )\n if(displaygregorianmonth==0) {\n displaygregorianmonth = 11;\n displaygregorianyear = gregorianyear - 1;\n }\n //if the current month is not january, then just minus it with one, current year is \n //same\n else {\n displaygregorianmonth -= 1;\n }\n DateLB.setText(\"Summary of the Company in \" + \n displayMonths[displaygregorianmonth] + \" \" + displaygregorianyear );\n \n //the summary report ( month start from 1 so no need minus anymore )\n SummarySaleLB.setText( \"Total Value of Sale Transaction : \" +\n nf.format( reportdb.TotalSaleValue( gregorianmonth,\n gregorianyear ) ) );\n SummaryPurchaseLB.setText( \"Total Value of Purchase Transaction : \" +\n nf.format( reportdb.TotalPurchaseValue( gregorianmonth,\n gregorianyear ) ) );\n SummarySalesmanCommisionLB.setText( \"Total Value of Salesman Commision Transaction : \" +\n nf.format( reportdb.TotalSalesmanCommisionValue( gregorianmonth,\n gregorianyear ) ) );\n SummarySalaryPaymentLB.setText( \"Total Value of Salary Payment Transaction : \" + \n nf.format( reportdb.TotalSalaryPaymentValue( gregorianmonth,\n gregorianyear ) ) );\n SummaryChargesLB.setText( \"Total Value of Outcome Payment Transaction : \" +\n nf.format( reportdb.TotalOutcomeValue( gregorianmonth,\n gregorianyear ) ) );\n \n }",
"@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}",
"private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {\n loadInTable();\r\n calculate();\r\n \r\n fetchSalaryDetailsFromDB(1, 202);\r\n }",
"private void butViewLoansActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butViewLoansActionPerformed\n //ResultSet rs = driver.query(\"select borrowerID, fullName, bookID, title, date from BBLink L, \"\n // + \"Borrowers B, AllBooks A where A.id=bookID and B.id = borrowerID\");\n\n CallableStatement cstmt = driver.getCallStatement(\"{CALL viewAllLoans()}\");\n ResultSet rs = null;\n try {\n rs = cstmt.executeQuery();\n\n JTable myTable = new JTable(driver.buildTableModel(rs));\n rs.close();\n cstmt.close();\n\n scrollPane.setViewportView(myTable);\n } catch (SQLException se) {\n driver.errorMessageNormal(\"From LoansPanel.butViewLoansAP: \" + se);\n se.printStackTrace();\n }\n\n }",
"private void updateTotal() {\n int total = table.getTotal();\n vip.setConsumption(total);\n if (total > 0)\n payBtn.setText(PAY + RMB + total);\n else if (total == 0)\n payBtn.setText(PAY);\n }",
"private void updateControlsFromTable() {\r\n monthControl.setText(getDateFormatSymbols()\r\n .getMonths()[calendarTable.getCalendarModel().getMonth()]);\r\n yearControl.setText(String.valueOf(calendarTable.getCalendarModel().getYear()));\r\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n primaryStage.setTitle(\"Loan Calculator\");\n primaryStage.setOnCloseRequest(e -> {\n e.consume();\n closeProgram(primaryStage);\n });\n\n //Border Pane (Main Pane)\n BorderPane mainPane = new BorderPane();\n\n //Initialize basic UI\n initUI(mainPane);\n\n //Center grid pane\n GridPane centerGrid = new GridPane();\n centerGrid.setPadding(new Insets(70, 10, 10, 10));\n centerGrid.setVgap(65);\n centerGrid.setHgap(5);\n centerGrid.setStyle(\"-fx-background-color: BEIGE\");\n\n //Defining text fields and labels for loan amount, loan term and interest rate\n TextField loanAmountField = new TextField();\n loanAmountField.setPromptText(\"Enter the loan amount\");\n GridPane.setConstraints(loanAmountField, 0, 0);\n Label loanAmountLabel = new Label(\"€\");\n GridPane.setConstraints(loanAmountLabel, 1, 0);\n\n TextField interestRateField = new TextField();\n interestRateField.setPromptText(\"Enter interest rate\");\n GridPane.setConstraints(interestRateField, 0, 2);\n Label interestRateLabel = new Label(\"%\");\n GridPane.setConstraints(interestRateLabel, 1, 2);\n\n TextField loanTermYearsField = new TextField();\n loanTermYearsField.setPromptText(\"Enter Years\");\n GridPane.setConstraints(loanTermYearsField, 0, 1);\n TextField loanTermMonthsField = new TextField();\n loanTermMonthsField.setPromptText(\"Enter Months\");\n GridPane.setConstraints(loanTermMonthsField, 1, 1);\n\n centerGrid.getChildren().addAll(loanAmountField, interestRateField, loanTermYearsField, loanTermMonthsField, loanAmountLabel, interestRateLabel);\n\n //Defining Loan type choice box\n ChoiceBox<String> loanTypeBox = new ChoiceBox<>();\n loanTypeBox.getItems().addAll(\"Annuity\", \"Linear\");\n loanTypeBox.setValue(\"Annuity\");\n GridPane.setConstraints(loanTypeBox, 0, 3);\n centerGrid.getChildren().add(loanTypeBox);\n\n //Defining action buttons\n Button showGraph = new Button(\"Show Graph\");\n showGraph.setMinSize(100, 50);\n Button saveFile = new Button(\"Save to File\");\n saveFile.setMinSize(100, 50);\n Button showTable = new Button(\"Show Table\");\n showTable.setMinSize(100, 50);\n\n //Bottom HBox\n HBox bottomLayout = new HBox(20);\n bottomLayout.getChildren().addAll(showTable, showGraph, saveFile);\n bottomLayout.setStyle(\"-fx-background-color: #8c8c7b;\");\n bottomLayout.setPadding(new Insets(50,60,50,50));\n bottomLayout.setAlignment(Pos.CENTER_RIGHT);\n\n //Handling Graph Button press\n showGraph.setOnAction(e -> {\n if(userData.validateInput(loanAmountField, loanTermYearsField, loanTermMonthsField, interestRateField)) {\n userData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, loanTypeBox.getValue(), interestRateField);\n userData.calculateLoan();\n if(userData.getLoanType().equals(\"Annuity\"))\n loanChart.display(\"Annuity Chart\", \"Annuity Loan Chart\", userData, new BorderPane());\n else\n loanChart.display(\"Linear Chart\", \"Linear Loan Chart\", userData, new BorderPane());\n }\n });\n\n //Handling save file button press\n final String[] loanStatement = new String[1];\n\n saveFile.setOnAction(e -> {\n if(userData.validateInput(loanAmountField, loanTermYearsField, loanTermMonthsField, interestRateField)) {\n userData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, loanTypeBox.getValue(), interestRateField);\n userData.calculateLoan();\n if(loanTypeBox.getValue() == \"Annuity\")\n otherUserData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, \"Linear\", interestRateField);\n else\n otherUserData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, \"Annuity\", interestRateField);\n\n otherUserData.calculateLoan();\n\n String loanStatementStart = new String();\n\n for(int i = 0; i < userData.getLoanTermTotal(); i++)\n loanStatementStart = loanStatementStart.concat(userData.getMonthNumber()[i] + \" \" + Math.round(userData.getMonthlyPayment()[i] * 100) / 100.0 + \" \" +\n Math.round(userData.getMonthlyContribution()[i] * 100) / 100.0 + \" \" + Math.round(userData.getMonthlyInterest()[i] * 100) / 100.0 + \" \" +\n Math.round(userData.getLoanLeft()[i] * 100) / 100.0 + \"\\n\");\n\n loanStatement[0] = \"Loan amount: \" + userData.getLoanAmount() + \" Total loan term: \" + userData.getLoanTermTotal() + \" Interest rate: \" + userData.getInterestRate() * 12 * 100 + \" \\n\" + userData.getLoanType()\n + \" total paid amount: \" + Math.round(userData.getTotalPaid() * 100) / 100.0 + \"| Total Interest paid: \" + Math.round(userData.getTotalInterestPaid() * 100) / 100.0 + \"\\n\"\n + otherUserData.getLoanType() + \" total paid amount: \" + Math.round(otherUserData.getTotalPaid() * 100) / 100.0 + \"| Total Interest paid: \" + Math.round(otherUserData.getTotalInterestPaid() * 100) / 100.0 + \"\\n\"\n + \"Difference in total paid:\" + ((userData.getTotalPaid() > otherUserData.getTotalPaid()) ? Math.round((userData.getTotalPaid() - otherUserData.getTotalPaid()) * 100) / 100.0 : Math.round((otherUserData.getTotalPaid() - userData.getTotalPaid()) * 100) / 100.0 )\n + \"\\n\\n|Month| \" + \"|Monthly Payment| \" + \"|Monthly Contribution| \" + \"|Monthly Interest| \" + \"|Left to pay| \\n\\n\" + loanStatementStart;\n\n FileChooser fileChooser = new FileChooser();\n\n FileChooser.ExtensionFilter extensionFilter = new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n fileChooser.getExtensionFilters().add(extensionFilter);\n\n //Show dialog\n File file = fileChooser.showSaveDialog(primaryStage);\n\n if (file != null) {\n saveTextToFile(loanStatement[0], file);\n }\n }\n });\n\n //Handling Show Table button press\n showTable.setOnAction(e ->{\n if(userData.validateInput(loanAmountField, loanTermYearsField, loanTermMonthsField, interestRateField)) {\n userData.setValues(loanAmountField, loanTermYearsField, loanTermMonthsField, loanTypeBox.getValue(), interestRateField);\n userData.calculateLoan();\n if(userData.getLoanType().equals(\"Annuity\")) {\n new LoanTable();\n loanTable.display(\"Annuity Table\", \"Annuity Loan Table\", userData, new BorderPane());\n }\n else {\n new LoanTable();\n loanTable.display(\"Linear Table\", \"Linear Loan Table\", userData, new BorderPane());\n }\n }\n });\n\n //Set up main Border Pane\n mainPane.setCenter(centerGrid);\n mainPane.setBottom(bottomLayout);\n\n Scene primaryScene = new Scene(mainPane, 600, 800);\n\n primaryStage.setScene(primaryScene);\n primaryStage.show();\n }",
"private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n fetchSalaryDetailsFromDB(1,1);\r\n calculate();\r\n \r\n }",
"private void updateDisplay() {\r\n date1.setText(\r\n new StringBuilder()\r\n // Month is 0 based so add 1\r\n .append(pDay).append(\"/\")\r\n .append(pMonth + 1).append(\"/\")\r\n .append(pYear).append(\" \"));\r\n }",
"private void displayOneLoan(ResultSet rs) throws SQLException {\n // Note the two different ways in which to retrieve the value of a column\n // Either by specifying the column number or by specifying the column name\n\n String name = rs.getString(1) + \" \" + rs.getString(2);\n\n System.out.printf(\"%s owns Loan # %s, in the amount of $%.2f\\n\",\n name, rs.getString(3), rs.getFloat(\"amount\"));\n }",
"public void tabelpembayaran(){\n DefaultTableModel tbl = new DefaultTableModel();\n //tbl.addColumn(\"Kode\");\n tbl.addColumn(\"TGL Audit\");\n tbl.addColumn(\"TGL Pembayaran\");\n tbl.addColumn(\"Status\");\n tbl.addColumn(\"Grup\");\n tbl.addColumn(\"Aktivitas\");\n tbl.addColumn(\"JML Anggota\");\n tbl.addColumn(\"HA\");\n tbl.addColumn(\"Gaji PerHA\");\n tbl.addColumn(\"Gaji Anggota\");\n tbl.addColumn(\"Total\");\n tblpembayaran.setModel(tbl);\n try{\n java.sql.Statement statement=(java.sql.Statement)conek.GetConnection().createStatement();\n ResultSet res=statement.executeQuery(\"select * from tblpembayaran\");\n while(res.next())\n {\n tbl.addRow(new Object[]{\n res.getString(\"tanggal_audit\"),\n res.getString(\"tanggal_pembayaran\"), \n res.getString(\"status_pembayaran\"),\n res.getString(\"nama_grup\"),\n res.getString(\"nama_aktivitas\"),\n res.getInt(\"jumlah_anggota\"),\n res.getInt(\"ha\"),\n res.getInt(\"harga\"),\n res.getInt(\"gaji_peranggota\"),\n res.getInt(\"total\")\n });\n tblpembayaran.setModel(tbl); \n }\n }catch (Exception e){\n JOptionPane.showMessageDialog(rootPane,\"Salah\");\n }\n \n }",
"private void populateTable(Bundle savedInstanceState)\n {\n valueViews = new HashMap<String, TextView>();\n frequencyViews = new HashMap<String, TextView>();\n nextLossViews = new HashMap<String, TextView>();\n\n clickedLossesMap = new HashMap<View, MoneyLoss>();\n\n /* Use the bad budget application wide data object to get a hold of all the user's losses */\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n List<MoneyLoss> losses = bbd.getLosses();\n losses = LossesActivity.sortLosses(losses);\n\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n\n /* For each loss we setup a row in our table with the name/description, value/amount,\n frequency, and destination fields.\n */\n for (final MoneyLoss loss : losses) {\n\n final MoneyLoss currLoss = loss;\n\n TableRow row = new TableRow(this);\n\n //Setup the name/description field\n final TextView descriptionView = new TextView(this);\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(descriptionView, currLoss.expenseDescription());\n descriptionView.setPaintFlags(descriptionView.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);\n\n /*\n The description when clicked should take us to a page where the user can edit the\n loss that they clicked on.\n */\n clickedLossesMap.put(descriptionView, currLoss);\n descriptionView.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v)\n {\n MoneyLoss clickedLoss = clickedLossesMap.get(v);\n\n Intent intent = new Intent(LossesActivity.this, AddLossActivity.class);\n intent.putExtra(BadBudgetApplication.EDIT_KEY, true);\n intent.putExtra(BadBudgetApplication.EDIT_OBJECT_ID_KEY, clickedLoss.expenseDescription());\n startActivityForResult(intent, BadBudgetApplication.FORM_RESULT_REQUEST);\n }\n });\n\n //Setup the value field\n final TextView lossAmountView = new TextView(this);\n valueViews.put(currLoss.expenseDescription(), lossAmountView);\n double lossValue = currLoss.lossAmount();\n String lossValueString = BadBudgetApplication.roundedDoubleBB(lossValue);\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(lossAmountView, lossValueString);\n\n //Setup the frequency field\n final TextView frequencyView = new TextView(this);\n frequencyView.setPaintFlags(frequencyView.getPaintFlags()|Paint.UNDERLINE_TEXT_FLAG);\n frequencyViews.put(currLoss.expenseDescription(), frequencyView);\n\n if (currLoss.lossFrequency() != Frequency.oneTime) {\n frequencyView.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v) {\n Frequency currentToggleFreq = BadBudgetApplication.freqFromShortHand(frequencyView.getText().toString());\n Frequency convertToggleFreq = BadBudgetApplication.getNextToggleFreq(currentToggleFreq);\n double toggleAmount = Prediction.toggle(currLoss.lossAmount(), currLoss.lossFrequency(), convertToggleFreq);\n\n frequencyView.setText(BadBudgetApplication.shortHandFreq(convertToggleFreq));\n lossAmountView.setText(BadBudgetApplication.roundedDoubleBB(toggleAmount));\n if (convertToggleFreq != currLoss.lossFrequency()) {\n lossAmountView.setText(lossAmountView.getText() + \" \" + BadBudgetApplication.TEMP_FREQUENCY_AMOUNT_MESSAGE);\n }\n }\n\n });\n }\n String frequencyString;\n if (savedInstanceState == null)\n {\n frequencyString = BadBudgetApplication.shortHandFreq(currLoss.lossFrequency());\n }\n else\n {\n Frequency savedFreq = (Frequency) savedInstanceState.getSerializable(BadBudgetApplication.TOGGLED_FREQUENCY_PREFIX_KEY + currLoss.expenseDescription());\n if (savedFreq != null) {\n frequencyString = BadBudgetApplication.shortHandFreq(savedFreq);\n if (savedFreq != currLoss.lossFrequency()) {\n double toggleAmount = Prediction.toggle(currLoss.lossAmount(), currLoss.lossFrequency(), savedFreq);\n lossAmountView.setText(BadBudgetApplication.roundedDoubleBB(toggleAmount) + \" \" + BadBudgetApplication.TEMP_FREQUENCY_AMOUNT_MESSAGE);\n }\n }\n else\n {\n frequencyString = BadBudgetApplication.shortHandFreq(currLoss.lossFrequency());\n }\n }\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(frequencyView, frequencyString);\n\n //Setup the next loss field.\n TextView nextLossView = new TextView(this);\n nextLossViews.put(currLoss.expenseDescription(), nextLossView);\n\n String nextLossString = BadBudgetApplication.dateString(currLoss.nextLoss());\n\n ((BadBudgetApplication)this.getApplication()).tableCellSetLayoutParams(nextLossView, nextLossString);\n ((BadBudgetApplication)this.getApplication()).tableAdjustBorderForLastColumn(nextLossView);\n\n row.addView(descriptionView);\n row.addView(lossAmountView);\n row.addView(frequencyView);\n row.addView(nextLossView);\n\n table.addView(row);\n }\n\n //Add in the total row and budget row with a toggable frequencies\n if (savedInstanceState == null)\n {\n addBudgetRow(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY);\n addEmptyRow();\n addTotalRow(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY);\n }\n else\n {\n addBudgetRow((Frequency)savedInstanceState.getSerializable(BadBudgetApplication.BUDGET_TOTAL_FREQ_KEY));\n addEmptyRow();\n addTotalRow((Frequency)savedInstanceState.getSerializable(BadBudgetApplication.TOTAL_FREQ_KEY));\n }\n }",
"private void remindersTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_remindersTableMouseClicked\n // define date format for String conversion\n DateFormat df = new SimpleDateFormat(\"MMM dd, yyyy\");\n // pull current table model\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n\n // get boolean value of radio button group (bill/income) & set matching value in form\n if ((model.getValueAt(remindersTable.getSelectedRow(), 0).equals(true))\n || (model.getValueAt(remindersTable.getSelectedRow(), 0).equals(\"true\"))) {\n income_Rad.setSelected(true);\n } else {\n bill_Rad.setSelected(true);\n }\n try {\n // Update dueDate jDateChooser with populated table data\n dueDate_date.setDate(df.parse((String) model.getValueAt(remindersTable.getSelectedRow(), 1)));\n } catch (ParseException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n // Update title jtextField with populated table data\n ToFrom_Txt.setText(model.getValueAt(remindersTable.getSelectedRow(), 2).toString());\n // Update amount jtextField with populated table data\n Amount_Txt.setText(model.getValueAt(remindersTable.getSelectedRow(), 3).toString().replace(\"-\", \"\"));\n // Update category jComboBox with populated table data\n category_comb.setSelectedItem(model.getValueAt(remindersTable.getSelectedRow(), 4).toString());\n // Update frequency jComboBox with populated table data\n frequency_comb.setSelectedItem(model.getValueAt(remindersTable.getSelectedRow(), 5).toString());\n // Update endBy jDateChooser with populated table data\n try {\n endBy_date.setDate(df.parse((String) model.getValueAt(remindersTable.getSelectedRow(), 6)));\n } catch (ParseException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public static double calculateMonthlyPaymentBank(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n // Source : https://www.younited-credit.com/projets/pret-personnel/calculs/calculer-remboursement-pret\n double J = annualRateBank / 12; // Taux d'interet effectif = taux annuel / 12\n\n return amountLoan * (J / (1 - Math.pow(1 + J, - nbOfMonthlyPayment))); // Mensualité\n }",
"public static void show(){\r\n for(int i =0; i<loan.size(); i++){\r\n loan.get(i).calculate();\r\n }\r\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmView.previousMonth();\n\t\t\t\tc.add(Calendar.MONTH, -1);\n\t\t\t\tmonthlyview_month.setText(DateFormat.format(\"d MMMM yyyy\", c));\n\t\t\t\t\t}",
"private static void currentLoan() {\n\t\toutput(\"\");\r\n\t\tfor (loan loan : library.currentLoan()) {// method name changes CURRENT_LOANS to currentLoan() , variable name LIB to library\r\n\t\t\toutput(loan + \"\\n\");\r\n\t\t}\t\t\r\n\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmView.nextMonth();\n\t\t\t\tc.add(Calendar.MONTH, 1);\n\t\t\t\tmonthlyview_month.setText(DateFormat.format(\"d MMMM yyyy\", c));\n\n\t\t\t}",
"private void addadvanceOneMonthButtonFunction() {\n\t\tadvanceOneMonthButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tBank.getInstance().passOneMonth();\n\t\t\t\tsuccess.setText(\"success! One month has passed..\");\n\t\t\t}\t\t\n\t\t});\n\t\t\n\t}",
"@FXML\r\n\tpublic void btnCalculate(ActionEvent event) {\n\t\ttry {\r\n\t\t\tint iYearsToWork = Integer.parseInt(txtYearsToWork.getText());\r\n\t\t\tdouble dAnnualReturnWorking = Double.parseDouble(txtAnnualReturn.getText());\r\n\t\t\tint iYearsRetired = Integer.parseInt(txtYearsRetired.getText());\r\n\t\t\tdouble dAnnualReturnRetired = Double.parseDouble(txtAnnualReturnRetired.getText());\r\n\t\t\tdouble dRequiredIncome = Double.parseDouble(txtRequiredIncome.getText());\r\n\t\t\tdouble dMonthlySSI = Double.parseDouble(txtMonthlySSI.getText());\r\n\t\t\t\r\n\t\t\tif (dAnnualReturnWorking > 1 || dAnnualReturnRetired > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}\r\n\t\tcatch (NumberFormatException e) {\r\n\t\t\ttxtYearsToWork.setText(\"Please clear and enter an integer\");\r\n\t\t\ttxtAnnualReturn.setText(\"Please clear and enter a decimal\");\r\n\t\t\ttxtYearsRetired.setText(\"Please clear and enter an integer\");\r\n\t\t\ttxtAnnualReturnRetired.setText(\"Please clear and enter a decimal\");\r\n\t\t\ttxtRequiredIncome.setText(\"Please clear and enter a double\");\r\n\t\t\ttxtMonthlySSI.setText(\"Please clear and enter a double\");\r\n\t\t}\r\n\t\t\r\n\t\tfinally {\r\n\t\t\tint iYearsToWork = Integer.parseInt(txtYearsToWork.getText());\r\n\t\t\tdouble dAnnualReturnWorking = Double.parseDouble(txtAnnualReturn.getText());\r\n\t\t\tint iYearsRetired = Integer.parseInt(txtYearsRetired.getText());\r\n\t\t\tdouble dAnnualReturnRetired = Double.parseDouble(txtAnnualReturnRetired.getText());\r\n\t\t\tdouble dRequiredIncome = Double.parseDouble(txtRequiredIncome.getText());\r\n\t\t\tdouble dMonthlySSI = Double.parseDouble(txtMonthlySSI.getText());\r\n\t\t\t\r\n\t\t\tRetirement r = new Retirement(iYearsToWork, dAnnualReturnWorking, iYearsRetired, dAnnualReturnRetired, dRequiredIncome, dMonthlySSI);\r\n\t\t\r\n\t\t\tTotalSaved.setDisable(false);\r\n\t\t\tSaveEachMonth.setDisable(false);\r\n\t\t\tString month = String.format(\"$%.2f\", r.AmountToSave());\r\n\t\t\tString total = String.format(\"$%.2f\", r.TotalAmountSaved());\r\n\t\t\tSaveEachMonth.setText(month);\r\n\t\t\tTotalSaved.setText(total);\r\n\t\t\tTotalSaved.setDisable(true);\r\n\t\t\tSaveEachMonth.setDisable(true);\r\n\t\t}\r\n\t\t\r\n\t}",
"private void updateDisplay() {\r\n\t\tbtnBirthDate.setText(new StringBuilder()\r\n\t\t// Month is 0 based so add 1\r\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\").append(mYear).append(\" \"));\r\n\t}",
"public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }",
"@Test\n public void testHomeLoanCalculator() {\n LoanTerms loanTerms = new LoanTerms(10, 50000, LoanType.ING, 28, 1000, 8000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$2,771.81\"));\n }",
"public void finalDisplay1()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display1 algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"public static void monthlyPayment()\n\t{\n\t\tSystem.out.println(\"enter principal loan amount, years , and rate of interest\");\n\t\tfloat principal = scanner.nextFloat();\n\t\tfloat years = scanner.nextFloat();\n\t\tfloat rate = scanner.nextFloat();\n\t\t\n\t\tfloat n = 12 * years;\n\t\tfloat r = rate / (12*100);\n\t\tdouble x = Math.pow(1+rate,(-n));\t\n\t\t\n\t\tdouble payment = (principal*r) / (1-x);\n\t\tSystem.out.println(\"monthly payment is: \" + payment);\n\t}",
"public void finalDisplay()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"@Override\n public void onClick(View v) {\n currentCalendar.add(Calendar.MONTH, 1);\n //drawMonth(workingDays);\n //drawMonth(workingDays, holidays);\n Log.i(\"***********\", \"DrawMonth called on nextmonth\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble investment = Double.parseDouble(Inv_amount.getText());\r\n\t\t\t\tdouble years = Double.parseDouble(YEARS.getText());\r\n\t\t\t\tdouble annual_interest_rate = Double.parseDouble(RATE.getText());\r\n\t\t\t\tCalculate total = new Calculate();\r\n\t\t\t\tcalc_total = total.get_future(investment, years, annual_interest_rate);\r\n\t\t\t\tFUTURE.setText(\"$\" +calc_total);\t\r\n\t\t\t}",
"private void refreshTableForEdit()\n {\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n TextView frequencyView = frequencyViews.get(loss.expenseDescription());\n TextView nextLossView = nextLossViews.get(loss.expenseDescription());\n\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n frequencyView.setText(BadBudgetApplication.shortHandFreq(loss.lossFrequency()));\n nextLossView.setText(BadBudgetApplication.dateString(loss.nextLoss()));\n }\n\n double total = getLossTotal(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY);\n this.totalAmountView.setText(BadBudgetApplication.roundedDoubleBB(total));\n this.totalFreqView.setText(BadBudgetApplication.shortHandFreq(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY));\n\n //Should also reset the budget row to the default freq\n double budgetTotal = BudgetSetActivity.getBudgetItemTotal(this, BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY);\n this.budgetAmountView.setText(BadBudgetApplication.roundedDoubleBB(budgetTotal));\n this.budgetFreqView.setText(BadBudgetApplication.shortHandFreq(BadBudgetApplication.DEFAULT_TOTAL_FREQUENCY));\n }",
"public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }",
"static int loanHelper(int principle,double interest,int payment,int month) {\n\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\tmonth++;\n\t\treturn 1+ loanHelper((int) (((principle)*(1+interest/12))-payment), interest, payment,month);\n\n\n\n\t}",
"public void populateDonorsJTable(){\n \n \n Calculator c = new Calculator();\n DefaultTableModel model = (DefaultTableModel) donorsJTable.getModel();\n donorsJTable.setAutoCreateRowSorter(true);\n model.setRowCount(0);\n \n for(Organization o: ent.getOrganizationDirectory().getOrganizationList()){\n// Organization o=(DonorOrganization) org;\n if(o instanceof DonorOrganization){\n DonorOrganization or=(DonorOrganization) o;\n// for(UserAccount acct :org.getUserAccountDirectory().getUserAccountList()){\n// account=acct;\n for (Employee e : or.getEmployeeDirectory().getEmployeeList()){\n \n Object[] em = new Object[1];\n em[0]=e.getName();\n \n \n if(!em[0].equals(account.getUsername())){\n \n donor = (Donor)e;\n if(donor.getBloodDetails().getBloodType().equals(bloodType)){\n// if(distance>c.calculateDistance(lat1,lon1,donor.getDetails().getLatitude(),donor.getDetails().getLongitude())){\n Object[] row = new Object[8];\n row[0] = e.getName();\n row[1]= account.getUsername();\n row[2] = c.calculateDistance(lat1,lon1,donor.getDetails().getLatitude(),donor.getDetails().getLongitude());\n row[3] = donor.getDetails().getLatitude();\n row[4] = donor.getDetails().getLongitude();\n row[5]=lat1;\n row[6]=lon1;\n row[7]=donor.getDetails().getLocation();\n model.addRow(row);\n// }\n }\n }\n \n \n \n }\n \n }\n \n }\n \n }",
"public void loadInTable(){\n table_counter=1; //id_array\r\n String sid=jTextField1.getText();\r\n// String d1=jTextField7.getText();\r\n// String d2=jTextField8.getText();\r\n // String sql = \"select item_id, item_name,item_type,type,price,Quantity from item2 where type='veg'\";\r\n //String sql = \"select sa_id,date1, w_type,working_hours,overtime,payment from staffattendance \";\r\n // String sql = \"select sa_id,date1, w_type,working_hours,overtime,payment from staffattendance where staff_id='\"+sid+\"'And date1 between '\"+d1+\"' And '\"+d2+\"' ORDER BY date1\";\r\n // String sql = \"select sa_id,date1, w_type,working_hours,overtime,payment from staffattendance where staff_id='\"+sid+\"'And date1 between '\"+dateString1+\"' And '\"+dateString2+\"' ORDER BY date1\";\r\n try{\r\n ConItem cn1=new ConItem();\r\n // Connection con = (Connection) Action.getDBConnection();\r\n cn1. st = cn1. con.createStatement();\r\n // cn1. rs = cn1.st.executeQuery(sql);\r\n DefaultTableModel model = (DefaultTableModel) stafftable.getModel();\r\n model.setRowCount(0);\r\n Object data[] = new Object[6];\r\n double total=0, payment;\r\n while(cn1.rs.next())\r\n {\r\n id_array.add(cn1.rs.getObject(\"sa_id\"));\r\n data[0] = table_counter+\"\";\r\n data[1] = cn1.rs.getObject(\"date1\");\r\n data[2] =cn1. rs.getObject(\"w_type\");\r\n data[3] = cn1.rs.getObject(\"working_hours\");\r\n data[4] = cn1.rs.getObject(\"overtime\");\r\n payment=cn1.rs.getDouble(\"payment\");\r\n data[5] = payment+\"\";\r\n model.addRow(data);\r\n total+=payment;\r\n table_counter++;\r\n \r\n }\r\n cn1.rs.close();\r\n cn1.st.close();\r\n jTextField9.setText(total+\"\");\r\n GlobalVariable.gpayment=total;\r\n \r\n }catch(Exception e)\r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n }",
"@Test\n public void testDecimalAutoLoan() {\n LoanTerms loanTerms = new LoanTerms(30, 500000, LoanType.SCB, 40, 3000, 21000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$466.15\"));\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jComboBox2 = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Dialog\", 0, 18));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"PAYMENT DETAILS (MONTH WISE)\");\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"EBILL_ID\", \"NAME\", \"BILL TYPE\", \"BILL AMOUNT\", \"DATE\", \"CREDIT CARD NO.\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"JANUARY\", \"FEBUARY\", \"MARCH\", \"APRIL\", \"MAY\", \"JUNE\", \"JULY\", \"AUGUST\", \"SEPTEMBER\", \"OCTOBER\", \"NOVEMBER\", \"DECEMBER\" }));\n\n jButton1.setFont(new java.awt.Font(\"Monospaced\", 1, 18));\n jButton1.setText(\"SHOW\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Impact\", 0, 14));\n jLabel2.setText(\"CHOOSE YOUR MONTH\");\n\n jButton2.setFont(new java.awt.Font(\"Palatino Linotype\", 1, 12));\n jButton2.setText(\"<<PREVIOUS\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setFont(new java.awt.Font(\"Monospaced\", 1, 18));\n jButton3.setText(\"CLEAR\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jLabel4.setIcon(new javax.swing.ImageIcon(\"E:\\\\project of ip students 2012-2013\\\\navita\\\\e-billing\\\\online-shopping.jpg\")); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(145, 145, 145)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 508, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(872, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(255, 255, 255)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(195, 195, 195)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 711, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(62, 62, 62)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(196, 196, 196)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(712, 712, 712))))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(1376, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addComponent(jLabel2)\n .addGap(55, 55, 55)\n .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2))\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(33, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public void loanStatament(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\n//p.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }",
"public static double calculateMonthlyPaymentTotal(double amountLoan, double annualRateBank, double annualRateInsurance, int nbOfMonthlyPayment){\n double monthlyPaymentBank = calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment);\n double monthlyPaymentInsurance = calculateMonthlyPaymentInsuranceOnly(amountLoan, annualRateInsurance);\n\n return monthlyPaymentBank + monthlyPaymentInsurance;\n }",
"public LoanMonthlyPayment calculateMonthlyPayment() {\n double monthlyInterest = loanRequest.getApr() / MONTHLY_INTEREST_DIVISOR;\n double tmp = Math.pow(1d + monthlyInterest, -1);\n tmp = Math.pow(tmp, loanRequest.getTermInMonths());\n tmp = Math.pow(1d - tmp, -1);\n return new LoanMonthlyPayment(\n monthlyInterest, loanRequest.getAmountBorrowed() * monthlyInterest * tmp\n );\n }",
"public void bRevDetailsActionPerformed() {\n try {\n Date today = new Date();\n Calendar cal = new GregorianCalendar();\n cal.setTime(today);\n cal.add(Calendar.DAY_OF_MONTH, +30);\n Date today30 = cal.getTime();\n String day30 = formatter.format(today30.getTime());\n ResultSet rs = DBControl.getResultFromLocalDB(\"SELECT * FROM fas_details WHERE '\" + day30 + \"' > veh_rev_exp AND veh_rev_exp != '\" + nul + \"' ORDER BY veh_rev_exp\");\n DefaultTableModel dtm = (DefaultTableModel) tblRevenue.getModel();\n dtm.setRowCount(0);\n while (rs.next()) {\n Vector v = new Vector();\n v.add(rs.getString(\"equipment_no\"));\n v.add(rs.getString(\"registration_no\"));\n v.add(rs.getString(\"veh_rev_no\"));\n v.add(rs.getString(\"veh_rev_issue\"));\n v.add(rs.getString(\"veh_rev_exp\"));\n dtm.addRow(v);\n }\n } catch (Exception ex) {\n Logger.getLogger(fas_reports.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void getSum() {\n double sum = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n sum = sum + parseDouble(remindersTable.getValueAt(i, 3).toString());\n }\n String rounded = String.format(\"%.2f\", sum);\n ledgerTxtField.setText(rounded);\n }",
"public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }",
"private void histBtnActionPerformed(java.awt.event.ActionEvent evt) {\n rentTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n\n DefaultTableModel rentalTable = (DefaultTableModel) rentTable.getModel();\n\n Object row[];\n for (int x = 0; x < rentalsList.size(); x++) {\n row = new Object[4];\n row[0] = rentalsList.get(x).getRentalNumber();\n row[1] = rentalsList.get(x).getDateRental();\n row[2] = rentalsList.get(x).getDateReturned();\n row[3] = \"R\" + rentalsList.get(x).getTotalRental();\n\n rentalTable.addRow(row);\n }\n\n }",
"public void updateDisplay(View view) {\n if(!EditText_isEmpty(total_bill) && !EditText_isEmpty(tip)) {\n float total_bill_value = Float.valueOf(total_bill.getText().toString());\n float tip_value = Float.valueOf(tip.getText().toString());\n float total_to_pay_value = total_bill_value * (1+tip_value/100);\n total_to_pay.setText(\"$\" + String.format(\"%.2f\", total_to_pay_value));\n\n float total_tip_value = total_bill_value * (tip_value/100);\n total_tip.setText(\"$\" + String.format(\"%.2f\", total_tip_value));\n\n if(!EditText_isEmpty(split_bill)) {\n float split_bill_value = Float.valueOf(split_bill.getText().toString());\n float total_per_person_value = total_to_pay_value/split_bill_value;\n total_per_person.setText(\"$\" + String.format(\"%.2f\", total_per_person_value));\n }\n }\n else {\n total_to_pay.setText(\"\");\n total_tip.setText(\"\");\n total_per_person.setText(\"\");\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tp = Float.parseFloat(InterestCalc.this.Principal.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tr = Float.parseFloat(InterestCalc.this.Rate.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tn = Float.parseFloat(InterestCalc.this.Years.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tf = Float.parseFloat(InterestCalc.this.Freq.getText()\n\t\t\t\t\t\t.toString());\n\t\t\t\tr = (float) (r / (f * 100));\n\t\t\t\ta = (float) (p * Math.pow((1 + r), (f * n)));\n\t\t\t\ts = String.valueOf(a);\n\n\t\t\t\tans.setText(s);\n\t\t\t}",
"public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}",
"public LibraryManagementSystem() {\n initComponents();\n \n jButton1.addActionListener(this);\n jButton2.addActionListener(this);\n jButton3.addActionListener(this);\n jButton4.addActionListener(this);\n jButton5.addActionListener(this);\n jButton6.addActionListener(this);\n jButton7.addActionListener(this);\n jButton8.addActionListener(this); \n jButton9.addActionListener(this);\n \n \n \n String[] ColumnNamesforCheckIn = {\"Loan ID\",\"Book ID\",\"Branch ID\",\"Card Number\",\"Date out\",\"Due date\",\"Date in\"};\n model = new DefaultTableModel(ColumnNamesforCheckIn, 0); \n tableForBookCheckIn = new JTable(model); \n frameForBookCheckIn = new JFrame(\"Books Borrowed\");\n frameForBookCheckIn.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); \n frameForBookCheckIn.setSize(400,400);\n \n \n String[] ColumnNamesforFine = {\"Card Number\",\"Total Fine($)\",\"Paid\"};\n model1 = new DefaultTableModel(ColumnNamesforFine, 0); \n tableForFine = new JTable(model); \n frameForFine = new JFrame(\"Fines\");\n frameForFine.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); \n frameForFine.setSize(400,400);\n \n String[] ColumnNamesforPayFine = {\"Card Number\",\"Loan ID\",\"Fine($)\",\"Paid\"};\n model2 = new DefaultTableModel(ColumnNamesforPayFine, 0); \n tableForPayFine = new JTable(model2); \n frameForPayFine = new JFrame(\"Pay Fine\");\n frameForPayFine.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); \n frameForPayFine.setSize(400,400);\n \n \n }",
"public void llenarTabla(ResultSet resultadoCalificaciones) throws SQLException {\n totaldeAlumnos = 0;\n\n int total = 0;\n while (resultadoCalificaciones.next()) {\n total++;\n }\n resultadoCalificaciones.beforeFirst();\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n while (resultadoCalificaciones.next()) {\n modelo.addRow(new Object[]{\n (totaldeAlumnos + 1),\n resultadoCalificaciones.getObject(1).toString(),\n resultadoCalificaciones.getObject(2).toString(),\n resultadoCalificaciones.getObject(3).toString(),\n resultadoCalificaciones.getObject(4).toString(),\n resultadoCalificaciones.getObject(5).toString()\n });\n\n totaldeAlumnos++;\n\n }\n if (total == 0) {\n JOptionPane.showMessageDialog(rootPane, \"NO SE ENCONTRARON ALUMNOS\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\n }",
"public void printMonthlySummary() {\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n System.out.println(\"------- Total Rolls Sold -------\");\r\n double totalRollsSold = totalRollSales.get(\"egg\") + totalRollSales.get(\"jelly\") + totalRollSales.get(\"pastry\") + totalRollSales.get(\"sausage\") + totalRollSales.get(\"spring\");\r\n double egg = totalRollSales.get(\"egg\");\r\n double jelly = totalRollSales.get(\"jelly\");\r\n double pastry = totalRollSales.get(\"pastry\");\r\n double sausage = totalRollSales.get(\"sausage\");\r\n double spring = totalRollSales.get(\"spring\");\r\n System.out.println(\"Total Rolls Sold: \" + totalRollsSold);\r\n System.out.println(\"Total EggRolls Sold: \" + egg);\r\n System.out.println(\"Total JellyRolls Sold: \" + jelly);\r\n System.out.println(\"Total PastryRolls Sold: \" + pastry);\r\n System.out.println(\"Total SausageRolls Sold: \" + sausage);\r\n System.out.println(\"Total SpringRolls Sold: \" + spring);\r\n System.out.println(\"\");\r\n \r\n\r\n System.out.println(\"------- Total Monthly Income -------\");\r\n double totalSales = 0; \r\n totalSales = totalCustomerSales.get(\"Casual\") + totalCustomerSales.get(\"Business\") + totalCustomerSales.get(\"Catering\"); \r\n System.out.println(\"\");\r\n System.out.println(\"------- Total Roll Outage Impacts -------\");\r\n System.out.println(totalShortageImpact);\r\n }",
"private void refreshTableForUpdate()\n {\n //Was updating the values but don't believe this is necessary, as like budget items\n //a loss amount will stay the same unless changed by the user (later on it might be the\n //case that it can increase/decrease by a percentage but not now...)\n /*\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n }\n */\n }",
"private void updateDisplay() { \n\t \tmDateDisplay.setText( \n\t \t\t\tnew StringBuilder()\n\t \t\t\t.append(mYear).append(\"/\")\n\t \t\t\t// Month is 0 based so add 1 \n\t \t\t\t.append(mMonth + 1).append(\"/\") \n\t \t\t\t.append(mDay).append(\" \")); \n\t \t\t\t \n\t \t\t\t \n\t \t\t\t \n\t }",
"private void updateDisplay(int year, int month, int day) {\n\t\tDate = new StringBuilder().append(month + 1).append(\"-\").append(day).append(\"-\").append(year).append(\" \").toString();\r\n\t\tSystem.out.println(\"BirthDate==>\" + Date);\r\n\t\t btnBirthDate.setText(fun.getBirthDate(String.valueOf(month+1),String.valueOf(day),String.valueOf(year)));\r\n\t\t//btnBirthDate.setText(new StringBuilder().append(month + 1).append(\"-\").append(day).append(\"-\").append(year).append(\" \").toString());\r\n\t\t// Date=new StringBuilder().append(month + 1).append(\"-\").append(day).append(\"-\").append(year).append(\" \").toString();\r\n\t}",
"public void actionPerformed(ActionEvent evt){ ////klik ALT+ENTER -> import actionPerformed ->TOP\n String nol_bulan=\"\";\n String nol_hari=\"\";\n String nol_jam=\"\";\n String nol_menit=\"\";\n String nol_detik=\"\";\n Calendar dt=Calendar.getInstance(); ////untuk mengambil informasi waktu\n \n int nilai_jam=dt.get(Calendar.HOUR_OF_DAY); ////3.Calendar.HOUR_OF_DAY digunakan untuk settingan jam\n int nilai_menit=dt.get(Calendar.MINUTE); ////4.Calendar.MINUTE digunakan untuk settingan menit\n int nilai_detik=dt.get(Calendar.SECOND); ////5.Calendar.SECOND digunakan untuk settingan detik\n \n \n if(nilai_jam<=9){\n nol_jam=\"0\";\n }\n if(nilai_menit<=9){\n nol_menit=\"0\";\n }\n if(nilai_detik<=9){\n nol_detik=\"0\";\n }\n \n String jam=nol_jam+Integer.toString(nilai_jam);\n String menit=nol_menit+Integer.toString(nilai_menit);\n String detik=nol_detik+Integer.toString(nilai_detik);\n jammm.setText(jam+\":\"+menit+\":\"+detik); ////6.Label dengan variabel \"jammm\" akan berubah sesuai settingan jam menit dan detik\n\n }",
"private void updateDisplay() \n\t{\n\t\t// updates the date in the TextView\n if(bir.hasFocus())\n {\n\t\tbir.setText(\n\t\t\t\tnew StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t\n\t\t\t\t.append(mDay).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \"));\n }else\n {\n\t\taniv.setText(\n\t\t\t\tnew StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t\n\t\t\t\t.append(mDay).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \"));\n }\n\n\n\t}",
"private void getSpendingData() {\n mort = 0;\n cred = 0;\n loan = 0;\n auto = 0;\n groc = 0;\n medi = 0;\n util = 0;\n ente = 0;\n othe = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (remindersTable.getValueAt(i, 0).toString().equals(\"true\")) {\n // do nothing...we want spending only\n } else {\n switch (remindersTable.getValueAt(i, 4).toString()) {\n case (\"mortgage\"):\n mort = mort + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"credit\"):\n cred = cred + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"loans\"):\n loan = loan + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"auto\"):\n auto = auto + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"utilities\"):\n util = util + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"grocery\"):\n groc = groc + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"medical\"):\n medi = medi + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"entertainment\"):\n ente = ente + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n case (\"other\"):\n othe = othe + parseDouble(remindersTable.getValueAt(i, 3).toString()) * -1;\n break;\n default:\n // no match ... do nothing \n }\n }\n }\n }",
"private void challengeRefresh() {\n String name = DBGetChallenge.name(key1OfActiveChallenge);\n challengeName.setText(name);\n\n challengeDaysRunningView.setText(\"Tag \" + challengeDaysRunning);\n\n goal = DBGetChallenge.goal(key1OfActiveChallenge);\n String goalFormated = String.format(floatNumberFormatPreset, goal);\n activeChallengeGoal.setText(goalFormated + \" €/ Day\");\n\n sumOfExpenses = DBGetExpenses.dailySum(key1OfActiveChallenge, currentDate);\n String sumFormated = String.format(floatNumberFormatPreset, sumOfExpenses);\n Log.v(\"SUM\", \" Summe \" + sumFormated);\n moneySpendToday.setText(sumFormated + \" €\");\n\n String dateFormeted = UtilFormatTimeStamp.fromSimpleDateFormatToGerman(currentDate);\n dateOfActiveChallenge.setText(dateFormeted);\n\n moneyLeft = goal - sumOfExpenses + carry;\n String moneyLeftFormeted = String.format(floatNumberFormatPreset, moneyLeft);\n\n if (moneyLeft < 0)\n moneyLeftToday.setTextColor(Color.RED);\n else\n moneyLeftToday.setTextColor(Color.GREEN);\n moneyLeftToday.setText(moneyLeftFormeted + \" €\");\n\n /*\n String carryFormated = String.format(floatNumberFormatPreset, carry);\n if (carry < 0)\n addCarryField.setTextColor(Color.RED);\n else\n addCarryField.setTextColor((Color.GREEN));\n\n addCarryField.setText(carryFormated + \" €\");\n */\n\n // Show target goal until this day and actual sum of money spend...\n float actualSumOfExpenses = DBGetExpenses.totalSumOfExpenses(key1OfActiveChallenge);\n String actualFormated = String.format(floatNumberFormatPreset, actualSumOfExpenses);\n actualForCurrentChallengeView.setText(actualFormated + \" €\");\n\n float targetSumOfExpenses = goal * challengeDaysRunning;\n String targetFormated = String.format(floatNumberFormatPreset, targetSumOfExpenses);\n targetForCurrentChallengeView.setText(targetFormated + \" €\");\n\n float totalBalance = targetSumOfExpenses - actualSumOfExpenses;\n String totalBalanceFormated = String.format(floatNumberFormatPreset, totalBalance);\n totalBalanceView.setText(totalBalanceFormated + \" €\");\n\n if (actualSumOfExpenses > targetSumOfExpenses) {\n totalBalanceView.setTextColor(Color.RED);\n actualForCurrentChallengeView.setTextColor(Color.RED);\n\n } else {\n totalBalanceView.setTextColor(Color.GREEN);\n actualForCurrentChallengeView.setTextColor(Color.GREEN);\n }\n }",
"@Override\n public void onClick(View v) {\n float calculate = Float.valueOf(et_cal.getText().toString().trim());\n Float mutiply = Float.parseFloat(sub);\n\n float x = (float) (calculate * mutiply);\n\n result.setText(calculate+\"\"+\" USD = \"+x+\"\" + \" MMK\");\n date.setText(\"Indicative Rate as on \"+date_time);\n btnOk.setVisibility(View.VISIBLE);\n\n // Toast.makeText(getActivity(),\"work\",Toast.LENGTH_SHORT).show();\n\n\n\n }",
"public static double calculateMonthlyPaymentWithNotRate(double amountLoan, int nbOfMonthlyPayment){\n return amountLoan / nbOfMonthlyPayment;\n }",
"private void billing_calculate() {\r\n\r\n // need to search patient before calculating amount due\r\n if (billing_fullNameField.equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"Must search for a patient first!\\nGo to the Search Tab.\",\r\n \"Need to Search Patient\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if (MainGUI.pimsSystem.lookUpAppointmentDate(currentPatient).equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"No Appointment to pay for!\\nGo to Appointment Tab to make one.\",\r\n \"Nothing to pay for\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n // patient has been searched - get info from patient info panel\r\n else {\r\n\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n // patient has a policy, amount due is copay: $50\r\n // no policy, amount due is cost amount\r\n double toPay = MainGUI.pimsSystem.calculate_charge(currentPatient, billing_codeCB.getSelectedItem().toString());\r\n billing_amtDueField.setText(\"$\" + doubleToDecimalString(toPay));\r\n\r\n\r\n\r\n JOptionPane.showMessageDialog(this, \"Amount Due Calculated.\\nClick \\\"Ok\\\" to go to Payment Form\",\r\n \"Calculate\", JOptionPane.DEFAULT_OPTION);\r\n\r\n paymentDialog.setVisible(true);\r\n }\r\n\r\n }",
"public void updateLabels() {\n\t\t//if credit less than 9 add 0 in front of the credit value \n\t\tif (obj.getCredit() < 10)\n\t\t\tcreditLabel.setText(\"0\" + String.valueOf(obj.getCredit()));\n\t\telse\n\t\t\tcreditLabel.setText(String.valueOf(obj.getCredit()));\n\t\t//if bet less than 9 add 0 in front of the credit value\n\t\tif (obj.getBet() < 10)\n\t\t\tbetLebal.setText(\"0\" + String.valueOf(obj.getBet()));\n\t\telse\n\t\t\tbetLebal.setText(String.valueOf(obj.getBet()));\n\t}",
"public void bldCrtnDspl() {\r\n ArrayList<PtkCarton> ptkCrtnList;\r\n ObservableList<PickTicketDetailByCartonRow> ptktCrtnDetailRow = FXCollections.observableArrayList();\r\n ptkCrtnList = ptktsum.getPtkCartonList();\r\n BigDecimal totU = BigDecimal.ZERO;\r\n BigDecimal totD = BigDecimal.ZERO;\r\n BigDecimal ptkSv = BigDecimal.ZERO;\r\n int totCtn = 0;\r\n int totPck = 0;\r\n Locale enUSLocale\r\n = new Locale.Builder().setLanguage(\"en\").setRegion(\"US\").build();\r\n NumberFormat currencyFormatter\r\n = NumberFormat.getCurrencyInstance(enUSLocale);\r\n DecimalFormat numFormatter = new DecimalFormat(\"#,###\");\r\n\r\n for (PtkCarton ptkCrt : ptkCrtnList) {\r\n if (fltrPtktCrt(ptkCrt)) {\r\n ptktCrtnDetailRow.add(new PickTicketDetailByCartonRow(ptkCrt));\r\n if (ptkSv.compareTo(ptkCrt.getPtktNo()) != 0) {\r\n totPck++;\r\n ptkSv = ptkCrt.getPtktNo();\r\n }\r\n totU = totU.add(ptkCrt.getTotu());\r\n totD = totD.add(ptkCrt.getTotd());\r\n totCtn++;\r\n }\r\n }\r\n lblPtkCnt.setText(numFormatter.format(totPck));\r\n lblTotU.setText(numFormatter.format(totU));\r\n lblTotD.setText(currencyFormatter.format(totD));\r\n lblCtnCnt.setText(numFormatter.format(totCtn));\r\n if (!ptktCrtnDetailRow.isEmpty()) {\r\n btnExport.setDisable(false);\r\n }\r\n\r\n tcPtkt.setCellValueFactory(cellData -> cellData.getValue().getPtktNo());\r\n tcCrtn.setCellValueFactory(cellData -> cellData.getValue().getCrtnNo().asObject());\r\n tcCrtn.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double crtn, boolean empty) {\r\n super.updateItem(crtn, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"#########\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n setText(numFormatter.format(crtn));\r\n }\r\n }\r\n });\r\n tcOrder.setCellValueFactory(cellData -> cellData.getValue().getOrdNo());\r\n tcSoldTo.setCellValueFactory(cellData -> cellData.getValue().getSoldTo());\r\n tcShipTo.setCellValueFactory(cellData -> cellData.getValue().getShipTo());\r\n tcCustNam.setCellValueFactory(cellData -> cellData.getValue().getCusName());\r\n tcShpNam.setCellValueFactory(cellData -> cellData.getValue().getShpName());\r\n tcOrTyp.setCellValueFactory(cellData -> cellData.getValue().getOrdType());\r\n tcShipVia.setCellValueFactory(cellData -> cellData.getValue().getsVia());\r\n tcWhse.setCellValueFactory(cellData -> cellData.getValue().getWhse());\r\n tcSku.setCellValueFactory(cellData -> cellData.getValue().getTotSku().asObject());\r\n tcUnits.setCellValueFactory(cellData -> cellData.getValue().getUnits().asObject());\r\n tcUnits.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double units, boolean empty) {\r\n super.updateItem(units, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"###,###,###\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n setText(numFormatter.format(units));\r\n }\r\n }\r\n });\r\n tcDollars.setCellValueFactory(cellData -> cellData.getValue().getDollars().asObject());\r\n tcDollars.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double dlrs, boolean empty) {\r\n DecimalFormat numFormatter = new DecimalFormat(\"$#,###.00\");\r\n super.updateItem(dlrs, empty);\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n setText(numFormatter.format(dlrs));\r\n }\r\n }\r\n });\r\n tcStat.setCellValueFactory(cellData -> cellData.getValue().getStatus());\r\n tcCtnStat.setCellValueFactory(ctData -> ctData.getValue().getCtnStat());\r\n tcStDat.setCellValueFactory(value -> value.getValue().getStgSDate().asObject());\r\n tcStDat.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double stDat, boolean empty) {\r\n super.updateItem(stDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(stDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcStTim.setCellValueFactory(cellData -> cellData.getValue().getStgSTime().asObject());\r\n tcStTim.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double stTim, boolean empty) {\r\n super.updateItem(stTim, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sTim = numFormatter.format(stTim);\r\n String sHr = sTim.substring(0, 2);\r\n String sMn = sTim.substring(2, 4);\r\n String sSec = sTim.substring(4, 6);\r\n setText(sHr + ':' + sMn + ':' + sSec);\r\n }\r\n }\r\n });\r\n tcCtnCmpDat.setCellValueFactory(ctData -> ctData.getValue().getStgCmpDat().asObject());\r\n tcCtnCmpDat.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double cmpDat, boolean empty) {\r\n super.updateItem(cmpDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n if (cmpDat == 0) {\r\n setText(\"\");\r\n } else {\r\n String sDat = numFormatter.format(cmpDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n }\r\n });\r\n tcCtnCmpTim.setCellValueFactory(cData -> cData.getValue().getStgCmpTim().asObject());\r\n tcCtnCmpTim.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double cmpTim, boolean empty) {\r\n super.updateItem(cmpTim, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"000000\");\r\n if (empty || cmpTim == 0) {\r\n setText(null);\r\n } else {\r\n String sTim = numFormatter.format(cmpTim);\r\n String sHr = sTim.substring(0, 2);\r\n String sMn = sTim.substring(2, 4);\r\n String sSec = sTim.substring(4, 6);\r\n setText(sHr + ':' + sMn + ':' + sSec);\r\n }\r\n }\r\n });\r\n tcDur.setCellValueFactory(cellData -> cellData.getValue().getDur().asObject());\r\n tcDur.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Long>() {\r\n @Override\r\n public void updateItem(Long dur, boolean empty) {\r\n super.updateItem(dur, empty);\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n long hrs = (long) dur / 3600;\r\n int min = (int) (dur % 3600) / 60;\r\n\r\n setText(String.format(\"%d Hrs %d Min\", hrs, min));\r\n }\r\n }\r\n });\r\n tcOpr.setCellValueFactory(cellData -> cellData.getValue().getOperator());\r\n tcStrDt.setCellValueFactory(cellData -> cellData.getValue().getOrStrDt().asObject());\r\n tcStrDt.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double stDat, boolean empty) {\r\n super.updateItem(stDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(stDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcCmpDt.setCellValueFactory(cellData -> cellData.getValue().getOrCmpDt().asObject());\r\n tcCmpDt.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double cmpDt, boolean empty) {\r\n super.updateItem(cmpDt, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(cmpDt);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcPrtDt.setCellValueFactory(cellData -> cellData.getValue().getPrtDate().asObject());\r\n tcPrtDt.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double prtDat, boolean empty) {\r\n super.updateItem(prtDat, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"00000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sDat = numFormatter.format(prtDat);\r\n String sYr = sDat.substring(0, 4);\r\n String sMo = sDat.substring(4, 6);\r\n String sDa = sDat.substring(6, 8);\r\n setText(sMo + \"/\" + sMo + \"/\" + sYr);\r\n }\r\n }\r\n });\r\n tcPrtTime.setCellValueFactory(cellData -> cellData.getValue().getPrtTime().asObject());\r\n tcPrtTime.setCellFactory(col -> new TableCell<PickTicketDetailByCartonRow, Double>() {\r\n @Override\r\n public void updateItem(Double prtTime, boolean empty) {\r\n super.updateItem(prtTime, empty);\r\n DecimalFormat numFormatter = new DecimalFormat(\"000000\");\r\n if (empty) {\r\n setText(null);\r\n } else {\r\n String sTim = numFormatter.format(prtTime);\r\n String sHr = sTim.substring(0, 2);\r\n String sMn = sTim.substring(2, 4);\r\n String sSec = sTim.substring(4, 6);\r\n setText(sHr + ':' + sMn + ':' + sSec);\r\n }\r\n }\r\n });\r\n\r\n tblPtkDtl.setItems(ptktCrtnDetailRow);\r\n\r\n }",
"private void updateDateDisplay() {\n\t\tStringBuilder date = new StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \");\n\n\t\tchangeDateButton.setText(date);\t\n\t}",
"public void finalDisplay2()\n\t{\n\t\tString s1=null;\n\t\tint sum=0;\n\t\tint j;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tj=rowLabel[i];\t\t\t\n\t\t\tsum+=temp[i][j];\t\n\t\t}\n\t\ts1=\"There are multiple solutions with the cost of \"+sum;\n\t\tJTable t = new JTable();\n testTableMultiple(t,(2*noOfPeople)+2);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}",
"public void populateTable() {\n DefaultTableModel dtm = (DefaultTableModel)tblSalesPersonCommision.getModel();\n dtm.setRowCount(0);\n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getSalesPersonOrder()){\n // for(Order order:salesperson.getOrderListSalesPerson().getOrderList()){ \n // for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n // for(SalesPerson salesperson :business.getEmployeedirectory().getSalesPersonList()){\n \n for(OrderList orderlist:salesperson.getOrderlistcatalog().getOrCatalog()){\n Object [] row = new Object[4];\n // row[0]=.getCustomer().getCustomerId();\n // row[1]= market.getCustomer().getCustomerName();\n row[0]=orderlist;\n row[1]=orderlist.getOrdertotalprice();\n row[2]=orderlist.getSalespersoncomission();\n row[3]=orderlist.getTotalorderlistquantity();\n //3 tcomission = tcomission + orderlist.getSalespersoncomission();\n //3 totalquantity = totalquantity + orderlist.getTotalorderlistquantity();\n //3 totalorderprice = totalorderprice + orderlist.getOrdertotalprice();\n \n // row[0]=order;\n // row[1]=order.getAmountprice();\n \n dtm.addRow(row);\n // }\n // }\n } \n //2 salesperson.getOrderlistcatalog().setTotalquantitypersalesperson(totalquantity);\n //2 salesperson.getOrderlistcatalog().setTotalcommision(tcomission);\n //2 salesperson.getOrderlistcatalog().setTotalorderlistcsatalogprice(totalorderprice);\n}",
"private int adjustLoan(PreparedStatement updateLoan, int loanNumber, float adjustedLoanAmount) throws SQLException {\n updateLoan.setFloat(1, adjustedLoanAmount);\n updateLoan.setInt(2, loanNumber);\n return updateLoan.executeUpdate(); // TODO: call to executeUpdate on a PreparedStatement\n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct1++;\r\n\t\t\t\tdtAdd1.setText(\"\" + dct1);\r\n\t\t\t\tdttotal = dttotal + 120;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"private Paragraph createTableForOverallUnpaidBillAmount() throws BadElementException {\r\n\t\tCompanyDto companyDto = null;\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tSessionObject<String, CompanyDto> sessionObjectForCompany = Session.getInstance().getSessionObject();\r\n\t\tif (null != sessionObjectForCompany) {\r\n\t\t\tcompanyDto = sessionObjectForCompany.getComponent(Constants.COMPANY_DETAILS);\r\n\t\t}\r\n\t\tParagraph overallAmountParagraph = new Paragraph(\"Overall Amount\", subFont);\r\n\t\tParagraph paragraph = new Paragraph();\r\n\t\taddEmptyLine(paragraph, 2);\r\n\t\tPdfPTable table = new PdfPTable(3);\r\n\r\n\t\tPdfPCell c1 = new PdfPCell(new Phrase(\"Overall Bill\", tableHeaderRowFont));\r\n\t\tc1.setBackgroundColor(GrayColor.LIGHT_GRAY);\r\n\t\tc1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\ttable.addCell(c1);\r\n\r\n\t\tc1 = new PdfPCell(new Phrase(\"Overall Paid\", tableHeaderRowFont));\r\n\t\tc1.setBackgroundColor(GrayColor.LIGHT_GRAY);\r\n\t\tc1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\ttable.addCell(c1);\r\n\r\n\t\tc1 = new PdfPCell(new Phrase(\"Overall Balance\", tableHeaderRowFont));\r\n\t\tc1.setBackgroundColor(GrayColor.LIGHT_GRAY);\r\n\t\tc1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\ttable.addCell(c1);\r\n\r\n\t\ttable.setHeaderRows(1);\r\n\r\n\t\tPdfPCell overallBillValue = new PdfPCell(\r\n\t\t\t\tnew Phrase(Util.getValueUpto2Decimal((float) totalBill), tableDataRowFont));\r\n\t\toverallBillValue.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\tPdfPCell overallPaidValue = new PdfPCell(\r\n\t\t\t\tnew Phrase(Util.getValueUpto2Decimal((float) totalPaid), tableDataRowFont));\r\n\t\toverallPaidValue.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\tPdfPCell overallBalanceValue = new PdfPCell(\r\n\t\t\t\tnew Phrase(Util.getValueUpto2Decimal((float) totalBalance), tableDataRowFont));\r\n\t\toverallBalanceValue.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\r\n\t\ttable.addCell(\r\n\t\t\t\tIConstants.WHITE_SPACE + companyDto.getBillingCurrency() + overallBillValue.getPhrase().getContent());\r\n\t\ttable.addCell(\r\n\t\t\t\tIConstants.WHITE_SPACE + companyDto.getBillingCurrency() + overallPaidValue.getPhrase().getContent());\r\n\t\ttable.addCell(IConstants.WHITE_SPACE + companyDto.getBillingCurrency()\r\n\t\t\t\t+ overallBalanceValue.getPhrase().getContent());\r\n\r\n\t\toverallAmountParagraph.add(table);\r\n\t\treturn overallAmountParagraph;\r\n\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct5++;\r\n\t\t\t\tdtAdd5.setText(\"\" + dct5);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"public void updateTableView() {\n\n\t\t// label as \"July 2016\"\n\t\tlabel.setText(month + \"/\" + year);\n\n\t\t// reset the model\n\t\tmodel.setRowCount(0);\n\t\tmodel.setRowCount(numberOfWeeks);\n\n\t\t// set value in the DefaultTableModel\n\t\tint i = firstDayOfWeek - 1;\n\t\tfor (int d = 1; d <= numberOfDays; d++) {\n\t\t\tint row = i / 7;\n\t\t\tint col = i % 7;\n\t\t\tmodel.setValueAt(d, row, col);\n\t\t\tif (d == day) {\n\t\t\t\ttable.changeSelection(row, col, false, false);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\tdouble investment = Double.parseDouble(txtInv.getText());\r\n\tint year = Integer.parseInt(txtYr.getText());\r\n\tdouble interest = Double.parseDouble(txtRt.getText());\r\n\tif(e.getSource() == btnCal)\r\n\t{\r\n\tdouble res = invest * Math.pow((1 + interest/100), (year));\r\n\tSystem.out.println((10000 *\r\n\tMath.pow((3.25 + 1),36)));\r\n\ttxtRes.setText(String.valueOf(res));\r\n\t}\r\n\t}",
"private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n\n if (e.getSource().equals(button[0])) {\n\n try {\n Connection con = new DB().getConnect();\n\n PreparedStatement stm = con.prepareStatement(\"insert into english_attendances values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n PreparedStatement stm2 = con.prepareStatement(\"select * from english_attendances where Month='\" + (String) jComboBox1.getSelectedItem() + \"'\");\n ResultSet rs = stm2.executeQuery();\n if (rs.next()) {\n\n if (!jComboBox1.getSelectedItem().equals(rs.getString(4))) {\n int a = 0;\n int b = 0;\n int c = 3;\n int x = 0;\n for (int i = 0; i < label.length; i++) {\n\n if (c == ++b) {\n //System.out.println(i);\n stm.setString(1, label[i - 2].getText());\n stm.setString(2, label[i - 1].getText());\n stm.setString(3, label[i - 0].getText());\n stm.setString(4, (String) jComboBox1.getSelectedItem());\n stm.setString(5, String.valueOf(Integer.parseInt((String) jComboBox2.getSelectedItem())));\n\n stm.setString(6, \"0\");\n stm.setString(7, \"0\");\n stm.setString(8, \"0\");\n stm.setString(9, \"0\");\n stm.setString(10, \"0\");\n\n stm.setString(11, \"0\");\n stm.setString(12, \"0\");\n stm.setString(13, \"0\");\n stm.setString(14, \"0\");\n stm.setString(15, \"0\");\n\n stm.setString(16, \"0\");\n stm.setString(17, \"0\");\n stm.setString(18, \"0\");\n stm.setString(19, \"0\");\n stm.setString(20, \"0\");\n\n stm.setString(21, \"0\");\n stm.setString(22, \"0\");\n stm.setString(23, \"0\");\n stm.setString(24, \"0\");\n stm.setString(25, \"0\");\n\n stm.setString(26, \"0\");\n stm.setString(6, \"0\");\n stm.setString(27, \"0\");\n stm.setString(28, \"0\");\n stm.setString(29, \"0\");\n\n stm.setString(30, \"0\");\n stm.setString(31, \"0\");\n stm.setString(32, \"0\");\n stm.setString(33, \"0\");\n stm.setString(34, \"0\");\n\n stm.setString(35, \"0\");\n stm.setInt(37, 0);\n stm.setInt(38, 0);\n stm.setInt(39, 0);\n\n int res = stm.executeUpdate();\n System.out.println(res);\n c += 3;\n }\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Duplicate not allow\", \"Check Duplicate\", JOptionPane.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);\n }\n } else {\n\n int a = 0;\n int b = 0;\n int c = 3;\n int x = 0;\n for (int i = 0; i < label.length; i++) {\n\n if (c == ++b) {\n //System.out.println(i);\n stm.setString(1, label[i - 2].getText());\n stm.setString(2, label[i - 1].getText());\n stm.setString(3, label[i - 0].getText());\n stm.setString(4, (String) jComboBox1.getSelectedItem());\n stm.setString(5, String.valueOf(Integer.parseInt((String) jComboBox2.getSelectedItem())));\n\n stm.setString(6, \"0\");\n stm.setString(7, \"0\");\n stm.setString(8, \"0\");\n stm.setString(9, \"0\");\n stm.setString(10, \"0\");\n\n stm.setString(11, \"0\");\n stm.setString(12, \"0\");\n stm.setString(13, \"0\");\n stm.setString(14, \"0\");\n stm.setString(15, \"0\");\n\n stm.setString(16, \"0\");\n stm.setString(17, \"0\");\n stm.setString(18, \"0\");\n stm.setString(19, \"0\");\n stm.setString(20, \"0\");\n\n stm.setString(21, \"0\");\n stm.setString(22, \"0\");\n stm.setString(23, \"0\");\n stm.setString(24, \"0\");\n stm.setString(25, \"0\");\n\n stm.setString(26, \"0\");\n stm.setString(27, \"0\");\n stm.setString(28, \"0\");\n stm.setString(29, \"0\");\n stm.setString(30, \"0\");\n\n stm.setString(31, \"0\");\n stm.setString(32, \"0\");\n stm.setString(33, \"0\");\n stm.setString(34, \"0\");\n stm.setString(35, \"0\");\n\n stm.setString(36, \"0\");\n stm.setInt(37, 0);\n stm.setInt(38, 0);\n stm.setInt(39, 0);\n\n int res = stm.executeUpdate();\n System.out.println(res);\n c += 3;\n }\n }\n\n }\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n }\n }",
"@Override\n public void handle(ActionEvent event) {\n double mealCost;\n double tax;\n double tip;\n double totalCost;\n double totalBill;\n mealCost = Double.parseDouble(numm1.getText());\n bill.setMealCost(mealCost);\n tax=bill.tax();\n numm2.setText(Double.toString(tax)+\"$\");\n tip=bill.tip();\n numm3.setText(Double.toString(tip)+\"$\");\n totalBill=bill.totalBill();\n numm4.setText(Double.toString(totalBill)+\"$\");\n \n }",
"private void makeAddNewMonthAlert() {\n mDatabaseHandler = DatabaseHandler.getInstance(HomeActivity.this);\n LayoutInflater li = LayoutInflater.from(HomeActivity.this);\n\n // only single use of Alert Box in this Application\n View promptsView = li.inflate(R.layout.alert_add_new_month, null);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(HomeActivity.this);\n\n alertDialogBuilder.setView(promptsView);\n\n // reference UI elements from alert_add_new_month in similar fashion\n\n final AlertDialog alertDialog = alertDialogBuilder.create();\n final Spinner mSpnrMonth = (Spinner) promptsView.findViewById(R.id.spnr_alert_add_new_month);\n final Button mBtnAddMonth = (Button) promptsView.findViewById(R.id.btn_alert_add_new_month);\n final EditText mEdtYear = (EditText) promptsView.findViewById(R.id.edt_year_alert_add_new_month);\n mEdtYear.setText(DateUtils.getCurrentYear());\n mSpnrMonth.setOnItemSelectedListener(this);\n mSpnrMonth.setSelection(DateUtils.getCurrentMonth());\n mBtnAddMonth.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (mSpnrMonth.getSelectedItemPosition() == 0) {\n Toast.makeText(HomeActivity.this, R.string.spinner_error_no_selection, Toast.LENGTH_LONG).show();\n mSpnrMonth.performClick();\n return;\n }\n if ((TextUtilities.getDoubleFromView(mEdtYear) < Integer.parseInt(DateUtils.getCurrentYear()))\n || (TextUtilities.getDoubleFromView(mEdtYear) > Double.parseDouble(DateUtils.getCurrentYear()) + 10)) //from current to next 10 years\n {\n TextUtilities.requestFocusIfError(mEdtYear, getResources().getString(R.string.error_invalid_year));\n return;\n\n }\n if (!mDatabaseHandler.hasEntry(mSpnrMonth.getSelectedItem().toString(), mEdtYear.getText().toString())) {\n mDatabaseHandler.addMonth(new MonthYear(mSpnrMonth.getSelectedItem().toString(), mEdtYear.getText().toString()));\n } else {\n LoggerUtility.makeShortToast(HomeActivity.this, getString(R.string.propmt_entry_exists_in_db));\n\n }\n HomeActivity.this.finish();\n startActivity(new Intent(HomeActivity.this, HomeActivity.class));\n\n }\n });\n\n // show it\n alertDialog.show();\n alertDialog.setCanceledOnTouchOutside(false);\n }",
"public void loanStatamentStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Withdrawal ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\n//p.addLineSeperatorX();\n//p.newLine();\n//p.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }",
"public void deleteLoan() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString query = \"SELECT no_irregular_payments FROM loan\"\n\t\t\t\t\t\t+ \" WHERE client_id ='\"+this.client_id+\"' AND start_date ='\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\trs.next();\n\t\t\tint irrPayments = rs.getInt(1);\n\t\t\t\n\t\t\t// get the current date that will serve as an end date for the loan\n\t\t\tDate current_time = new Date();\n\t\t\t// MySQL date format\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t// Adapt the java data format to the mysql one\n\t\t\tString end_date = sdf.format(current_time);\n\t\t\t\n\t\t\tquery = \"INSERT INTO loan_history \"\n\t\t\t\t\t+ \"VALUES ('\"+this.client_id+\"', \"+this.principal_amount+\", '\"+this.start_date+\"', '\"+end_date+\"', \"+irrPayments+\")\";\n\t\t\tstat.executeUpdate(query);\n\t\t\t\n\t\t\t// delete the loan\n\t\t\tquery = \"DELETE FROM loan \"\n\t\t\t\t\t+ \"WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tstat.executeUpdate(query);\n\t\t\t\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}",
"private void querySumMenu()\n\t{\n\t\tclearPanel(getPanel1());\n\t\t\n\t\tJLabel label1=new JLabel(\"This is the total numbers\\nFor:\"+getValue1()+\"and\"+getValue2());\n\t\t\n\t\t//get table from sumQuery and put it in table\n\t\tJTable table=getQuery1().sumQuery(); \n\t\t\n\t\tJScrollPane scrolltable = new JScrollPane(table);\n\t\tlabel1.setBounds(100,10,400,40);\n\t\tscrolltable.setBounds(500,10,500,500);\n\t\tgetPanel1().add(scrolltable);\n\t\tgetPanel1().add(getButton3());\n\t\tgetPanel1().add(getButton4());\n\t\tgetButton3().setBounds(260,10,180,60);\n\t\tgetButton4().setBounds(80,10,180,60);\n\t}",
"private void tampilkan_dataT() {\n \n DefaultTableModel tabelmapel = new DefaultTableModel();\n tabelmapel.addColumn(\"Tanggal\");\n tabelmapel.addColumn(\"Berat\");\n tabelmapel.addColumn(\"Kategori\");\n tabelmapel.addColumn(\"Harga\");\n \n try {\n connection = Koneksi.connection();\n String sql = \"select a.tgl_bayar, b.berat, b.kategori, b.total_bayar from transaksi a, data_transaksi b where a.no_nota=b.no_nota AND a.status_bayar='Lunas' AND MONTH(tgl_bayar) = '\"+date1.getSelectedItem()+\"' And YEAR(tgl_bayar) = '\"+c_tahun.getSelectedItem()+\"'\";\n java.sql.Statement stmt = connection.createStatement();\n java.sql.ResultSet rslt = stmt.executeQuery(sql);\n while (rslt.next()) {\n Object[] o =new Object[4];\n o[0] = rslt.getDate(\"tgl_bayar\");\n o[1] = rslt.getString(\"berat\");\n o[2] = rslt.getString(\"kategori\");\n o[3] = rslt.getString(\"total_bayar\");\n tabelmapel.addRow(o);\n }\n tabel_LK.setModel(tabelmapel);\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Gagal memuat data\");\n }\n \n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct2++;\r\n\t\t\t\tdtAdd2.setText(\"\" + dct2);\r\n\t\t\t\tdttotal = dttotal + 180;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"@Override\n public void onClick(View v) {\n currentCalendar.add(Calendar.MONTH, -1);\n Log.i(\"***********\", \"DrawMonth called on previousmonth\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n\n }",
"public void updateTable()\n {\n tableModelPain = new DefaultTableModel(new String [] {\"Date\", \"Pain Average\", \"Accepted by\"},0);\n tableModelVisit = new DefaultTableModel(new String [] {\"Date\", \"Hospital Name\", \"Doctor\"},0);\n ArrayList<PainEntry> painList = patient.getPainHistory();\n ArrayList<Visit> visitList = patient.getVisitHistory();\n painData = new String[3];\n visitData = new String[3];\n for (PainEntry p : painList) {\n painData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(p.getDate());\n painData[1] = p.getAvePain()+\"\";\n if(!\"\".equals(p.getDocName())) painData[2] = p.getDocName();\n else painData[2] = \"not treated yet\";\n \n tableModelPain.addRow(painData);\n }\n for (Visit v : visitList) {\n visitData[0] = new SimpleDateFormat(\"MM/dd/yyyy\").format(v.getDate());\n visitData[1] = v.getHospital();\n visitData[2] = v.getDocName();\n tableModelVisit.addRow(visitData);\n }\n jTablePain.setModel(tableModelPain);\n jTableVisit.setModel(tableModelVisit);\n }",
"public String calculateMonths(double princ, double interest, double payment)\r\n {\r\n interest /= 100.0;\r\n interest += 1.0;\r\n interest = Math.pow(interest, (1.0/12.0));\r\n\r\n double months = 0.0;\r\n\r\n while (princ > 0.0)\r\n {\r\n princ *= interest;\r\n princ -= payment;\r\n months++;\r\n\r\n if (months > 1200.0)\r\n {\r\n return \">100 years. Try a higher monthly payment.\";\r\n }\r\n }\r\n\r\n return String.valueOf(Math.round(months));\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t\tload(CustomersList.table);\n\t\t\t\tCustomersList.setTotalCompanyDemand();\n\t\t\t\tCustomersList.setTotalResive();\n\t\t\t\tCustomersList.setTotalShopping();\n\t\t\t\tCustomerPaidCheck();\n\t\t\t\tdispose();\n\n\t\t\t}",
"private void intiPlanTable(){\n //gets all plans that are linked with the current profile\n List<Plan> planList = profile.getPlans().getPlans();\n //now add all plans to the table\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n model.setRowCount(0);\n planList.forEach((p) -> {\n model.addRow(new Object[]{p.getPlanName(),p});\n });\n }",
"@SuppressWarnings(\"unchecked\")\n \n \n private void table(){\n \n int c;\n \n try{\n \n Connection con1 = ConnectionProvider.getConn();\n Statement stm = con1.createStatement();\n ResultSet rst = stm.executeQuery(\"select * from sales\");\n ResultSetMetaData rstm = rst.getMetaData();\n \n c = rstm.getColumnCount();\n \n DefaultTableModel dtm2 = (DefaultTableModel)jTable1.getModel();\n dtm2.setRowCount(0);\n \n while (rst.next()){\n \n Vector vec = new Vector();\n \n for(int a =1 ; a<=c; a++)\n {\n vec.add(rst.getString(\"CustomerName\"));\n vec.add(rst.getString(\"OrderNo\"));\n vec.add(rst.getString(\"TypeOfService\"));\n vec.add(rst.getString(\"OrderType\"));\n vec.add(rst.getString(\"Descript\"));\n vec.add(rst.getString(\"OrderConfirmation\"));\n vec.add(rst.getString(\"OrderHandledBy\"));\n vec.add(rst.getString(\"OrderDate\"));\n vec.add(rst.getString(\"WarrantyExpireDate\"));\n vec.add(rst.getString(\"FullAmount\"));\n vec.add(rst.getString(\"AmountPaid\"));\n vec.add(rst.getString(\"Balance\"));\n }\n \n dtm2.addRow(vec);\n }\n \n }\n catch(Exception e)\n {\n \n }\n \n \n }",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tdct3++;\r\n\t\t\t\tdtAdd3.setText(\"\" + dct3);\r\n\t\t\t\tdttotal = dttotal + 200;\r\n\t\t\t\tdtotal.setText(\"Bill Scratch Pad : To Pay tk. \" + dttotal);\r\n\t\t\t}",
"public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }",
"public void dataPadrao() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat s = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dataAtual = s.format(c.getTime());\n c.add(c.MONTH, 1);\n String dataAtualMaisUm = s.format(c.getTime());\n dataInicial.setText(dataAtual);\n dataFinal.setText(dataAtualMaisUm);\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 ViewPurchaseHistoryCompanyActivity(String companyName, int companyID) {\n initComponents();\n this.companyID = companyID;\n this.companyName.setText(companyName);\n Font font = new Font(\"Arial\", Font.PLAIN, 18);\n jTable2.setFont(font);\n jTable2.getTableHeader().setFont(font);\nUIManager.put(\"OptionPane.messageFont\", new FontUIResource(new Font(\n \"Arial\", Font.BOLD, 18)));\n getData();\n DefaultTableCellRenderer renderer=(DefaultTableCellRenderer) jTable2.getTableHeader().getDefaultRenderer();\n renderer.setHorizontalAlignment(JLabel.CENTER);\n jTable2.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n\n int index = jTable2.getSelectedRow();\n\n TableModel model = jTable2.getModel();\n\n String value1 = model.getValueAt(index, 7).toString();\n new BillActivity(Integer.parseInt(value1), companyID, true,purchaseHistory.get(index).getNote()).setVisible(true);\n setVisible(false);\n\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n }\n });\n\n }"
] |
[
"0.72166806",
"0.67421883",
"0.6740895",
"0.646996",
"0.6407228",
"0.6401442",
"0.6250969",
"0.6222448",
"0.6220337",
"0.58281136",
"0.582769",
"0.57547605",
"0.57384294",
"0.57137805",
"0.5608184",
"0.56065536",
"0.5544839",
"0.55224776",
"0.54817533",
"0.543811",
"0.54268026",
"0.54266715",
"0.5425623",
"0.5406681",
"0.5392704",
"0.5385819",
"0.53446907",
"0.5335152",
"0.53308636",
"0.53224343",
"0.531541",
"0.5313253",
"0.52561927",
"0.5241538",
"0.52377087",
"0.52197987",
"0.52160174",
"0.521478",
"0.5211342",
"0.5207737",
"0.51969475",
"0.51932836",
"0.5187003",
"0.5184727",
"0.5183497",
"0.51753986",
"0.516146",
"0.516",
"0.51499325",
"0.5129735",
"0.512848",
"0.5108035",
"0.51058996",
"0.5101904",
"0.51008177",
"0.5099677",
"0.50991565",
"0.5084575",
"0.50772583",
"0.50643504",
"0.5059395",
"0.505833",
"0.5057474",
"0.50562793",
"0.50516236",
"0.50500125",
"0.5033845",
"0.5023307",
"0.5021057",
"0.5017034",
"0.501046",
"0.5008471",
"0.500537",
"0.5003302",
"0.4999287",
"0.49989414",
"0.49938133",
"0.49894255",
"0.49879515",
"0.49862218",
"0.49719846",
"0.49709916",
"0.4961083",
"0.49579826",
"0.49566263",
"0.49511653",
"0.4948262",
"0.49454764",
"0.4942045",
"0.4940655",
"0.49355978",
"0.49335122",
"0.49247175",
"0.49213633",
"0.4910531",
"0.49097925",
"0.49078876",
"0.4901457",
"0.4889355",
"0.48846105"
] |
0.6568516
|
3
|
/ The following two methods are for when the "Loan?" checkbox is ticked; they are called when the user presses the "Calculate loan" button. / calculateMonths calculates the amount of months it would take to completely pay off the loan with the given principal amount, APR interest rate, and monthly payment. Returns ">1200" if the loan can never be paid off (i.e. not within 100 years).
|
public String calculateMonths(double princ, double interest, double payment)
{
interest /= 100.0;
interest += 1.0;
interest = Math.pow(interest, (1.0/12.0));
double months = 0.0;
while (princ > 0.0)
{
princ *= interest;
princ -= payment;
months++;
if (months > 1200.0)
{
return ">100 years. Try a higher monthly payment.";
}
}
return String.valueOf(Math.round(months));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract double calculateLoanPayment(double principalAmount, double annualPrimeIntRate, int monthsAmort);",
"public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}",
"private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }",
"public static void monthlyPayment()\n\t{\n\t\tSystem.out.println(\"enter principal loan amount, years , and rate of interest\");\n\t\tfloat principal = scanner.nextFloat();\n\t\tfloat years = scanner.nextFloat();\n\t\tfloat rate = scanner.nextFloat();\n\t\t\n\t\tfloat n = 12 * years;\n\t\tfloat r = rate / (12*100);\n\t\tdouble x = Math.pow(1+rate,(-n));\t\n\t\t\n\t\tdouble payment = (principal*r) / (1-x);\n\t\tSystem.out.println(\"monthly payment is: \" + payment);\n\t}",
"public LoanMonthlyPayment calculateMonthlyPayment() {\n double monthlyInterest = loanRequest.getApr() / MONTHLY_INTEREST_DIVISOR;\n double tmp = Math.pow(1d + monthlyInterest, -1);\n tmp = Math.pow(tmp, loanRequest.getTermInMonths());\n tmp = Math.pow(1d - tmp, -1);\n return new LoanMonthlyPayment(\n monthlyInterest, loanRequest.getAmountBorrowed() * monthlyInterest * tmp\n );\n }",
"private void onCalcLoanBtnClicked()\r\n {\r\n /* Here I declare the values that are to be passed into the public calculation methods of this\r\n * class (calculateMonths, monthlyPaymentFinishInYear), and if they are not filled in (or are\r\n * null) they become zero.\r\n */\r\n Log.d(TAG, \"Calculate loan button clicked\");\r\n double princ;\r\n double interest;\r\n double payment;\r\n\r\n if (findViewById(R.id.edit_loan_balance) != null) {\r\n EditText editPrincipal = (EditText)findViewById(R.id.edit_loan_balance);\r\n if (\"\".equals(editPrincipal.getText().toString()))\r\n {\r\n Log.d(TAG, \"Defaulting principal amount to zero because empty field\");\r\n princ = 0.0;\r\n }\r\n else\r\n {\r\n Log.d(TAG, \"Setting principal amount to possibly non-zero value\");\r\n princ = Double.valueOf(editPrincipal.getText().toString());\r\n }\r\n }\r\n else {\r\n Log.d(TAG, \"Defaulting principal amount to zero because null EditText\");\r\n princ = 0.0;\r\n }\r\n\r\n if (findViewById(R.id.edit_loan_interest) != null) {\r\n EditText editInterest = (EditText)findViewById(R.id.edit_loan_interest);\r\n if (\"\".equals(editInterest.getText().toString()))\r\n {\r\n Log.d(TAG, \"Defaulting interest amount to zero because empty field\");\r\n interest = 0.0;\r\n }\r\n else\r\n {\r\n Log.d(TAG, \"Setting interest amount to possibly non-zero value\");\r\n interest = Double.valueOf(editInterest.getText().toString());\r\n }\r\n }\r\n else {\r\n Log.d(TAG, \"Defaulting interest amount to zero because null EditText\");\r\n interest = 0.0;\r\n }\r\n\r\n if (findViewById(R.id.edit_amount) != null) {\r\n EditText editAmt = (EditText)findViewById(R.id.edit_amount);\r\n if (\"\".equals(editAmt.getText().toString()))\r\n {\r\n Log.d(TAG, \"Defaulting payment amount to zero because empty field\");\r\n payment = 0.0;\r\n }\r\n else\r\n {\r\n Log.d(TAG, \"Setting payment amount to possibly non-zero value\");\r\n payment = Double.valueOf(editAmt.getText().toString());\r\n }\r\n }\r\n else {\r\n Log.d(TAG, \"Defaulting payment amount to zero because null EditText\");\r\n payment = 0.0;\r\n }\r\n\r\n if (findViewById(R.id.txt_loan_how_many_months_value) != null)\r\n {\r\n TextView howManyMonths = findViewById(R.id.txt_loan_how_many_months_value);\r\n howManyMonths.setText(calculateMonths(princ, interest, payment));\r\n }\r\n\r\n if (findViewById(R.id.txt_loan_min_payment_year_value) != null)\r\n {\r\n TextView minPayment = findViewById(R.id.txt_loan_min_payment_year_value);\r\n minPayment.setText(monthlyPaymentFinishInYear(princ, interest));\r\n }\r\n }",
"public void getMonthlyPayment(View view) {\n //Get all the EditText ids\n EditText principal = findViewById(R.id.principal);\n EditText interestRate = findViewById(R.id.interestRate);\n EditText loanTerm = findViewById(R.id.loanTerm);\n\n //Get the values for principal, MIR and the term of the loan\n double p = Double.parseDouble(principal.getText().toString());\n double r = Double.parseDouble(interestRate.getText().toString());\n double n = Double.parseDouble(loanTerm.getText().toString());\n\n\n //Calculate the monthly payment and round the number to 2 decimal points\n TextView display = findViewById(R.id.display);\n double monthlyPayment;\n DecimalFormat df = new DecimalFormat(\"#.##\");\n monthlyPayment = (p*r/1200.0)/(1-Math.pow((1.0+r/1200.0),(-12*n)));\n\n //Display the number in TextView\n display.setText(String.valueOf(df.format(monthlyPayment)));\n\n\n }",
"static int loanHelper(int principle,double interest,int payment,int month) {\n\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\tmonth++;\n\t\treturn 1+ loanHelper((int) (((principle)*(1+interest/12))-payment), interest, payment,month);\n\n\n\n\t}",
"public void calculateLoan(View view){\n Intent intent = new Intent(this, ResultActivity.class);\n\n //TODO: calculate monthly payment and determine\n double carPrice;\n double downPayment;\n double loadPeriod;\n double interestRate;\n\n \n\n //loan application status; approve or reject\n double monthlyPayment;\n String status;\n\n //Passing data using putExtra method\n //putExtra(TAG, value)\n intent.putExtra(MONTHLY_PAYMENT, monthlyPayment);\n intent.putExtra(LOAN_STATUS, status);\n startActivity(intent);\n }",
"@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}",
"public double getMonthlyPayment() {\n double monthlyInterestRate = annualInterestRate / 1200;\n double monthlyPayment = loanAmount * monthlyInterestRate / (1 - (1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12)));\n \n return monthlyPayment;\n }",
"@Override\n public BigDecimal calculateMonthlyPayment(double principal, double interestRate, int termYears) {\n // System.out.println(getClass().getName() + \".calculateMonthlyPayment() call chain:\");\n // for (StackTraceElement e : Thread.currentThread().getStackTrace())\n // {\n // if (!e.getClassName().equals(getClass().getName()) &&\n // !e.getMethodName().equals(\"getStackTrace\") &&\n // !(e.getLineNumber() < -1)) {\n // System.out.println(\" L \" + e.getClassName() + \".\" + e.getMethodName() + \"(line: \" + e.getLineNumber() + \")\");\n // }\n // }\n BigDecimal p = new BigDecimal(principal);\n int divisionScale = p.precision() + CURRENCY_DECIMALS;\n BigDecimal r = new BigDecimal(interestRate).divide(ONE_HUNDRED, MathContext.UNLIMITED).divide(TWELVE, divisionScale,\n RoundingMode.HALF_EVEN);\n BigDecimal z = r.add(BigDecimal.ONE);\n BigDecimal tr = new BigDecimal(Math.pow(z.doubleValue(), termYears * 12));\n return p.multiply(tr).multiply(r).divide(tr.subtract(BigDecimal.ONE), divisionScale, RoundingMode.HALF_EVEN)\n .setScale(CURRENCY_DECIMALS, RoundingMode.HALF_EVEN);\n }",
"public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }",
"public double calculateApprovedMonthlyTotal(ExpenseRetrievalResponse expenseRetrievalResponse){\n LinkedList<Expense> expenses = expenseRetrievalResponse.getExpenses();\n\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(expense.isApproved() && dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"public static double calculateMonthlyPaymentInsuranceOnly(double amountLoan, double annualRateInsurance){\n return amountLoan * (annualRateInsurance / 12);\n }",
"private void CalculateJButtonActionPerformed(java.awt.event.ActionEvent evt) { \n // read the inputs and calculate payment of loan\n //constants for max values, and number of comoundings per year\n final double MAX_AMOUNT = 100000000;\n final double MAX_INTEREST_RATE = 100;\n final int COUMPOUNDINGS = 12;\n final double MAX_YEARS = 50;\n final double PERIOD_INTEREST = COUMPOUNDINGS * 100;\n String errorMessage = \"Please enter a positive number for all required fields\"\n + \"\\nLoan amount must be in reange (0, \" + MAX_AMOUNT + \"]\"\n + \"\\nInterest rate must be in range [0, \" + MAX_INTEREST_RATE + \"]\"\n + \"\\nYears must be in range [0, \" + MAX_INTEREST_RATE + \"]\";\n \n counter++;\n CounterJTextField.setText(String.valueOf(counter));\n \n //get inputs\n double amount = Double.parseDouble(PrincipalJTextField.getText());\n double rate = Double.parseDouble(RateJTextField.getText());\n double years = Double.parseDouble(YearsJTextField.getText());\n \n //calculate paymets using formula\n double payment = (amount * rate/PERIOD_INTEREST)/\n (1 - Math.pow((1 + rate/PERIOD_INTEREST),\n years * (-COUMPOUNDINGS)));\n double interest = years * COUMPOUNDINGS * payment - amount;\n \n //displays results\n DecimalFormat dollars = new DecimalFormat(\"$#,##0.00\");\n\n PaymentJTextField.setText(dollars.format(payment));\n InterestJTextField.setText(dollars.format(interest));\n \n }",
"public static double calculateMonthlyPaymentBank(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n // Source : https://www.younited-credit.com/projets/pret-personnel/calculs/calculer-remboursement-pret\n double J = annualRateBank / 12; // Taux d'interet effectif = taux annuel / 12\n\n return amountLoan * (J / (1 - Math.pow(1 + J, - nbOfMonthlyPayment))); // Mensualité\n }",
"public double calculateApprovedMonthlyTotal(LinkedList<Expense> expenses){\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(expense.isApproved() && dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"public static double calculateMonthlyPaymentTotal(double amountLoan, double annualRateBank, double annualRateInsurance, int nbOfMonthlyPayment){\n double monthlyPaymentBank = calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment);\n double monthlyPaymentInsurance = calculateMonthlyPaymentInsuranceOnly(amountLoan, annualRateInsurance);\n\n return monthlyPaymentBank + monthlyPaymentInsurance;\n }",
"static int loanLength(int principle, double interest, int payment) {\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month 0: $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\n\n\t\t\tint month=0;\n\t\t\tint loandate= loanHelper(principle,interest,payment,month)-1; // Subtract one because it counts month 0 as a month\n\t\t\treturn loandate;\n\t\t}\n\n\t}",
"public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }",
"public static double calculateMonthlyPaymentWithNotRate(double amountLoan, int nbOfMonthlyPayment){\n return amountLoan / nbOfMonthlyPayment;\n }",
"@Override\r\n\tpublic double monthlyInterest() {\r\n\t\tdouble interest;\r\n \tif(isLoyal){\r\n \t//0.35%/12\r\n \t\tinterest = 0.35 / 100.0;\r\n \treturn interest / 12;\r\n \t} \r\n \telse //0.25%/12\r\n \t\tinterest = 0.25 / 100.0;\r\n \t\treturn interest / 12; \r\n\t}",
"@Test\n public void testDecimalAutoLoan() {\n LoanTerms loanTerms = new LoanTerms(30, 500000, LoanType.SCB, 40, 3000, 21000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$466.15\"));\n }",
"public double calculateMonthlyTotal(ExpenseRetrievalResponse expenseRetrievalResponse){\n LinkedList<Expense> expenses = expenseRetrievalResponse.getExpenses();\n\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"float getMonthlySalary();",
"@FXML\r\n\tprivate void btnCalcLoan(ActionEvent event) {\r\n\r\n\t\tSystem.out.println(\"Amount: \" + LoanAmount.getText());\r\n\t\tdouble dLoanAmount = Double.parseDouble(LoanAmount.getText());\r\n\t\tSystem.out.println(\"Amount: \" + dLoanAmount);\t\r\n\t\t\r\n\t\tlblTotalPayemnts.setText(\"123\");\r\n\t\t\r\n\t\tLocalDate localDate = PaymentStartDate.getValue();\r\n\t\tSystem.out.println(localDate);\r\n\t\t\r\n\t\tdouble dInterestRate = Double.parseDouble(InterestRate.getText());\r\n\t\tSystem.out.println(\"Interest Rate: \" + dInterestRate);\r\n\t\t\r\n\t\tint dNbrOfYears = Integer.parseInt(NbrOfYears.getText());\r\n\t\tSystem.out.println(\"Number of Years: \" + dNbrOfYears);\r\n\t\t\r\n\t\tdouble dAdditionalPayment = Double.parseDouble(AdditionalPayment.getText());\r\n\t\t\r\n\t\t\r\n\t\tLoan dLoan = new Loan(dLoanAmount,dInterestRate,dNbrOfYears,dAdditionalPayment,localDate,false,0);\r\n\t\t\r\n\t\tdouble totalInterest = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < dLoan.LoanPayments.size();i++) {\r\n\t\t\tPayment payment = dLoan.LoanPayments.get(i);\r\n\t\t\tloanTable.getItems().add((payment.getPaymentID(),payment.getDueDate(),dAdditionalPayment,payment.getIMPT(),\r\n\t\t\t\t\tpayment.getPPMT(),payment.getTotalPrinciple());\r\n\t\t\ttotalInterest += payment.getIMPT();\r\n\t\t}\r\n\t\t\r\n\t\tTotalPayments.setText(String.valueOf(dLoan.LoanPayments.size()));\r\n\t\tTotalInterest.setText(String.valueOf(totalInterest));\r\n\t\t\r\n\t}",
"@Override\n public void onClick(View view) {\n double loan = Double.parseDouble(binding.loanAmount.getText().toString());\n\n // get tenure amount from the textView and convert it to double\n double tenure = Double.parseDouble(binding.loanTenure.getText().toString());\n\n // get interest amount from the textView and convert it to double, then divide it by 12 to get the interest per month\n double interest = Double.parseDouble(binding.interestRate.getText().toString()) / 12.0;\n\n // variable to hold the (1-i)^n value\n double i = Math.pow((1.0 + interest / 100.0), (tenure * 12.0));\n // equation to calculate EMI (equated monthly installments)\n double emi = loan * (interest/100.0) * i / ( i - 1 );\n\n // after calculated EMI, set it to the textView in the interface\n binding.monthlyPayment.setText(\"$\" + String.format(\"%.2f\", emi));\n }",
"public static void main(String[] args) {\n final byte MONTHS_IN_YEAR = 12;\n final byte PRECENT = 100;\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Welcome to your mortgage calculator. \\nPlease type in the information...\");\n\n//// Method 1\n// System.out.print(\"principal ($1K - $1M): \");\n// int principal = scanner.nextInt();\n// while (principal < 1000 || principal > 1_000_000){\n// System.out.println(\"Enter a number between 1,000 and 1,000,000.\");\n// System.out.print(\"principal ($1K - $1M): \");\n// principal = scanner.nextInt();\n// // can use while true + a if break condition here\n// // notice you need to init principal either way.\n// // otherwise it will only be available inside the {} block\n// }\n//// Method 2\n int principal = 0;\n while(true){\n System.out.print(\"principal ($1K - $1M): \");\n principal = scanner.nextInt();\n if (principal >= 1_000 && principal <= 1_000_000)\n break;\n System.out.println(\"Enter a number between 1,000 and 1,000,000.\");\n }\n\n System.out.print(\"Annual Interest Rate (0-30) in percentage: \");\n float annualInterestRate = scanner.nextFloat();\n while (annualInterestRate<0 || annualInterestRate>30){\n System.out.println(\"Enter a value between 0 and 30\");\n System.out.print(\"Annual Interest Rate (0-30) in percentage: \");\n annualInterestRate = scanner.nextFloat();\n }\n float monthInterestRate = annualInterestRate / PRECENT / MONTHS_IN_YEAR;\n\n System.out.print(\"Period (years): \");\n int years = scanner.nextInt();\n while (years < 1 || years > 30){\n System.out.println(\"Enter a value between 1 and 30\");\n System.out.print(\"Period (years): \");\n years = scanner.nextInt();\n }\n int numberOfPayment = years * MONTHS_IN_YEAR;\n double mortgage = principal\n * (monthInterestRate * Math.pow(1+monthInterestRate, numberOfPayment))\n / (Math.pow(1+monthInterestRate, numberOfPayment) - 1);\n String mortgageFormatted = NumberFormat.getCurrencyInstance().format(mortgage);\n System.out.println(\"Mortgage: \" + mortgageFormatted);\n }",
"@Test\n public void computeFactor_TwoMonthsOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-01 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-02 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 1 months\n assertEquals(1, factor, 0);\n }",
"public double monthlyEarning() {\n\t\tdouble me = 0.0;\r\n\t\tString input = getLevel();\r\n\t\tif ( input == \"GRAD\")\r\n\t\t\tme = Faculty_Monthly_Salary; // interface variable\r\n\t\telse if ( input == \"ASSOC\")\r\n\t\t\tme = Faculty_Monthly_Salary * 1.2;\r\n\t\telse if ( input == \"PROF\")\r\n\t\t\tme = Faculty_Monthly_Salary * 1.4;\r\n\t\treturn me;\r\n\t\t// if i put these in reverse, i wouldve had to intialize at 1\r\n\t\t//so month earning wouldnt be at 0, and then 0 * 1.2 would equal 0 instead of 1.2\r\n\t}",
"public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}",
"@Test\n public void testHomeLoanCalculator() {\n LoanTerms loanTerms = new LoanTerms(10, 50000, LoanType.ING, 28, 1000, 8000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$2,771.81\"));\n }",
"@Test\n public void shouldCalculatePaymentWhen24MonthsIsSelected() {\n\n\n //1. Select '24'\n //2. Enter 7 in the Interest Rate field\n //3. Enter 25000 in the Price field.\n //4. Enter 1500 in the Down Payment Field.\n //5. Inter 3000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $945 / month for 24 months at 7.0%.\n\n\n //1. Select '36'\n //2. Enter 4 in the Interest Rate field\n //3. Enter 35000 in the Price field.\n //4. Enter 2500 in the Down Payment Field.\n //5. Inter 2000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $919 / month for 36 months at 4.0%.\n\n\n //1. Select '48'\n //2. Enter 5 in the Interest Rate field\n //3. Enter 45000 in the Price field.\n //4. Enter 3500 in the Down Payment Field.\n //5. Inter 3000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $901 / month for 48 months at 5.0%.\n\n\n //1. Select '60'\n //2. Enter 6 in the Interest Rate field\n //3. Enter 55000 in the Price field.\n //4. Enter 4500 in the Down Payment Field.\n //5. Inter 4000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $911 / month for 60 months at 6.0%.\n\n\n //1. Select '72'\n //2. Enter 8 in the Interest Rate field\n //3. Enter 65000 in the Price field.\n //4. Enter 5500 in the Down Payment Field.\n //5. Inter 5000 in the Trade in Value field.\n //6. Enter 593.86 in the Amount owed on Trade field.\n //7. Select the Calculate button.\n //8. Verify that Estimated Payment - $966 / month for 72 months at 8.0%.\n\n\n }",
"private static double totalPricePerMonth(double price_interest, int months) {\n \treturn price_interest / months;\n }",
"private void billing_calculate() {\r\n\r\n // need to search patient before calculating amount due\r\n if (billing_fullNameField.equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"Must search for a patient first!\\nGo to the Search Tab.\",\r\n \"Need to Search Patient\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if (MainGUI.pimsSystem.lookUpAppointmentDate(currentPatient).equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"No Appointment to pay for!\\nGo to Appointment Tab to make one.\",\r\n \"Nothing to pay for\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n // patient has been searched - get info from patient info panel\r\n else {\r\n\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n // patient has a policy, amount due is copay: $50\r\n // no policy, amount due is cost amount\r\n double toPay = MainGUI.pimsSystem.calculate_charge(currentPatient, billing_codeCB.getSelectedItem().toString());\r\n billing_amtDueField.setText(\"$\" + doubleToDecimalString(toPay));\r\n\r\n\r\n\r\n JOptionPane.showMessageDialog(this, \"Amount Due Calculated.\\nClick \\\"Ok\\\" to go to Payment Form\",\r\n \"Calculate\", JOptionPane.DEFAULT_OPTION);\r\n\r\n paymentDialog.setVisible(true);\r\n }\r\n\r\n }",
"public void earnMonthlyInterest(){\r\n\t\tbalance += balance * getYearlyInterestRate() / 12 ;\r\n\t}",
"public void monthlyPayment_Validation() {\n\t\thelper.assertString(monthlyPayment_AftrLogin(), payOffOffer.monthlyPayment_BfrLogin());\n\t\tSystem.out.print(\"The Monthly Payment is: \" + monthlyPayment_AftrLogin());\n\t}",
"public List<ScheduledAmortizationPayment> calculateAmortizationSchedule() {\n final int maxNumberOfPayments = loanRequest.getTermInMonths() + 1;\n LoanMonthlyPayment loanMonthlyPayment = this.calculateMonthlyPayment();\n int paymentNumber = 0;\n double totalPayments = 0;\n double totalInterestPaid = 0;\n double balance = loanRequest.getAmountBorrowed();\n List<ScheduledAmortizationPayment> payments = new LinkedList<ScheduledAmortizationPayment>();\n payments.add(new ScheduledAmortizationPayment(paymentNumber++, 0d, 0d, balance, 0d, 0d));\n while ((balance > 0) && (paymentNumber <= maxNumberOfPayments)) {\n double curMonthlyInterest = balance * loanMonthlyPayment.getMonthlyInterest();\n double curPayoffAmount = balance + curMonthlyInterest;\n double curMonthlyPaymentAmount = Math.min(loanMonthlyPayment.getMonthlyPayment(),\n curPayoffAmount);\n if ((paymentNumber == maxNumberOfPayments)\n && ((curMonthlyPaymentAmount == 0) || (curMonthlyPaymentAmount == curMonthlyInterest))) {\n curMonthlyPaymentAmount = curPayoffAmount;\n }\n double curMonthlyPrincipalPaid = curMonthlyPaymentAmount - curMonthlyInterest;\n double curBalance = balance - curMonthlyPrincipalPaid;\n totalPayments += curMonthlyPaymentAmount;\n totalInterestPaid += curMonthlyInterest;\n payments.add(new ScheduledAmortizationPayment(\n paymentNumber++, curMonthlyPaymentAmount, curMonthlyInterest,\n curBalance, totalPayments, totalInterestPaid\n )\n );\n balance = curBalance;\n }\n return payments;\n }",
"public double calculateMonthlyTotal(LinkedList<Expense> expenses){\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"@Override\r\n\tpublic double monthlyFee(double balance) {\r\n \tif(balance >= 300){\r\n \treturn 0;\r\n \t}\r\n \telse\r\n \treturn 5;\r\n \t}",
"public double monthlyEarnings() {\n\t\tif(level == \"AS\") {\n\t\t\treturn FACULTY_MONTH_SALARY;\n\t\t}\n\t\telse if(level == \"AO\") {\n\t\t\treturn FACULTY_MONTH_SALARY*1.5;\n\t\t}\n\t\telse {\n\t\t\treturn FACULTY_MONTH_SALARY*2;\n\t\t}\n\t}",
"public static double processSomething(double loanAmt, double intRateAnnual, int termYears) {\n double intRateMonthly = (intRateAnnual/ 100) / 12;\n double base = (1 + intRateMonthly);\n double termMonths = termYears * 12;\n double minMonthlyPaymt = 0.0;\n minMonthlyPaymt = ((intRateMonthly * loanAmt) / (1 - Math.pow(base, -termMonths)));\n\n return minMonthlyPaymt;\n }",
"public static double calcMonthlyPayment(int term, double amount, double rate)\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n rate = rate / 100;\r\n double num1 = rate * (Math.pow((1 + rate), (term * 12)));\r\n double num2 = Math.pow((1 + rate), (term * 12)) - 1;\r\n double monthlyPayment = amount * (num1 / num2);\r\n return monthlyPayment;\r\n }",
"public static void main(String[] args) {\n var balance = MoneyRound.roundToXPlaces(sayThenGetDouble(\"What is your balance? \"),\n PRECISION_TO_ROUND_TO);\n //Then, do the same with the APR and monthly payment. (Divided APR when first gotten)\n var apr = sayThenGetDouble(\"What is the APR on the card (as a percent)? \") / DOUBLE_TO_PERCENT_DIVISOR;\n var monthlyPayment = MoneyRound.roundToXPlaces(\n sayThenGetDouble(\"What is the monthly payment you can make? \"), PRECISION_TO_ROUND_TO);\n System.out.print(\"\\n\");\n //Newline here for better text formatting.\n //Then, call calculateMonthsUntilPaidOff from the PaymentCalculator class.\n var payCalc = new PaymentCalculator(apr, balance, monthlyPayment);\n var monthsUntilPaidOff = payCalc.calculateMonthsUntilPaidOff();\n //Finally, return the amount of months until the card is paid off.\n System.out.println(\"It will take you \" + monthsUntilPaidOff + \" months to pay off this card.\");\n\n\n }",
"public double makeAPayment(double annualLeaseAmount){\n double paymentMade = 0.0;//\n return paymentMade;\n /*Now it's 0.0. There must be a place somewhere\n that has a 'make a payment'\n button or text field or whatever...\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ \n }",
"public float calculateTotalFee(){\n int endD = parseInt(endDay);\n int startD = parseInt(startDay);\n int endM = parseInt(convertMonthToDigit(endMonth));\n int startM = parseInt(convertMonthToDigit(startMonth));\n int monthDiff = 0;\n float totalFee = 0;\n //get the stay duration in months\n monthDiff = endM - startM;\n \n System.out.println(\"CALCULATING TOTAL FEE:\");\n \n stayDuration = 1;\n if(monthDiff == 0){ //on the same month\n if(startD == endD){\n stayDuration = 1;\n }else if(startD < endD){ //Same month, diff days\n stayDuration = 1 + (parseInt(endDay) - parseInt(startDay));\n }\n }else if(monthDiff > 0){ //1 month difference\n \n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n \n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else if(startD <= endD){ //if end day is greater than start day\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 30;\n break; \n \n case \"February\": \n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 29;\n break; \n \n default:\n break;\n }\n }\n }else if(monthDiff < 0){\n if(startMonth == \"December\" && endMonth == \"January\"){\n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n\n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else{\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n }\n }\n }\n \n totalFee = (int) (getSelectedRoomsCounter() * getSelectedRoomPrice());\n totalFee *= stayDuration;\n \n //console log\n System.out.println(\"stayDuration: \"+ stayDuration);\n System.out.println(\"Total Fee: \" + totalFee +\"php\");\n return totalFee;\n }",
"public double getMonthlyAmount()\n\t{\n\t\treturn amountGoal%timeFrame;\n\t}",
"public double calculateSalary(int month)\n\t{\n\t\tdouble calculatedSalary = this.annualSalary / 14.0d;\n\t\t\n\t\tswitch(month)\n\t\t{\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 9:\n\t\t\tcase 12:\n\t\t\t\t//what a lucky boy (or girl) this professor is\n\t\t\t\tcalculatedSalary *= 1.5;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//I have no idea whether java accepts switch case without the default,\n\t\t\t\t//so better be safe and just put it here.\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn calculatedSalary;\n\t}",
"public int annualSalary(){\r\n int aSalary = monthlySalary * MONTHS;\r\n return aSalary;\r\n }",
"@Override\n\tpublic double computeMonthlyPremium(double salary) {\n\t\treturn salary*0.08;\n\t}",
"private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}",
"@RequestMapping(\"/Calculate.do\")\n public ModelAndView calculate(\n @CookieValue(value = \"loanAmountC\", defaultValue = \"\") String loanAmountC,\n @CookieValue(value = \"annualInterestC\", defaultValue = \"\") String annualInterestC,\n @CookieValue(value = \"numOfYearsC\", defaultValue = \"\") String numOfYearsC,\n HttpServletResponse response,\n @Validated @ModelAttribute(name=\"form\") LoanForm form,\n BindingResult bindingResult){\n if (bindingResult.hasErrors()) {\n logger.trace(\"The received data is invalid, going back to the inputs.\");\n // if we got input errors, we are going back to the Input page\n // insert the previous user inputs into the Input page\n // the errors are already included\n return new ModelAndView(\"Input\", \"form\" , form);\n } else {\n logger.trace(\"The input data is valid.\");\n // if no errors, the input data is valid\n // convert the data into numbers for the calculation\n // put the numbers in the object for the calculation\n\n Loan loan = new Loan();\n\n ModelAndView mv = new ModelAndView(\"Output\", \"loan\", loan);\n\n if(loanAmountC.isEmpty() || annualInterestC.isEmpty() || numOfYearsC.isEmpty()){\n\n loan.setLoanAmount(Double.parseDouble(form.getLoanAmount()));\n loan.setAnnualInterestRate(Double.parseDouble(form.getAnnualInterestRate()));\n loan.setNumberOfYears(Integer.parseInt(form.getNumberOfYears()));\n\n Cookie amountCookie = new Cookie(\"loanAmountC\", cookieEncoder.encode(form.getLoanAmount()));\n Cookie interestCookie = new Cookie(\"annualInterestC\", cookieEncoder.encode(form.getAnnualInterestRate()));\n Cookie yearsCookie = new Cookie(\"numOfYearsC\", cookieEncoder.encode(form.getNumberOfYears()));\n amountCookie.setMaxAge(7*24*60*60);\n interestCookie.setMaxAge(7*24*60*60);\n yearsCookie.setMaxAge(7*24*60*60);\n\n response.addCookie(amountCookie);\n response.addCookie(interestCookie);\n response.addCookie(yearsCookie);\n\n mv.addObject(\"loanAmountC\", form.getLoanAmount());\n mv.addObject(\"annualInterestC\", form.getAnnualInterestRate());\n mv.addObject(\"numOfYearsC\", form.getNumberOfYears());\n\n }\n\n // make the object available to the Output page and show the page\n return mv ;\n }\n }",
"double getMonthlyInterestRate(){\r\n\t\treturn annualInterestRate/12;\r\n\t}",
"public static double calculateMonthlyPaymentInterestBankOnly(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n return calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment) - calculateMonthlyPaymentWithNotRate(amountLoan, nbOfMonthlyPayment);\n }",
"public double getMonthlyInterest(){\n return balance * (getMonthlyInterestRate() / 100);\n }",
"public double getloanAmount( double loanAmount) {\nreturn loanAmount;\n}",
"@Test\n public void computeFactor_SummerTimeMonth() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-01-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-04-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-01-01 00:00:00\", \"2012-05-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(4, factor, 0);\n }",
"public BigDecimal getLoanAmont() {\n return loanAmount == null ? BigDecimal.ZERO : loanAmount;\n }",
"@org.junit.Test\r\n public void testPayBackSumShouldBeSameOrHigher() {\r\n Prospect p = new Prospect(\"Doris\", 1000, 5, 2);\r\n MortgageCalculation m = new MortgageCalculation(p);\r\n double result = m.getFixedMonthlyPayment();\r\n double payBackSum = result * p.getYears() * 12;\r\n\r\n assertTrue(payBackSum >= p.getTotalLoan());\r\n }",
"@Test\n public void computeFactor_FebruaryOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-29 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 29 (days)\n assertEquals(29, factor, 0);\n }",
"public static void main(String[] args) {\n f_menu();\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.println(\"Input the the total months\");\r\n int mo = keyboard.nextInt();\r\n int save_money=0;\r\n if (mo <= 0) {\r\n System.out.println(\"ERROR: the months should be greater than \");\r\n }else{\r\n save_money = f_money(mo);\r\n System.out.println(\" the money saved during \"+mo+\"month is\"+save_money);\r\n }\r\n }",
"public double monthlyEarning()\n\t{\n\t\treturn hourlyRate * STAFF_MONTHLY_HOURS_WORKED;\n\t}",
"public _179._6._235._119.cebwebservice.Bill billing_CalculateDetailMonthlyBill(java.lang.String accessToken, int tariff, int kwh) throws java.rmi.RemoteException;",
"public boolean isActiveLoan();",
"boolean hasClaimWithin(ExplanationOfBenefit explanationOfBenefit, UUID organizationID, String providerNPI, long withinMonth);",
"public double monthlyFee() {\r\n\r\n\t\tdouble fee = 0;\r\n\r\n\t\tif (directDeposit == true) {\r\n\t\t\treturn 0;\r\n\t\t} else if (getBalance() >= 1500) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t\tfee = 25;\r\n\t\t}\r\n\t\treturn fee;\r\n\t}",
"public double getLoanAmount() {\n return loanAmount;\n }",
"@Test\n\tpublic void negativeNumYrs() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tdouble dwnpymnt = Double.valueOf(new_page.findElement(By.name(\"downpayment\")).getAttribute(\"value\"));\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\t\n\t\t// modify year to a negative integer\n\t\tint year = -5;\n\t\tnew_page.findElement(By.name(\"year\")).clear();\n\t\tnew_page.findElement(By.name(\"year\")).sendKeys(\"-5\");\n\t\t\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int returnDay = scanner.nextInt();\n int returnMonth = scanner.nextInt();\n int returnYear = scanner.nextInt();\n int dueDay = scanner.nextInt();\n int dueMonth = scanner.nextInt();\n int dueYear = scanner.nextInt();\n int fine = 0;\n if(returnYear > dueYear) fine = 10000;\n else if(returnYear < dueYear) fine = 0;\n else if(returnMonth == dueMonth && returnDay > dueDay) {\n fine = 15 * (returnDay - dueDay);\n }\n else if(returnMonth > dueMonth){\n fine = 500 * (returnMonth - dueMonth);\n }\n\n System.out.println(fine);\n\n }",
"public static void enterDetails(int num, double interest){\r\n Scanner s = new Scanner(System.in);\r\n String name;\r\n double amm=0;\r\n int term=-1;\r\n \r\n int loanType;\r\n \r\n do{\r\n System.out.println(\"Press 1: Business Loan\\n\"\r\n + \"Press 2: Personal Loan\");\r\n loanType = parseInt(s.next());\r\n }while(!(loanType == 1 || loanType == 2));\r\n \r\n while(amm <= 0 || amm > 100000){\r\n System.out.print(\"Enter loan ammount: \");\r\n amm = parseDouble(s.next());\r\n if(amm > 100000){\r\n System.out.println(\"Loan exceeds limit\");\r\n }\r\n }\r\n System.out.print(\"Enter the term in years: \");\r\n term = parseInt(s.next());\r\n if(!(term==3 || term==5)){\r\n System.out.println(\"Loan term set to 1 year\");\r\n }\r\n \r\n System.out.print(\"Enter last name: \");\r\n name = s.next();\r\n \r\n switch (loanType) {\r\n case 1:\r\n BusinessLoan b = new BusinessLoan(num, name, amm, term, interest);\r\n if(b.loanNum!=-1){\r\n loan.add(b);\r\n System.out.println(\"Loan approved\");\r\n } \r\n break;\r\n case 2:\r\n PersonalLoan p = new PersonalLoan(num, name, amm, term, interest);\r\n if(p.loanNum!=-1){\r\n loan.add(p);\r\n System.out.println(\"Loan approved\");\r\n }\r\n break;\r\n }\r\n System.out.println(\"---------------------------------------------\");\r\n }",
"public BigDecimal numberPayments()\r\n {\r\n BigDecimal monthlyInterestRate = theApr.divide(new BigDecimal(12), 12, BigDecimal.ROUND_HALF_DOWN);\r\n BigDecimal pvMonth = thePresentValue.divide(theMonthlyPayment, 2, BigDecimal.ROUND_HALF_DOWN);\r\n double part1 = Math.log(1.0 -(pvMonth.doubleValue()) * monthlyInterestRate.doubleValue());\r\n double part2 = Math.log(1.0 + monthlyInterestRate.doubleValue());\r\n \r\n return new BigDecimal(part1).divide(new BigDecimal(part2), 2, BigDecimal.ROUND_HALF_UP);\r\n }",
"@Override\n public void calculatePayment()\n {\n this.paymentAmount = annualSalary / SALARY_PERIOD;\n }",
"public double getLoan()\r\n {\r\n return loan;\r\n }",
"@Test\r\n public void test12() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(22,0,0,5555),0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_LOAN + Consts.FULL_SUBSIDY);\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 12, correct : 9904, got : \"+ loan);\r\n \t}\r\n }",
"public void calculatePayment() {}",
"public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}",
"public boolean aMonthPasses()\n\t{\n\t\tdecreaseHealth();\n\t\tage++;\n\t\treturn false;\n\t}",
"public void loanAmount_Validation() {\n\t\thelper.assertString(usrLoanAmount_AftrLogin(), payOffOffer.usrLoanAmount_BfrLogin());\n\t\tSystem.out.print(\"The loan amount is: \" + usrLoanAmount_AftrLogin());\n\n\t}",
"public double monthlyInterest() {\r\n\t\treturn (getBalance() * 0.0005) / 12;\r\n\t}",
"public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }",
"public void calcInterest() {\n double monthlyInterestRate = annualInterestRate / 12;\n double monthlyInterest = balance * monthlyInterestRate;\n balance += monthlyInterest;\n }",
"public double getMonthlyInterestRate(){\n return annualInterestRate / 12;\n }",
"public static double monthlySavings (double totalMonthlyExpenses, double monthlyIncomeAfterTax) {\n\n\t\t// Income minus expenses\n\t\treturn monthlyIncomeAfterTax - totalMonthlyExpenses;\n\t}",
"PagedResult<Loan> listLoanByComplexCondition(String clientCode,List<RepaymentMethod> methodList,int minRate,int maxRate,int minDuration,int maxDuration,PageInfo pageInfo, List<LoanStatus> statusList);",
"public void printMonthlySummary() {\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n System.out.println(\"------- Total Rolls Sold -------\");\r\n double totalRollsSold = totalRollSales.get(\"egg\") + totalRollSales.get(\"jelly\") + totalRollSales.get(\"pastry\") + totalRollSales.get(\"sausage\") + totalRollSales.get(\"spring\");\r\n double egg = totalRollSales.get(\"egg\");\r\n double jelly = totalRollSales.get(\"jelly\");\r\n double pastry = totalRollSales.get(\"pastry\");\r\n double sausage = totalRollSales.get(\"sausage\");\r\n double spring = totalRollSales.get(\"spring\");\r\n System.out.println(\"Total Rolls Sold: \" + totalRollsSold);\r\n System.out.println(\"Total EggRolls Sold: \" + egg);\r\n System.out.println(\"Total JellyRolls Sold: \" + jelly);\r\n System.out.println(\"Total PastryRolls Sold: \" + pastry);\r\n System.out.println(\"Total SausageRolls Sold: \" + sausage);\r\n System.out.println(\"Total SpringRolls Sold: \" + spring);\r\n System.out.println(\"\");\r\n \r\n\r\n System.out.println(\"------- Total Monthly Income -------\");\r\n double totalSales = 0; \r\n totalSales = totalCustomerSales.get(\"Casual\") + totalCustomerSales.get(\"Business\") + totalCustomerSales.get(\"Catering\"); \r\n System.out.println(\"\");\r\n System.out.println(\"------- Total Roll Outage Impacts -------\");\r\n System.out.println(totalShortageImpact);\r\n }",
"public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }",
"public double getRate( ) {\nreturn monthlyInterestRate * 100.0 * MONTHS;\n}",
"public static void main(String[] args) {\n\t\tString input = \"30000~10~6~5000\";\r\n\t\t\r\n\t\tString[] values = input.split(\"~\");\r\n\t\t\r\n\t\tint loan = Integer.parseInt(values[0]);\r\n\t\tint year = Integer.parseInt(values[1]);\r\n\t\tint annualRate = Integer.parseInt(values[2]);\r\n\t\tint downpayment = Integer.parseInt(values[3]);\r\n\t\t\r\n\t\tint interestLoan = loan - downpayment;\r\n\t\t\r\n\t\tdouble month = year * 12;\r\n\t\tdouble montlyRate = (double)annualRate / 1200;\r\n\t\tDecimalFormat format = new DecimalFormat(\"#.00\");\r\n\t\tdouble interest = ((interestLoan * montlyRate)/ (1 - Math.pow((1 + montlyRate),-month)));\r\n\t\t\r\n\t\tSystem.out.println(format.format(interest));\r\n\t}",
"int getEmploymentDurationInMonths();",
"public static void displayOutput(double monthlyPayment, double totalPaid, double interestPaid)\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n DecimalFormat df = new DecimalFormat (\"$#,###,###.00\");\r\n\r\n System.out.println();\r\n System.out.println(\"The monthly payment is \" + df.format (monthlyPayment));\r\n System.out.println(\"The total paid on the loan is \" + df.format (totalPaid));\r\n System.out.println(\"The total interest paid on loan is \" + df.format (interestPaid));\r\n\r\n \r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tdouble check,servicefee;\n\t\tcheck=40;\n\t\tservicefee=1000;\n\t\t\n\t\tif (check<20 && check>=0) {\n\t\t\tservicefee=10+(0.1*check);\n\t\t}else if(check>=20 && check<40) {\n\t\t\tservicefee=10+(0.08*check);\n\t\t}else if(check>=40 && check<60) {\n\t\t\tservicefee=10+(0.06*check);\n\t\t}else if(check>=60) {\n\t\t\tservicefee=10+(0.04*check);\n\t\t}else {\n\t\t\tSystem.out.println(\"Invalid Operator\");\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"You use \" + check + \" check\\nYour monthly service fee is $\" + servicefee);\n\t\t\n\t\t\n\t\t\n\t}",
"public void calculateMMage() {\n\t\t\n\t}",
"public void calculatePayment() {\n\t\tdouble pay = this.annualSalary / NUM_PAY_PERIODS;\n\t\tsuper.setPayment(pay);\n\t}",
"@FXML\r\n\tpublic void btnCalculate(ActionEvent event) {\n\t\ttry {\r\n\t\t\tint iYearsToWork = Integer.parseInt(txtYearsToWork.getText());\r\n\t\t\tdouble dAnnualReturnWorking = Double.parseDouble(txtAnnualReturn.getText());\r\n\t\t\tint iYearsRetired = Integer.parseInt(txtYearsRetired.getText());\r\n\t\t\tdouble dAnnualReturnRetired = Double.parseDouble(txtAnnualReturnRetired.getText());\r\n\t\t\tdouble dRequiredIncome = Double.parseDouble(txtRequiredIncome.getText());\r\n\t\t\tdouble dMonthlySSI = Double.parseDouble(txtMonthlySSI.getText());\r\n\t\t\t\r\n\t\t\tif (dAnnualReturnWorking > 1 || dAnnualReturnRetired > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}\r\n\t\tcatch (NumberFormatException e) {\r\n\t\t\ttxtYearsToWork.setText(\"Please clear and enter an integer\");\r\n\t\t\ttxtAnnualReturn.setText(\"Please clear and enter a decimal\");\r\n\t\t\ttxtYearsRetired.setText(\"Please clear and enter an integer\");\r\n\t\t\ttxtAnnualReturnRetired.setText(\"Please clear and enter a decimal\");\r\n\t\t\ttxtRequiredIncome.setText(\"Please clear and enter a double\");\r\n\t\t\ttxtMonthlySSI.setText(\"Please clear and enter a double\");\r\n\t\t}\r\n\t\t\r\n\t\tfinally {\r\n\t\t\tint iYearsToWork = Integer.parseInt(txtYearsToWork.getText());\r\n\t\t\tdouble dAnnualReturnWorking = Double.parseDouble(txtAnnualReturn.getText());\r\n\t\t\tint iYearsRetired = Integer.parseInt(txtYearsRetired.getText());\r\n\t\t\tdouble dAnnualReturnRetired = Double.parseDouble(txtAnnualReturnRetired.getText());\r\n\t\t\tdouble dRequiredIncome = Double.parseDouble(txtRequiredIncome.getText());\r\n\t\t\tdouble dMonthlySSI = Double.parseDouble(txtMonthlySSI.getText());\r\n\t\t\t\r\n\t\t\tRetirement r = new Retirement(iYearsToWork, dAnnualReturnWorking, iYearsRetired, dAnnualReturnRetired, dRequiredIncome, dMonthlySSI);\r\n\t\t\r\n\t\t\tTotalSaved.setDisable(false);\r\n\t\t\tSaveEachMonth.setDisable(false);\r\n\t\t\tString month = String.format(\"$%.2f\", r.AmountToSave());\r\n\t\t\tString total = String.format(\"$%.2f\", r.TotalAmountSaved());\r\n\t\t\tSaveEachMonth.setText(month);\r\n\t\t\tTotalSaved.setText(total);\r\n\t\t\tTotalSaved.setDisable(true);\r\n\t\t\tSaveEachMonth.setDisable(true);\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\n System.out.print(\"Input an annual interest rate: \");\n float annualInterestRate = getNumber();\n \n System.out.print(\"Input a starting principal: \");\n float principal = getNumber();\n \n System.out.print(\"Input total years in fund: \");\n float yearsInFund = getNumber();\n \n System.out.print(\"Quarterly, monthly or daily? \");\n String answer = getInput();\n \n System.out.println(\"\");\n \n \n \n float currentBalance = principal;\n int year = 2017;\n float quarterlyInterestMultiplier = (1 + (annualInterestRate/4) /100);\n System.out.println(\"q\" + quarterlyInterestMultiplier);\n float monthlyInterestMultiplier = (1 + (annualInterestRate/12) /100);\n System.out.println(\"q\" + monthlyInterestMultiplier);\n float dailyInterestMultiplier = (1 + (annualInterestRate/365) /100);\n System.out.println(\"q\" + dailyInterestMultiplier);\n // System.out.println(monthlyInterestMultiplier);\n \n \n for (int i = 0; i < yearsInFund; i++) {\n \n if (answer.equals(\"quarterly\")) {\n float pastBalance = currentBalance;\n System.out.println(\"The current year is: \" + year);\n System.out.println(\"Current principal is: \" + currentBalance);\n for (int j = 0; j < 4; j++) {\n currentBalance *= quarterlyInterestMultiplier;\n }\n System.out.println(\"Total anticipated interest is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of \" + year + \" is: \" + currentBalance);\n System.out.println(\"\");\n year++;\n } else if (answer.equals(\"monthly\")) {\n for (int k = 0; k < 12; k++) {\n switch (k) {\n case 0:\n System.out.println(\"The current month is January \" + year);\n break;\n case 1:\n System.out.println(\"The current month is February \" + year);\n break;\n case 2:\n System.out.println(\"The current month is March \" + year);\n break;\n case 3:\n System.out.println(\"The current month is April \" + year);\n break;\n case 4:\n System.out.println(\"The current month is May \" + year);\n break;\n case 5:\n System.out.println(\"The current month is June \" + year);\n break;\n case 6:\n System.out.println(\"The current month is July \" + year);\n break;\n case 7:\n System.out.println(\"The current month is August \" + year);\n break;\n case 8:\n System.out.println(\"The current month is September \" + year);\n break;\n case 9:\n System.out.println(\"The current month is October \" + year);\n break;\n case 10:\n System.out.println(\"The current month is November \" + year);\n break;\n case 11:\n System.out.println(\"The current month is December \" + year);\n break;\n default:\n }\n float pastBalance = currentBalance;\n System.out.println(\"The current principal is: \" + currentBalance);\n currentBalance *= monthlyInterestMultiplier;\n System.out.println(\"Total anticipated interest is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of this month is: \" + currentBalance);\n System.out.println(\"\");\n }\n year++;\n } else if (answer.equals(\"daily\")) {\n for (int l = 0; l < 365; l++) {\n System.out.println(\"Today is day \" + (l+1) + \", \" + year);\n float pastBalance = currentBalance;\n System.out.println(\"The current principal is: \" + currentBalance);\n currentBalance *= dailyInterestMultiplier;\n System.out.println(\"Total anticipated interest by the end of day is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of the day is: \" + currentBalance);\n System.out.println(\"\");\n }\n year++;\n }\n \n }\n \n System.out.println(currentBalance);\n \n }",
"public static void main(String[] args) {\r\n\t Scanner in = new Scanner(System.in);\r\n\t int d1 = in.nextInt();\r\n\t int m1 = in.nextInt();\r\n\t int y1 = in.nextInt();\r\n\t int d2 = in.nextInt();\r\n\t int m2 = in.nextInt();\r\n\t int y2 = in.nextInt();\r\n\t LocalDate returnDate=LocalDate.of(y1,m1,d1);\r\n\t LocalDate dueDate=LocalDate.of(y2,m2,d2);\r\n\t long fine=0;\r\n\t if(returnDate.isBefore(dueDate)||returnDate.equals(dueDate))fine=0;\r\n\t else if(returnDate.isAfter(dueDate)){\r\n\t \tif(returnDate.getYear()==dueDate.getYear()){\r\n\t \t\tif(returnDate.getMonth()==dueDate.getMonth()){\r\n\t \t\t\tfine=(returnDate.getDayOfYear()-dueDate.getDayOfYear())*15;\r\n\t \t\t}else{\r\n\t \t\t\t\tfine=(returnDate.getMonthValue()-dueDate.getMonthValue())*500;\r\n\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \t\t\r\n\t } else fine=10000;\r\n\t }else fine=10000;\r\n\t System.out.println(fine);\r\n\t }",
"public void setPeriod(int periodInYears) {\nnumberOfPayments = periodInYears * MONTHS;\n}",
"@Override\r\n\tpublic double annualSalary() {\r\n\t\tdouble baseSalary;\r\n\t\tdouble annualSalary;\r\n\t\tdouble annualCommissionMax = Math.min((annualSales * .02), 20000.0);\r\n\t\tbaseSalary = (getSalaryMonth() * 12);\r\n\t\tannualSalary = baseSalary + annualCommissionMax;\r\n\t\r\n\t\treturn annualSalary;\r\n\t}",
"private void addadvanceOneMonthButtonFunction() {\n\t\tadvanceOneMonthButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tBank.getInstance().passOneMonth();\n\t\t\t\tsuccess.setText(\"success! One month has passed..\");\n\t\t\t}\t\t\n\t\t});\n\t\t\n\t}"
] |
[
"0.753986",
"0.7527013",
"0.7296135",
"0.7142621",
"0.70169896",
"0.6999454",
"0.6792776",
"0.6667228",
"0.6624169",
"0.6552582",
"0.6483604",
"0.64785814",
"0.64575166",
"0.64138985",
"0.6362942",
"0.6267533",
"0.6223715",
"0.62043464",
"0.6180803",
"0.6101607",
"0.6075778",
"0.6054246",
"0.6052997",
"0.60083866",
"0.5988799",
"0.5960751",
"0.596065",
"0.5908226",
"0.589726",
"0.5894543",
"0.58389896",
"0.5835873",
"0.5805249",
"0.58019537",
"0.5795567",
"0.57325065",
"0.5650711",
"0.56471455",
"0.5646465",
"0.562969",
"0.5616958",
"0.5613077",
"0.5574796",
"0.55392027",
"0.5532736",
"0.54858214",
"0.5471551",
"0.54703265",
"0.54410243",
"0.54395044",
"0.5429432",
"0.54102826",
"0.5391904",
"0.539169",
"0.5378834",
"0.5336408",
"0.5336203",
"0.52967805",
"0.5294504",
"0.52847946",
"0.5268754",
"0.5263831",
"0.5263815",
"0.5256745",
"0.52505016",
"0.5248084",
"0.52393264",
"0.52300966",
"0.52276087",
"0.52095306",
"0.5203796",
"0.520002",
"0.51986337",
"0.5194841",
"0.5191144",
"0.5180699",
"0.5176163",
"0.51752484",
"0.5174532",
"0.517229",
"0.51704365",
"0.5164785",
"0.5160053",
"0.51538414",
"0.5108607",
"0.51050544",
"0.50998306",
"0.5095428",
"0.5092078",
"0.50920165",
"0.5089734",
"0.508403",
"0.50824404",
"0.5080295",
"0.5077883",
"0.50715506",
"0.5071158",
"0.5069476",
"0.50625014",
"0.505278"
] |
0.6437171
|
13
|
/ monthlyPaymentFinishInYear calculates the monthly payment that one would need to pay in order to finish off the loan within 12 months.
|
public String monthlyPaymentFinishInYear(double princ, double interest)
{
interest /= 100.0;
interest += 1.0;
double amount = princ;
amount *= interest;
amount /= 12.0;
String amountAsString;
amountAsString = String.format("%.2f", amount);
return ("$" + amountAsString);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public double getMonthlyPayment() {\n double monthlyInterestRate = annualInterestRate / 1200;\n double monthlyPayment = loanAmount * monthlyInterestRate / (1 - (1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12)));\n \n return monthlyPayment;\n }",
"public static void monthlyPayment()\n\t{\n\t\tSystem.out.println(\"enter principal loan amount, years , and rate of interest\");\n\t\tfloat principal = scanner.nextFloat();\n\t\tfloat years = scanner.nextFloat();\n\t\tfloat rate = scanner.nextFloat();\n\t\t\n\t\tfloat n = 12 * years;\n\t\tfloat r = rate / (12*100);\n\t\tdouble x = Math.pow(1+rate,(-n));\t\n\t\t\n\t\tdouble payment = (principal*r) / (1-x);\n\t\tSystem.out.println(\"monthly payment is: \" + payment);\n\t}",
"public String calculateMonths(double princ, double interest, double payment)\r\n {\r\n interest /= 100.0;\r\n interest += 1.0;\r\n interest = Math.pow(interest, (1.0/12.0));\r\n\r\n double months = 0.0;\r\n\r\n while (princ > 0.0)\r\n {\r\n princ *= interest;\r\n princ -= payment;\r\n months++;\r\n\r\n if (months > 1200.0)\r\n {\r\n return \">100 years. Try a higher monthly payment.\";\r\n }\r\n }\r\n\r\n return String.valueOf(Math.round(months));\r\n }",
"public LoanMonthlyPayment calculateMonthlyPayment() {\n double monthlyInterest = loanRequest.getApr() / MONTHLY_INTEREST_DIVISOR;\n double tmp = Math.pow(1d + monthlyInterest, -1);\n tmp = Math.pow(tmp, loanRequest.getTermInMonths());\n tmp = Math.pow(1d - tmp, -1);\n return new LoanMonthlyPayment(\n monthlyInterest, loanRequest.getAmountBorrowed() * monthlyInterest * tmp\n );\n }",
"public static double calculateMonthlyPaymentBank(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n // Source : https://www.younited-credit.com/projets/pret-personnel/calculs/calculer-remboursement-pret\n double J = annualRateBank / 12; // Taux d'interet effectif = taux annuel / 12\n\n return amountLoan * (J / (1 - Math.pow(1 + J, - nbOfMonthlyPayment))); // Mensualité\n }",
"@Override\n public BigDecimal calculateMonthlyPayment(double principal, double interestRate, int termYears) {\n // System.out.println(getClass().getName() + \".calculateMonthlyPayment() call chain:\");\n // for (StackTraceElement e : Thread.currentThread().getStackTrace())\n // {\n // if (!e.getClassName().equals(getClass().getName()) &&\n // !e.getMethodName().equals(\"getStackTrace\") &&\n // !(e.getLineNumber() < -1)) {\n // System.out.println(\" L \" + e.getClassName() + \".\" + e.getMethodName() + \"(line: \" + e.getLineNumber() + \")\");\n // }\n // }\n BigDecimal p = new BigDecimal(principal);\n int divisionScale = p.precision() + CURRENCY_DECIMALS;\n BigDecimal r = new BigDecimal(interestRate).divide(ONE_HUNDRED, MathContext.UNLIMITED).divide(TWELVE, divisionScale,\n RoundingMode.HALF_EVEN);\n BigDecimal z = r.add(BigDecimal.ONE);\n BigDecimal tr = new BigDecimal(Math.pow(z.doubleValue(), termYears * 12));\n return p.multiply(tr).multiply(r).divide(tr.subtract(BigDecimal.ONE), divisionScale, RoundingMode.HALF_EVEN)\n .setScale(CURRENCY_DECIMALS, RoundingMode.HALF_EVEN);\n }",
"public static double calculateMonthlyPaymentTotal(double amountLoan, double annualRateBank, double annualRateInsurance, int nbOfMonthlyPayment){\n double monthlyPaymentBank = calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment);\n double monthlyPaymentInsurance = calculateMonthlyPaymentInsuranceOnly(amountLoan, annualRateInsurance);\n\n return monthlyPaymentBank + monthlyPaymentInsurance;\n }",
"public abstract double calculateLoanPayment(double principalAmount, double annualPrimeIntRate, int monthsAmort);",
"static int loanHelper(int principle,double interest,int payment,int month) {\n\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\tmonth++;\n\t\treturn 1+ loanHelper((int) (((principle)*(1+interest/12))-payment), interest, payment,month);\n\n\n\n\t}",
"public static double calculateMonthlyPaymentInsuranceOnly(double amountLoan, double annualRateInsurance){\n return amountLoan * (annualRateInsurance / 12);\n }",
"public double getTotalPayment() {\n double totalPayment = getMonthlyPayment() * numberOfYears * 12;\n \n return totalPayment;\n }",
"public double getMonthlyAmount()\n\t{\n\t\treturn amountGoal%timeFrame;\n\t}",
"public int getLastMonthOfYear (int year)\n {\n return 12;\n }",
"public int annualSalary(){\r\n int aSalary = monthlySalary * MONTHS;\r\n return aSalary;\r\n }",
"public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}",
"@Test\n public void computeFactor_TwoMonthsOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-03-01 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-02 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 1 months\n assertEquals(1, factor, 0);\n }",
"public static double calculateMonthlyPaymentWithNotRate(double amountLoan, int nbOfMonthlyPayment){\n return amountLoan / nbOfMonthlyPayment;\n }",
"private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }",
"public java.lang.String CC_GetCompletedJobsInMonth(java.lang.String accessToken, java.lang.String CCCode, java.util.Calendar yearMonth) throws java.rmi.RemoteException;",
"static int loanLength(int principle, double interest, int payment) {\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month 0: $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\n\n\t\t\tint month=0;\n\t\t\tint loandate= loanHelper(principle,interest,payment,month)-1; // Subtract one because it counts month 0 as a month\n\t\t\treturn loandate;\n\t\t}\n\n\t}",
"public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }",
"public double monthlyEarning()\n\t{\n\t\treturn hourlyRate * STAFF_MONTHLY_HOURS_WORKED;\n\t}",
"public static double calcMonthlyPayment(int term, double amount, double rate)\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n rate = rate / 100;\r\n double num1 = rate * (Math.pow((1 + rate), (term * 12)));\r\n double num2 = Math.pow((1 + rate), (term * 12)) - 1;\r\n double monthlyPayment = amount * (num1 / num2);\r\n return monthlyPayment;\r\n }",
"public double monthlyEarnings() {\n\t\tif(level == \"AS\") {\n\t\t\treturn FACULTY_MONTH_SALARY;\n\t\t}\n\t\telse if(level == \"AO\") {\n\t\t\treturn FACULTY_MONTH_SALARY*1.5;\n\t\t}\n\t\telse {\n\t\t\treturn FACULTY_MONTH_SALARY*2;\n\t\t}\n\t}",
"public static double monthlySavings (double totalMonthlyExpenses, double monthlyIncomeAfterTax) {\n\n\t\t// Income minus expenses\n\t\treturn monthlyIncomeAfterTax - totalMonthlyExpenses;\n\t}",
"public static double monthlySavings(double tS, double annualReturn, double yearsWorked) {\r\n\t\treturn tS * ((annualReturn / 100) / 12) / (Math.pow((1 + (annualReturn / 100) / 12), (yearsWorked * 12)) - 1);\r\n\t}",
"public static double calculateMonthlyPaymentInterestBankOnly(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n return calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment) - calculateMonthlyPaymentWithNotRate(amountLoan, nbOfMonthlyPayment);\n }",
"private static double totalPricePerMonth(double price_interest, int months) {\n \treturn price_interest / months;\n }",
"public void getMonthlyPayment(View view) {\n //Get all the EditText ids\n EditText principal = findViewById(R.id.principal);\n EditText interestRate = findViewById(R.id.interestRate);\n EditText loanTerm = findViewById(R.id.loanTerm);\n\n //Get the values for principal, MIR and the term of the loan\n double p = Double.parseDouble(principal.getText().toString());\n double r = Double.parseDouble(interestRate.getText().toString());\n double n = Double.parseDouble(loanTerm.getText().toString());\n\n\n //Calculate the monthly payment and round the number to 2 decimal points\n TextView display = findViewById(R.id.display);\n double monthlyPayment;\n DecimalFormat df = new DecimalFormat(\"#.##\");\n monthlyPayment = (p*r/1200.0)/(1-Math.pow((1.0+r/1200.0),(-12*n)));\n\n //Display the number in TextView\n display.setText(String.valueOf(df.format(monthlyPayment)));\n\n\n }",
"public double getPer_month(){\n\t\tdouble amount=this.num_of_commits/12;\n\t\treturn amount;\n\t}",
"@Override\n\tpublic double calcGrossPay(int month, int year) {\n\t\tdouble sum=0;\n\t\tmonth--;\n\t\tfor (Order order:orderList)\n\t\t{\n\t\t\tDate date=order.orderDate;\n\t\t\tif (date.getYear()==year && date.getMonth()==month)\n\t\t\t\tsum+=order.orderAmount;\n\t\t}\n\t\treturn baseSalary+commission*sum;\n\t}",
"@Override\r\n\tpublic double annualSalary() {\r\n\t\tdouble baseSalary;\r\n\t\tdouble annualSalary;\r\n\t\tdouble annualCommissionMax = Math.min((annualSales * .02), 20000.0);\r\n\t\tbaseSalary = (getSalaryMonth() * 12);\r\n\t\tannualSalary = baseSalary + annualCommissionMax;\r\n\t\r\n\t\treturn annualSalary;\r\n\t}",
"public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}",
"@NotNull\n public Money monthlyRate(@NotNull BigDecimal yearlyRateInPercent) {\n return new Money(percentage(yearlyRateInPercent), currency);\n }",
"public int getTotalYearToDate() {\n\n LocalDate endOfPeriod = this.getCancelDate();\n if (null == endOfPeriod) {\n endOfPeriod = LocalDate.now();\n }\n\n Period periodBetween = Period.between(this.getPeriodStartDate(), endOfPeriod);\n if (periodBetween.isNegative()) {\n return 0;\n }\n int monthsBetween = (int)periodBetween.toTotalMonths();\n\n /*Round any additional days into an entire month*/\n if (periodBetween.getDays() > 0) {\n monthsBetween++;\n }\n\n return monthsBetween * this.getMonthlyAmount();\n\n }",
"public double calculateSalary(int month)\n\t{\n\t\tdouble calculatedSalary = this.annualSalary / 14.0d;\n\t\t\n\t\tswitch(month)\n\t\t{\n\t\t\tcase 3:\n\t\t\tcase 6:\n\t\t\tcase 9:\n\t\t\tcase 12:\n\t\t\t\t//what a lucky boy (or girl) this professor is\n\t\t\t\tcalculatedSalary *= 1.5;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//I have no idea whether java accepts switch case without the default,\n\t\t\t\t//so better be safe and just put it here.\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn calculatedSalary;\n\t}",
"@Override\r\n\tpublic double monthlyFee(double balance) {\r\n \tif(balance >= 300){\r\n \treturn 0;\r\n \t}\r\n \telse\r\n \treturn 5;\r\n \t}",
"public void earnMonthlyInterest(){\r\n\t\tbalance += balance * getYearlyInterestRate() / 12 ;\r\n\t}",
"public double yearlySalary() {\n\t\treturn monthlySalary * 12;\n\t}",
"public static double[] buildPayments (double postTaxIncome) {\n\n\t\t// Monthly credict card payment array\n\t\tdouble monthlyCreditCardPayments [] = new double[12];\n\n\t\t// for loop to populate payment array\n\t\tfor (int i = 0; i < monthlyCreditCardPayments.length; i++) {\n\t\t\t\n\t\t\t// Every month use 10% of post-tax income to pay off credit card\n\t\t\tmonthlyCreditCardPayments[i] += postTaxIncome * 0.10;\n\n\t\t\t// In the month of December\n\t\t\tif (i == 11) {\n\n\t\t\t\t// Use gift from family (holiday) towards paying of credit card \n\t\t\t\tmonthlyCreditCardPayments[i] += 150;\n\t\t\t}\n\n\t\t\tif (i == 8) {\n\t\t\t\t\n\t\t\t\t// Use gift from family (university) towards paying of credit card \n\t\t\t\tmonthlyCreditCardPayments[i] += 200;\n\t\t\t}\n\n\t\t}\n\n\t\treturn monthlyCreditCardPayments;\n\n\t}",
"float getMonthlySalary();",
"public double monthlyEarning() {\n\t\tdouble me = 0.0;\r\n\t\tString input = getLevel();\r\n\t\tif ( input == \"GRAD\")\r\n\t\t\tme = Faculty_Monthly_Salary; // interface variable\r\n\t\telse if ( input == \"ASSOC\")\r\n\t\t\tme = Faculty_Monthly_Salary * 1.2;\r\n\t\telse if ( input == \"PROF\")\r\n\t\t\tme = Faculty_Monthly_Salary * 1.4;\r\n\t\treturn me;\r\n\t\t// if i put these in reverse, i wouldve had to intialize at 1\r\n\t\t//so month earning wouldnt be at 0, and then 0 * 1.2 would equal 0 instead of 1.2\r\n\t}",
"public void monthlyPayment_Validation() {\n\t\thelper.assertString(monthlyPayment_AftrLogin(), payOffOffer.monthlyPayment_BfrLogin());\n\t\tSystem.out.print(\"The Monthly Payment is: \" + monthlyPayment_AftrLogin());\n\t}",
"public double calculateMonthlyTotal(ExpenseRetrievalResponse expenseRetrievalResponse){\n LinkedList<Expense> expenses = expenseRetrievalResponse.getExpenses();\n\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"public double getMonthlyInterest(){\n return balance * (getMonthlyInterestRate() / 100);\n }",
"@Override\n public int annualSalary() {\n int commission;\n if (getAnnualSales() * getCommissionAmount() > getMaximumCommission()) { //Checks if the commission would be over the max\n commission = (int) getMaximumCommission();\n } else {\n commission = (int) (getAnnualSales() * getCommissionAmount());\n }\n return (this.getSalary() * getMonthInYear()) + commission;\n }",
"public double getMonthlyInterestRate(){\n\t\tdouble monthlyInterestRate = (annualInterestRate/100) / 12;\n\t\treturn monthlyInterestRate;\n\t}",
"double getMonthlyInterestRate(){\r\n\t\treturn annualInterestRate/12;\r\n\t}",
"public BigDecimal numberPayments()\r\n {\r\n BigDecimal monthlyInterestRate = theApr.divide(new BigDecimal(12), 12, BigDecimal.ROUND_HALF_DOWN);\r\n BigDecimal pvMonth = thePresentValue.divide(theMonthlyPayment, 2, BigDecimal.ROUND_HALF_DOWN);\r\n double part1 = Math.log(1.0 -(pvMonth.doubleValue()) * monthlyInterestRate.doubleValue());\r\n double part2 = Math.log(1.0 + monthlyInterestRate.doubleValue());\r\n \r\n return new BigDecimal(part1).divide(new BigDecimal(part2), 2, BigDecimal.ROUND_HALF_UP);\r\n }",
"@Test\n public void computeFactor_FebruaryOfLeapYear() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-01 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-02-29 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-02-01 00:00:00\", \"2012-03-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.DAY,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then factor is 29 (days)\n assertEquals(29, factor, 0);\n }",
"public static void printBalance (double creditCardBalance, double yearlyInterestRate, double[] monthlyExpenses, double[] monthlyPaymets) {\n\n\t\tdouble interest = 0;\n\n\t\t// for loop to iterate through each month\n\t\tfor (int i = 0; i < 12; i++) {\n\n\t\t\t// Add the current months expenses to the credit card balance\n\t\t\tcreditCardBalance += monthlyExpenses[i];\n\n\t\t\t// Subtract the current months credit card payment from the credit card balance\n\t\t\tcreditCardBalance -= monthlyPaymets[i];\n\n\t\t\t// Calculate this months interest based on balance and yearly interest rate\n\t\t\tinterest = creditCardBalance * ((yearlyInterestRate / 100) / 12);\n\t\t\t// Add this months interest to the credit card balance\n\t\t\tcreditCardBalance += interest;\n\n\t\t\tif (creditCardBalance <= 0) {\n\t\t\t\tinterest = 0;\n\t\t\t\t\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Month \" + (i + 1) + \" balance \" + (Math.round(creditCardBalance * 100.0) / 100.0));\n\n\t\t}\n\n\t}",
"private double calculateYearlyLoyaltyPoints(int year){\n \tLoyalty txnLoyalty = compositePOSTransaction.getLoyaltyCard();\n\t\tif (txnLoyalty == null){\n\t\t\treturn 0.0;\n\t\t}else if(!txnLoyalty.isYearlyComputed()){\n\t\t\treturn 0.0;\n\t\t}\n\t\t\n\t\tif(com.chelseasystems.cr.swing.CMSApplet.theAppMgr!=null &&\n \t\t\tcom.chelseasystems.cr.swing.CMSApplet.theAppMgr.getStateObject(\"THE_TXN\") != null){\n \t\t// this is an inquiry\n\t\t\tif (year == 0) {\n\t\t\t\treturn txnLoyalty.getCurrYearBalance();\n\t\t\t} else {\n\t\t\t\treturn txnLoyalty.getLastYearBalance();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble loyaltyUsed = compositePOSTransaction.getUsedLoyaltyPoints();\n\t\tdouble points = compositePOSTransaction.getLoyaltyPoints();\n\n\t\tdouble currBal = txnLoyalty.getCurrBalance();\n\t\tdouble currYearBal = txnLoyalty.getCurrYearBalance();\n\t\tdouble lastYearBal = txnLoyalty.getLastYearBalance();\n\t\tif (loyaltyUsed > 0) {\n\t\t\tif (txnLoyalty.getLastYearBalance() < loyaltyUsed) {\n\t\t\t\tcurrYearBal = currYearBal - (loyaltyUsed - lastYearBal);\n\t\t\t\tlastYearBal = 0.0;\n\t\t\t} else {\n\t\t\t\tlastYearBal -= loyaltyUsed;\n\t\t\t}\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t} else {\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t\tcurrYearBal -= loyaltyUsed;\n\t\t}\n\n\t\tif (txnLoyalty.isYearlyComputed()) {\n\t\t\tcurrYearBal += points;\n\t\t} else {\n\t\t\tcurrYearBal = 0.0;\n\t\t\tlastYearBal = 0.0;\n\t\t}\n\n\t\tif (year == 0) {\n\t\t\treturn currYearBal;\n\t\t} else {\n\t\t\treturn lastYearBal;\n\t\t}\n }",
"int getEmploymentDurationInMonths();",
"public double calculateApprovedMonthlyTotal(LinkedList<Expense> expenses){\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(expense.isApproved() && dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"public double calculateApprovedMonthlyTotal(ExpenseRetrievalResponse expenseRetrievalResponse){\n LinkedList<Expense> expenses = expenseRetrievalResponse.getExpenses();\n\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(expense.isApproved() && dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"public int keptPeriod(int returnedDay,int returendMonth, int returnedYear){\n //following equation can convert georgian date to a julian day number\n int julianDue=((1461*(year + 4800 + (month-14)/12))/4 +(367 * (month - 2 - 12 * ((month- 14)/12)))/12 - (3 * ((year + 4900 + (month - 14)/12)/100))/4 + day - 32075);\n int julianReturned=((1461*(returnedYear + 4800 + (returendMonth-14)/12))/4 +(367 * (returendMonth - 2 - 12 * ((returendMonth- 14)/12)))/12 - (3 * ((returnedYear + 4900 + (returendMonth - 14)/12)/100))/4 + returnedDay - 32075);\n //getting difference between the due date and the returning date by subtracting julian day numbers.\n //this method will also consider leap years, if there is any.\n int duration=julianReturned-julianDue;\n\n return duration;\n }",
"public double monthlyInterest() {\r\n\t\treturn (getBalance() * 0.0005) / 12;\r\n\t}",
"public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }",
"public double calculateMonthlyTotal(LinkedList<Expense> expenses){\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }",
"@Override\r\n\tpublic double monthlyInterest() {\r\n\t\tdouble interest;\r\n \tif(isLoyal){\r\n \t//0.35%/12\r\n \t\tinterest = 0.35 / 100.0;\r\n \treturn interest / 12;\r\n \t} \r\n \telse //0.25%/12\r\n \t\tinterest = 0.25 / 100.0;\r\n \t\treturn interest / 12; \r\n\t}",
"public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}",
"@Override\n public void calculatePayment()\n {\n this.paymentAmount = annualSalary / SALARY_PERIOD;\n }",
"public int getEndMonth()\n\t{\n\t\treturn this.mEndMonth;\n\t}",
"public RetirementYears(int year, double preTB, double postTB, double Total){\n \n this.year = year;\n this.preTB = preTB;\n this.postTB = postTB;\n this.Total = Total;\n }",
"public BigDecimal futureValue(Integer paymentsInMonths)\r\n {\r\n List<Payment> schedule = amortizationSchedule();\r\n \r\n BigDecimal totalPayed = BigDecimal.ZERO;\r\n for (int paymentNumber = 0; paymentNumber < paymentsInMonths; paymentNumber++)\r\n {\r\n Payment payment = schedule.get(paymentNumber);\r\n totalPayed = totalPayed.add(payment.getPrinciple());\r\n }\r\n BigDecimal fv = getBalance().add(totalPayed);\r\n return fv.setScale(2, BigDecimal.ROUND_HALF_DOWN);\r\n }",
"public BigDecimal getMoneyPaidForYear(int year) {\n if (year == endDate.getYear()) {\n return moneyPaid.subtract(prevYearMoneyPaid);\n } else if (year == effectDate.getYear()) {\n return prevYearMoneyPaid;\n }\n return BigDecimal.ZERO;\n }",
"public float calculateTotalFee(){\n int endD = parseInt(endDay);\n int startD = parseInt(startDay);\n int endM = parseInt(convertMonthToDigit(endMonth));\n int startM = parseInt(convertMonthToDigit(startMonth));\n int monthDiff = 0;\n float totalFee = 0;\n //get the stay duration in months\n monthDiff = endM - startM;\n \n System.out.println(\"CALCULATING TOTAL FEE:\");\n \n stayDuration = 1;\n if(monthDiff == 0){ //on the same month\n if(startD == endD){\n stayDuration = 1;\n }else if(startD < endD){ //Same month, diff days\n stayDuration = 1 + (parseInt(endDay) - parseInt(startDay));\n }\n }else if(monthDiff > 0){ //1 month difference\n \n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n \n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else if(startD <= endD){ //if end day is greater than start day\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 30;\n break; \n \n case \"February\": \n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 29;\n break; \n \n default:\n break;\n }\n }\n }else if(monthDiff < 0){\n if(startMonth == \"December\" && endMonth == \"January\"){\n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n\n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else{\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n }\n }\n }\n \n totalFee = (int) (getSelectedRoomsCounter() * getSelectedRoomPrice());\n totalFee *= stayDuration;\n \n //console log\n System.out.println(\"stayDuration: \"+ stayDuration);\n System.out.println(\"Total Fee: \" + totalFee +\"php\");\n return totalFee;\n }",
"public BigDecimal getLastmonthFee() {\r\n return lastmonthFee;\r\n }",
"int calDateMonth(int mC,int yC,int mG,int yG){//(current-month, current-year, goal-month, goal-year)\n int x = 0,i,countM=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countM += 12;\n }\n\n countM -= mC;\n countM += mG;\n return (countM);\n }",
"Long getCompletedBugAveDurationByProjectIdDateBackByMonth(Integer projectId, Integer months);",
"public double getMonthlyInterestRate(){\n return annualInterestRate / 12;\n }",
"private Date createExpiredAfter(final int month, final int year) {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\t\n\t\tcalendar.set(year, month - 1, 0, 23, 59, 59);\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t\n\t\treturn calendar.getTime();\n\t}",
"public double getMonthlyInterestRate() {\n return ((annualInterestRate / 100)/12);\n }",
"public static double processSomething(double loanAmt, double intRateAnnual, int termYears) {\n double intRateMonthly = (intRateAnnual/ 100) / 12;\n double base = (1 + intRateMonthly);\n double termMonths = termYears * 12;\n double minMonthlyPaymt = 0.0;\n minMonthlyPaymt = ((intRateMonthly * loanAmt) / (1 - Math.pow(base, -termMonths)));\n\n return minMonthlyPaymt;\n }",
"public double getMonthlyInterestRate() {\n return (annualInterestRate / 100) / 12 ;\n }",
"public static int getTotalNumberOfDays(int year, int month) { \n int total=0;\n for(int q = 1800; q < year; q++){\n if(isLeapYear(q)){\n total = total + 366; //leap year\n }\n else{\n total = total + 365;//not leap year or regular year\n } \n }\n for(int q = 1; q <= month - 1; q++){\n total = total + getNumberOfDaysInMonth(year, q);\n }\n return total;//returns the total \n }",
"@Test\n public void computeFactor_SummerTimeMonth() {\n long startTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-01-13 00:00:00\");\n long endTimeUsage = DateTimeHandling\n .calculateMillis(\"2012-04-25 23:59:59\");\n BillingInput billingInput = BillingInputFactory.newBillingInput(\n \"2012-01-01 00:00:00\", \"2012-05-01 00:00:00\");\n\n // when\n double factor = calculator.computeFactor(PricingPeriod.MONTH,\n billingInput, startTimeUsage, endTimeUsage, true, true);\n\n // then\n assertEquals(4, factor, 0);\n }",
"public void setPeriod(int periodInYears) {\nnumberOfPayments = periodInYears * MONTHS;\n}",
"public double monthlyFee() {\r\n\r\n\t\tdouble fee = 0;\r\n\r\n\t\tif (directDeposit == true) {\r\n\t\t\treturn 0;\r\n\t\t} else if (getBalance() >= 1500) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t\tfee = 25;\r\n\t\t}\r\n\t\treturn fee;\r\n\t}",
"public double getMonthlyInterest(){\n\t\tdouble monthlyInterest = balance * getMonthlyInterestRate();\n\t\treturn monthlyInterest;\n\t}",
"public List<ScheduledAmortizationPayment> calculateAmortizationSchedule() {\n final int maxNumberOfPayments = loanRequest.getTermInMonths() + 1;\n LoanMonthlyPayment loanMonthlyPayment = this.calculateMonthlyPayment();\n int paymentNumber = 0;\n double totalPayments = 0;\n double totalInterestPaid = 0;\n double balance = loanRequest.getAmountBorrowed();\n List<ScheduledAmortizationPayment> payments = new LinkedList<ScheduledAmortizationPayment>();\n payments.add(new ScheduledAmortizationPayment(paymentNumber++, 0d, 0d, balance, 0d, 0d));\n while ((balance > 0) && (paymentNumber <= maxNumberOfPayments)) {\n double curMonthlyInterest = balance * loanMonthlyPayment.getMonthlyInterest();\n double curPayoffAmount = balance + curMonthlyInterest;\n double curMonthlyPaymentAmount = Math.min(loanMonthlyPayment.getMonthlyPayment(),\n curPayoffAmount);\n if ((paymentNumber == maxNumberOfPayments)\n && ((curMonthlyPaymentAmount == 0) || (curMonthlyPaymentAmount == curMonthlyInterest))) {\n curMonthlyPaymentAmount = curPayoffAmount;\n }\n double curMonthlyPrincipalPaid = curMonthlyPaymentAmount - curMonthlyInterest;\n double curBalance = balance - curMonthlyPrincipalPaid;\n totalPayments += curMonthlyPaymentAmount;\n totalInterestPaid += curMonthlyInterest;\n payments.add(new ScheduledAmortizationPayment(\n paymentNumber++, curMonthlyPaymentAmount, curMonthlyInterest,\n curBalance, totalPayments, totalInterestPaid\n )\n );\n balance = curBalance;\n }\n return payments;\n }",
"private static int numMonths(int year) {\n \tint mnths = 1;\n \t\n \tif(year > 0) {\n \t\tmnths = year * 12;\n \t}\n \t\n \treturn mnths;\n }",
"@Override\n\tpublic double computeMonthlyPremium(double salary) {\n\t\treturn salary*0.08;\n\t}",
"private double getCompletedTransactions(int month, int day, int year,\r\n\t\t\tint storeCode) {\n\t\tString query = \"SELECT SUM(p.AMT) FROM invoice o, payment_item p WHERE MONTH (o.TRANS_DT) = '\"+month+\"' && YEAR(o.TRANS_DT) = '\"+year+\"' && DAY(o.TRANS_DT) = '\"+day+\"' AND p.OR_NO = o.OR_NO AND p.STORE_CODE = o.STORE_CODE AND o.STORE_CODE = '\"+storeCode+\"'\"\r\n\t\t + \" AND EXISTS (SELECT 1 FROM INVOICE_SET s WHERE s.OR_NO = o.OR_NO) \";\r\n\t\t\r\n\t\tSystem.out.println(\"COMPLETED TRANSACTIONS QUERY = \" + query);\r\n\t\t\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(query);\r\n//\t\tResultSet rs = Main.getDBManager().executeQuery(\"SELECT sum(p.AMT) from payment_item p WHERE MONTH (p.TRANS_DT) = '\"+month+\"' && YEAR(p.TRANS_DT) = '\"+year+\"' && DAY(p.TRANS_DT) = '\"+day+\"' AND p.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble completedTransactions = 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tcompletedTransactions = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tlogger.debug(\"Completed Transactions: \"+completedTransactions);\r\n\t\treturn completedTransactions;\r\n\t}",
"public double getMonthlySalary() {\n\t\treturn monthlySalary;\n\t}",
"public String asMonthYear() {\n return new SimpleDateFormat(\"MM/yyyy\").format(expiredAfter);\n\t}",
"public double getMonthlyInterest()\n\t\t {\n\t\t\t return balance * monthlyInterestRate;\n\t\t }",
"public void setLastmonthFee(BigDecimal lastmonthFee) {\r\n this.lastmonthFee = lastmonthFee;\r\n }",
"public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}",
"public float getMonthlySalary() {\n return monthlySalary_;\n }",
"public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}",
"public float getMonthlySalary() {\n return monthlySalary_;\n }",
"public double makeAPayment(double annualLeaseAmount){\n double paymentMade = 0.0;//\n return paymentMade;\n /*Now it's 0.0. There must be a place somewhere\n that has a 'make a payment'\n button or text field or whatever...\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ \n }",
"public final native double setUTCFullYear(int year, int month) /*-{\n this.setUTCFullYear(year, month);\n return this.getTime();\n }-*/;",
"@Override\n public int getMonth() {\n return this.deadline.getMonth();\n }",
"@Test\n public void monthlySalaryTest() {\n double expected = 2432.00;\n\n assertEquals(\"The expected value for the monthly salary does not match the actual\",\n expected, e1.monthlySalary(), 0.001);\n }",
"public static int calculateYears ( double principal, double interest, double tax, double desired){\n\n int y = 0;\n while (principal < desired) {\n principal = (principal * (interest + 1)) - ((principal * interest) * tax);\n y++;\n }\n return y;\n }",
"public int monthsBetween(Date endDate) {\r\n\t\t// int monthDiff = 0;\r\n\t\t// if (month <= endDate.month) {\r\n\t\t// if (day <= endDate.day) {\r\n\t\t// monthDiff = (endDate.month - month)\r\n\t\t// + (endDate.year - year) * 12;\r\n\t\t// } else {\r\n\t\t// monthDiff = (endDate.month - month - 1)\r\n\t\t// + (endDate.year - year) * 12;\r\n\t\t// }\r\n\t\t// } else {\r\n\t\t// if (day <= endDate.day) {\r\n\t\t// monthDiff = (12 - month + endDate.month)\r\n\t\t// + (endDate.year - year - 1) * 12;\r\n\t\t// } else {\r\n\t\t// monthDiff = (11 - month + endDate.month)\r\n\t\t// + (endDate.year - year - 1) * 12;\r\n\t\t// }\r\n\t\t// }\r\n\t\t// return monthDiff;\r\n\r\n\t\t// Yuanzhe Begin:\r\n\t\tint monthsBetween = 0;\r\n\r\n\t\tif (compareTo(endDate) <= 0) {\r\n\t\t\tint tmpMonths = 0;\r\n\t\t\twhile (true) {\r\n\t\t\t\ttmpMonths++;\r\n\t\t\t\tDate tmpDate = this.addMonths(tmpMonths);\r\n\t\t\t\tif (tmpDate.compareTo(endDate) <= 0) {\r\n\t\t\t\t\tmonthsBetween++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn monthsBetween;\r\n\t\t} else {\r\n\t\t\tint tmpMonths = 0;\r\n\t\t\twhile (true) {\r\n\t\t\t\ttmpMonths++;\r\n\t\t\t\tDate tmpDate = endDate.addMonths(tmpMonths);\r\n\t\t\t\tif (tmpDate.compareTo(this) <= 0) {\r\n\t\t\t\t\tmonthsBetween++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -monthsBetween;\r\n\t\t}\r\n\t\t// Yuanzhe End:\r\n\t}",
"@org.junit.Test\n public void kYearMonthDurationMultiply12() {\n final XQuery query = new XQuery(\n \"xs:yearMonthDuration(\\\"P3Y3M\\\") * xs:yearMonthDuration(\\\"P3Y3M\\\")\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XPTY0004\")\n );\n }",
"public int getMaxYearAmount() {\r\n return maxYearAmount;\r\n }"
] |
[
"0.7132654",
"0.686721",
"0.67300665",
"0.67144877",
"0.66306525",
"0.6612695",
"0.6529121",
"0.65152234",
"0.601041",
"0.59446025",
"0.59183323",
"0.590477",
"0.58787525",
"0.58625597",
"0.5853158",
"0.57973665",
"0.5789009",
"0.57750344",
"0.5740921",
"0.57215333",
"0.56973207",
"0.56243765",
"0.5605926",
"0.5587537",
"0.5580416",
"0.55636483",
"0.55461925",
"0.55458045",
"0.55431736",
"0.5531835",
"0.5526891",
"0.5516205",
"0.5480827",
"0.54763746",
"0.54670995",
"0.5441718",
"0.54381907",
"0.5433947",
"0.53986764",
"0.538012",
"0.53437954",
"0.53409183",
"0.5324852",
"0.5313213",
"0.53089446",
"0.5298515",
"0.5297534",
"0.52933115",
"0.5291822",
"0.52914286",
"0.52832615",
"0.52805704",
"0.52760035",
"0.52602404",
"0.52597785",
"0.5258828",
"0.5224468",
"0.5221079",
"0.521398",
"0.5187365",
"0.51760584",
"0.51742595",
"0.5170841",
"0.51666933",
"0.5137381",
"0.51349425",
"0.51307815",
"0.51260597",
"0.51112646",
"0.511115",
"0.5104016",
"0.5081891",
"0.5068298",
"0.5065351",
"0.5058816",
"0.5054251",
"0.5035694",
"0.50279987",
"0.5023733",
"0.5018131",
"0.50134146",
"0.4997991",
"0.49925792",
"0.49915582",
"0.49891838",
"0.4971812",
"0.49508703",
"0.49491057",
"0.49249256",
"0.4916797",
"0.49063584",
"0.49040374",
"0.4882932",
"0.48642337",
"0.48628044",
"0.48617756",
"0.48537552",
"0.48382044",
"0.4836884",
"0.4834499"
] |
0.7507376
|
0
|
/ addTrans is called when the "Add transaction" button is clicked; it adds a new transaction, based on the fields in this form, to the current selected week (the week that was visible) before attempting to add a transaction).
|
public void addTrans(View v)
{
Log.d(TAG, "Add transaction button clicked!");
EditText editLabel = (EditText) findViewById(R.id.edit_label);
String label = (editLabel == null)? "" : editLabel.getText().toString();
EditText editAmount = (EditText) findViewById(R.id.edit_amount);
double amount = ((editAmount == null) || (editAmount.getText().toString().equals("")))? 0 :
Double.valueOf(editAmount.getText().toString());
CheckBox chkBill = (CheckBox) findViewById(R.id.chk_bill);
CheckBox chkLoan = (CheckBox) findViewById(R.id.chk_loan);
String special = "";
special = (chkBill == null || !chkBill.isChecked())? special : "Bill";
special = (chkLoan == null || !chkLoan.isChecked())? special : "Loan";
EditText editTag = (EditText) findViewById(R.id.edit_tag);
String tag = (editTag == null)? "" : editTag.getText().toString();
Transaction t = new Transaction(false, amount, label, special, tag);
Week weekAddedTo = BasicFinancialMainActivity.weeks
.get(BasicFinancialMainActivity.currentWeekIndex);
weekAddedTo.addTrans(t);
BasicFinancialMainActivity.weeks.set(BasicFinancialMainActivity.currentWeekIndex, weekAddedTo);
BasicFinancialMainActivity.saveWeeksData();
startActivity(new Intent(this, BasicFinancialMainActivity.class));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addTransaction(Transactions t){\n listOfTransactions.put(LocalDate.now(), t);\n }",
"public void addTransaction(Transaction trans)\n {\n SolrInputDocument solr_doc = new SolrInputDocument();\n solr_doc.setField(\"type\",\"Transaction\");\n solr_doc.setField(\"hashBlock\",trans.getHashBlock());\n solr_doc.setField(\"trans_id_split\",trans.getTrans_id_split());\n solr_doc.setField(\"transaction_id\",trans.getTransaction_id());\n solr_doc.setField(\"transaction_fee\",trans.getTransaction_fee());\n solr_doc.setField(\"transaction_size_kb\",trans.getTransaction_size_kb());\n solr_doc.setField(\"from_amout\",trans.getFrom_amout());\n solr_doc.setField(\"to_amount\",trans.getTo_amount());\n\n try {\n client.add(solr_doc);\n } catch (SolrServerException | IOException e) {\n e.printStackTrace();\n }\n\n commit();\n\n }",
"private void transactionAdd(PlanRecord plan, Context context) {\n final Calendar cal = Calendar.getInstance();\n Locale locale = context.getResources().getConfiguration().locale;\n DateTime date = new DateTime();\n date.setCalendar(cal);\n\n ContentValues transactionValues = new ContentValues();\n transactionValues.put(DatabaseHelper.TRANS_ACCT_ID, plan.acctId);\n transactionValues.put(DatabaseHelper.TRANS_PLAN_ID, plan.id);\n transactionValues.put(DatabaseHelper.TRANS_NAME, plan.name);\n transactionValues.put(DatabaseHelper.TRANS_VALUE, plan.value);\n transactionValues.put(DatabaseHelper.TRANS_TYPE, plan.type);\n transactionValues.put(DatabaseHelper.TRANS_CATEGORY, plan.category);\n transactionValues.put(DatabaseHelper.TRANS_MEMO, plan.memo);\n transactionValues.put(DatabaseHelper.TRANS_TIME, date.getSQLTime(locale));\n transactionValues.put(DatabaseHelper.TRANS_DATE, date.getSQLDate(locale));\n transactionValues.put(DatabaseHelper.TRANS_CLEARED, plan.cleared);\n\n //Insert values into accounts table\n context.getContentResolver().insert(MyContentProvider.TRANSACTIONS_URI, transactionValues);\n }",
"public Transaction addTransaction(User user, TransactionForm transactionForm) {\n return addTransactions(user, ImmutableList.of(transactionForm)).get(0);\n }",
"protected final Transaction addTransaction(Transaction trans) {\n\t\treturn addTransactionTo(getAccount(), trans);\n\t}",
"@Override\n\tpublic void addTransactionToDatabase(Transaction trans) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString insertQuery = \"insert into transaction_history values(default, ?, ?, ?, now())\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(insertQuery);\n \n\t\t\tprepStmt.setInt(1, trans.getAccountId());\n\t\t\tprepStmt.setString(2, trans.getUsername());\n\t\t\tprepStmt.setDouble(3, trans.getAmount());\n\t\t\tprepStmt.executeUpdate();\n\t}",
"public void addButton(ActionEvent event) {\n\t\tString daysOfWeek = \"\";\n\t\tif (sundayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Sunday\";\n\t\t\telse daysOfWeek += \", Sunday\";\n\t\t}\n\t\tif (mondayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Monday\";\n\t\t\telse daysOfWeek += \", Monday\";\n\t\t}\n\t\tif (tuesdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Tuesday\";\n\t\t\telse daysOfWeek += \", Tuesday\";\n\t\t}\n\t\tif (wednesdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Wednesday\";\n\t\t\telse daysOfWeek += \", Wednesday\";\n\t\t}\n\t\tif (thursdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Thursday\";\n\t\t\telse daysOfWeek += \", Thursday\";\n\t\t}\n\t\tif (fridayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Friday\";\n\t\t\telse daysOfWeek += \", Friday\";\n\t\t}\n\t\tif (saturdayCheck.isSelected()) {\n\t\t\tif (daysOfWeek.equals(\"\")) daysOfWeek += \"Saturday\";\n\t\t\telse daysOfWeek += \", Saturday\";\n\t\t}\n\t\t\n\t\t// Make the proper string for the medication and then add it to the medList\n\t\tString tempFullDay = daysOfWeek + \" - \" + hourDropDown.getValue() + \":\" + minuteDropDown.getValue() + \":00\";\n\t\tmedList.add(new Medication(nameField.getText(), tempFullDay, descriptionField.getText()));\n\t\t//upcomingMedsLabel.setText(upcomingMedsLabel.getText() + \"\\n\\n\" + medList.get(medList.size() - 1).toString());\n\t\t//calls the save method to save the new medication to the txt file\n\t\tsave(tempFullDay);\n\t\tload();\n\t}",
"public void addShop() {\n FacesContext context = FacesContext.getCurrentInstance();\n\n log.info(\"OrdersBean : AddShop\");\n\n int idAds = Integer.parseInt(getParam(\"adsId\"));\n\n if (idAds == 0) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n return;\n }\n\n adsBean.getAdsId(idAds);\n\n init();\n checkIfOrdersEntityIsNullAndCreateOrders();\n\n if (contractsBean.createContract()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopSuccess\"), null));\n } else {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n }\n findOrderAndfindContracts();\n }",
"abstract void addDepositTransaction(Transaction deposit, Ui ui, String bankType) throws BankException;",
"public boolean addTransaction(Transaction trans) {\n if (trans == null) {\n return false;\n }\n if (!previousHash.equals(\"0\")) {\n if (!trans.processTransaction()) {\n System.out.println(\"Transaction failed to process. Transaction discarded!\");\n return false;\n }\n }\n transactions.add(trans);\n System.out.println(\"Transaction successfully added to the block\");\n return true;\n }",
"private void addTransactionUpload() {\n\t\tFileUploadField fileUploadField = new FileUploadField(\"transactionInput\");\n\t\tfinal Form<Void> progressUploadForm = new Form<Void>(\"transactionForm\") {\n\t\t\t@Override\n\t\t\tprotected void onSubmit() {\n\t\t\t\tfinal List<FileUpload> uploads = fileUploadField.getFileUploads();\n\t\t\t\tif (uploads != null) {\n\t\t\t\t\tfor (FileUpload upload : uploads) {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Paarse and insert into db\n\t\t\t\t\t\t\tbankDataService.importTransactionCsv(upload.getBytes());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tthrow new IllegalStateException(\"Unable to read data.\", e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\t// set this form to multipart mode (allways needed for uploads!)\n\t\tprogressUploadForm.setMultiPart(true);\n\t\tprogressUploadForm.add(fileUploadField);\n\t\tprogressUploadForm.add(new UploadProgressBar(\"transactionProgress\", progressUploadForm, fileUploadField));\n\t\tadd(progressUploadForm);\n\t}",
"private void addOnClick() throws CountryAlreadyPresentException, InvalidCountryException, FutureDateException {\n gb.addToVisitedList(nameField.getText().trim().toUpperCase(), dateField.getText().trim(),\n notesField.getText().trim());\n row = new Object[]{nameField.getText().trim().toUpperCase(), dateField.getText().trim(),\n notesField.getText().trim()};\n gb.getTableModel3().addRow(row);\n }",
"public static void addArticle() {\n double summe = 0.0;\n if (!payProcessStarted) {\n int[] indexes = taArtikel.getSelectedRows();\n for (int index : indexes) {\n GUIOperations.getRecorderXml().setIsPayment(true);\n //Artikel, der eingefügt wird\n Article tmp = atm.getFilteredArtikels().get(index);\n double price = 0.0;\n if (tmp.getPreis() == 0.0) {\n try {\n int help = Integer.parseInt(\n JOptionPane.showInputDialog(mainframe.getParent(),\n \"Bitte geben Sie den Preis für das Produkt \" + tmp.getArticleName() + \" ein (in Cent)\"));\n price = help / 100.0;\n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(mainframe.getParent(), \"Artikel konnte nicht eingefügt werden, \"\n + \"da keine valide Zahl eingegeben worden ist\");\n continue;\n }\n } else {\n price = tmp.getPreis();\n }\n if (recorderXml.getBonStornoType() != -1) {\n WarenruecknahmePreisDlg wpdlg = new WarenruecknahmePreisDlg(mainframe, true, tmp.getPreis());\n wpdlg.setVisible(true);\n price = wpdlg.getPreis();\n price *= -1;\n }\n\n if (tmp.getCategory().equalsIgnoreCase(\"Preis EAN\")) {\n price = -1;\n do {\n try {\n price = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie den Preis für diesen Artikel mit Preis EAN ein\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (price == -1);\n price = price / 100;\n }\n\n int amount = -1;\n if (tmp.getCategory().equalsIgnoreCase(\"Gewichts EAN\")) {\n do {\n try {\n amount = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie die Menge für diesen Artikel mit Gewichts EAN ein (in Gramm)\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (amount == -1);\n }\n\n Article art = new Article(tmp.getXmlArticleName(), tmp.isLeergut(),\n tmp.isJugendSchutz(), tmp.getEan(), tmp.getArticleName(),\n tmp.isPfand(), tmp.getPfandArtikel(), price, tmp.isRabatt(), tmp.getUst(),\n tmp.isWeight(), tmp.getCategory(), tmp.isEloading(), tmp.isSerialNrRequired());\n art.setIsAbfrage(tmp.isIsAbfrage());\n if (amount != -1) {\n art.setGewichts_ean_menge(amount);\n }\n JugendschutzDlg jdlg = null;\n if (tmp.isJugendSchutz() && !tmp.isIsAbfrage()) {\n jdlg = new JugendschutzDlg(mainframe, true);\n jdlg.setVisible(true);\n if (jdlg.isOk()) {\n art.setJugendSchutzOk(true);\n }\n }\n if (tmp.isEloading()) {\n if (dlm.getAmount() <= 1) {\n if (tmp.isJugendSchutz() && !tmp.isIsAbfrage()) {\n if (jdlg.isOk()) {\n String status = null;\n do {\n ELoadingDlg edlg = new ELoadingDlg(mainframe, true);\n edlg.setVisible(true);\n status = edlg.getStatus();\n } while (status == null);\n art.setEloadingState(status);\n if (status.equalsIgnoreCase(\"server_offline\") || status.equalsIgnoreCase(\"aufladung_nok\")) {\n art.setPriceZero(true);\n }\n }\n } else {\n String status = null;\n if (!tmp.isIsAbfrage()) {\n do {\n ELoadingDlg edlg = new ELoadingDlg(mainframe, true);\n edlg.setVisible(true);\n status = edlg.getStatus();\n\n } while (status == null);\n art.setEloadingState(status);\n if (status.equalsIgnoreCase(\"server_offline\") || status.equalsIgnoreCase(\"aufladung_nok\")) {\n art.setPriceZero(true);\n }\n }\n }\n } else {\n JOptionPane.showMessageDialog(mainframe, \"E-Loading Artikel können nicht mit einer Menge > 1 eingefügt werden\");\n art.setEloadingAmmountOk(false);\n }\n }\n\n int weight = -1;\n Path weight_path = null;\n if (tmp.isWeight() && !tmp.isIsAbfrage()) {\n int result = JOptionPane.showConfirmDialog(mainframe, \"Es wurde ein Gewichtsartikel ausgewählt. Wollen sie diesen \"\n + \"Artikel mithilfe einer Tastatureingabe abwiegen?\");\n if (result == 0) {\n do {\n try {\n weight = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie bitte das Gewicht für den Artikel ein\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (weight == -1);\n } else {\n JFileChooser fc = new JFileChooser(System.getProperty(\"user.home\") + File.separator + \"Documents\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"txt-Dateien\", \"txt\");\n fc.setFileFilter(filter);\n if (fc.showOpenDialog(mainframe) == JFileChooser.APPROVE_OPTION) {\n weight_path = fc.getSelectedFile().toPath();\n } else {\n JOptionPane.showMessageDialog(mainframe, \"Es wurde keine Datei ausgewählt! Der Kassiervorgang dieses Artikels wird abgebrochen\");\n return;\n }\n }\n }\n\n if (tmp.isSerialNrRequired() && !tmp.isIsAbfrage()) {\n //Seriennummer einlesen\n if ((tmp.isJugendSchutzOk() && tmp.isJugendSchutz()) || !tmp.isJugendSchutz()) {\n String serNr;\n do {\n serNr = JOptionPane.showInputDialog(null,\n \"Bitte geben Sie eine Seriennummer ein:\");\n } while (serNr == null || serNr.equals(\"\") || !serNr.matches(\"[0-9]+\"));\n art.setSerialNr(serNr);\n }\n }\n if (tmp.isWeight()) {\n if (weight == -1) {\n art.setWeigthArticles(weight_path);\n } else {\n art.setWeigthArticles(weight);\n }\n }\n int tmp_pfand_amount = -1;\n if (tmp.isPfand()) {\n tmp_pfand_amount = dlm.getAmount();\n }\n dlm.addArtikel(art);\n if (tmp.isPfand() && (art.isJugendSchutzOk() || !tmp.isJugendSchutz())) {\n for (Article arti : atm.getAllArtikels()) {\n if (arti.getXmlArticleName().equals(art.getPfandArtikel())) {\n Article newA = new Article(arti.getXmlArticleName(), arti.isLeergut(), arti.isJugendSchutz(), arti.getEan(), arti.getArticleName(), arti.isPfand(), arti.getPfandArtikel(), arti.getPreis(), arti.isRabatt(), arti.getUst(), arti.isWeight(), arti.getCategory(), arti.isEloading());\n dlm.setAmount(tmp_pfand_amount);\n newA.setInXml(false);\n dlm.addArtikel(newA);\n tmp_pfand_amount = -1;\n }\n }\n }\n JButton btBonSt = paArticle.getBtBonstorno();\n if (btBonSt.isEnabled()) {\n btBonSt.setEnabled(false);\n }\n\n JButton btWrue = paArticle.getBtWRUE();\n if (btWrue.isEnabled()) {\n btWrue.setEnabled(false);\n }\n }\n\n setPrice();\n setBonStarted(true);\n tfDigitField.setText(\"\");\n money = 0;\n }\n }",
"protected final Transaction addTransactionTo(Account account,\n\t\t\tTransaction trans) {\n\t\tboolean result = account.addTransaction(trans);\n\n\t\tif (result == false) {\n\t\t\ttrans = null;\n\n\t\t\tinform(getProperty(\"error.title\") + \" \\\"\" + account + \"\\\".\",\n\t\t\t\t\tgetProperty(\"error.description\"));\n\t\t}\n\n\t\treturn trans;\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n dateLabel = new javax.swing.JLabel();\n fromLabel = new javax.swing.JLabel();\n accountFromComboBox = new javax.swing.JComboBox<>();\n toLabel = new javax.swing.JLabel();\n accountToComboBox = new javax.swing.JComboBox<>();\n amountLabel = new javax.swing.JLabel();\n amountField = new javax.swing.JTextField();\n OKButton = new javax.swing.JButton();\n updateButton = new javax.swing.JButton();\n deleteButton = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n transferTableModel = new TransferTableModel();\n transferDetailsTable = new javax.swing.JTable();\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setTitle(\"Transfer UI\");\n\n dateLabel.setText(\"Date :\");\n\n fromLabel.setText(\"From :\");\n\n toLabel.setText(\"To :\");\n\n amountLabel.setText(\"Amount : \");\n\n OKButton.setText(\"Create\");\n OKButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n OKButtonActionPerformed(evt);\n }\n });\n\n updateButton.setText(\"Update\");\n updateButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateButtonActionPerformed(evt);\n }\n });\n\n deleteButton.setText(\"Delete\");\n deleteButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteButtonActionPerformed(evt);\n }\n });\n\n transferDetailsTable.setModel(transferTableModel);\n jScrollPane1.setViewportView(transferDetailsTable);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 544, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(71, 71, 71)\n .addComponent(dateLabel))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fromLabel, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(toLabel, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(amountLabel, javax.swing.GroupLayout.Alignment.TRAILING))))\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(accountFromComboBox, 0, 393, Short.MAX_VALUE)\n .addComponent(accountToComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(amountField)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(115, 115, 115)\n .addComponent(OKButton, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(69, 69, 69)\n .addComponent(updateButton)\n .addGap(66, 66, 66)\n .addComponent(deleteButton)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(accountFromComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fromLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(accountToComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(toLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(amountField, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(amountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(39, 39, 39)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(deleteButton)\n .addComponent(updateButton)\n .addComponent(OKButton))\n .addGap(41, 41, 41)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(35, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed\n System.out.println(\"Manually adding an alarm entry\");\n\n addEntry(hourSelect.getSelectedIndex() + 1, minuteSelect.getSelectedIndex(), periodSelect.getSelectedIndex(), nameSelect.getText());\n writeAlarm(hourSelect.getSelectedIndex() + 1, minuteSelect.getSelectedIndex(), periodSelect.getSelectedIndex(), nameSelect.getText());\n\n nameSelect.setText(\"Alarm Name\");\n nameSelect.setForeground(Color.LIGHT_GRAY);\n }",
"public\n void\n displayTransactions(Transaction trans)\n {\n getRegisterPanel().updateView(getFilter(), trans);\n }",
"private void addAppointmentButtonAction (ActionEvent event) {\r\n\t\t\tif (customersTable.getItems().isEmpty()) {\r\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\t\talert.setHeaderText(\"No customer selected\");\r\n\t\t\t\talert.setContentText(\"You must select a customer to schedule an appointment\");\r\n\t\t\t\talert.showAndWait();\r\n\t\t\t} else {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tselectedItem = customersTable.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t//Go to add appointment screen\r\n\t\t\t\t\tParent root;\r\n\t\t\t\t\tStage stage = (Stage) appointmentsButton.getScene().getWindow();\r\n\t\t\t\t\troot = FXMLLoader.load(getClass().getResource(\"/views/AddAppointmentScreen.fxml\"));\r\n\t\t\t\t\tScene scene = new Scene(root);\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public void addZoneCommitte() {\n\t\t\tid = new JComboBox<Integer>();\n\t\t\tAutoCompleteDecorator.decorate(id);\n\t\t\tid.setBackground(Color.white);\n\t\t\tJButton save = new JButton(\"Save members \");\n\t\t\tfinal Choice position = new Choice();\n\t\t\tfinal JTextField txtLevel = new JTextField(10), txtPhone = new JTextField(10);\n\t\t\tfinal Choice chczon = new Choice();\n\n\t\t\ttry {\n\t\t\t\tString sql = \"select * from Zone;\";\n\t\t\t\tResultSet rs = null;\n\t\t\t\t// Register jdbc driver\n\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t// open connection\n\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tchczon.add(rs.getString(\"Name\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\t}\n\n\t\t\t// select zone before proceeding\n\t\t\tObject[] zone = { new JLabel(\"Zone\"), chczon };\n\t\t\tint option = JOptionPane.showConfirmDialog(this, zone, \"Choose zone..\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\n\t\t\tif (option == JOptionPane.OK_OPTION) {\n\n\t\t\t\ttry {\n\t\t\t\t\tString sql = \"select * from Registration where Zone=?;\";\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t// open connection\n\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\tstmt.setString(1, chczon.getSelectedItem());\n\t\t\t\t\trs = stmt.executeQuery();\n\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tid.addItem(Integer.parseInt(rs.getString(\"RegNo\")));\n\t\t\t\t\t}\n\t\t\t\t\tif (id.getItemCount() > 0) {\n\t\t\t\t\t\tsql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\n\t\t\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SQLException | ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tid.addItemListener(new ItemListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString sql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\t\t\t\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// If save button clicked, get the inputs from the text fields\n\t\t\t\tsave.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// ID = Integer.parseInt(IDs.getSelectedItem().toString());\n\t\t\t\t\t\tint RegNo = Integer.parseInt(id.getSelectedItem().toString());\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Insertion to database\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tif (txtPhone.getText().isEmpty() | txtLevel.getText().isEmpty()) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Phone Number or Level cannot be empty\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t\t\t\t// open connection\n\t\t\t\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\t\t\t\tString sql = \"INSERT INTO `Zone committee`(`ID`, `BaptismalName`, `OtherName`, `Phone`, `Position`, `Level`, `Zone`)\"\n\t\t\t\t\t\t\t\t\t\t+ \" VALUES (?,?,?,?,?,?,?);\";\n\t\t\t\t\t\t\t\tstmt = (PreparedStatement) con.prepareStatement(sql);\n\t\t\t\t\t\t\t\tstmt.setInt(1, RegNo);\n\t\t\t\t\t\t\t\tstmt.setString(2, txtFname.getText().toString().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(3, txtSname.getText().toString().toUpperCase());\n\n\t\t\t\t\t\t\t\tstmt.setInt(4, Integer.parseInt(txtPhone.getText().toString()));\n\t\t\t\t\t\t\t\tstmt.setString(5, position.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(6, txtLevel.getText().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(7, chczon.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.executeUpdate();\n\t\t\t\t\t\t\t\tshowZonecomm();\n\t\t\t\t\t\t\t\tid.setSelectedIndex(0);\n\t\t\t\t\t\t\t\ttxtFname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtSname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtLevel.setText(\"\");\n\t\t\t\t\t\t\t\ttxtPhone.setText(\"\");\n\t\t\t\t\t\t\t\tposition.select(0);\n\t\t\t\t\t\t\t} catch (SQLException | ClassNotFoundException e2) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Member exists in the committee list!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// add items to the choice box\n\t\t\t\tposition.add(\"Chairperson\");\n\t\t\t\tposition.add(\"Vice chairperson\");\n\t\t\t\tposition.add(\"Secretary\");\n\t\t\t\tposition.add(\"Vice secretary\");\n\t\t\t\tposition.add(\"Treasurer\");\n\t\t\t\tposition.add(\"Member\");\n\t\t\t\tposition.select(\"Member\");\n\n\t\t\t\tObject[] inputfields = { new JLabel(\"Type ID and press ENTER\"), id, labBaptismalName, txtFname,\n\t\t\t\t\t\tlabOtherName, txtSname, labPhone, txtPhone, new JLabel(\"Level\"), txtLevel, labPosition, position };\n\n\t\t\t\tJOptionPane.showOptionDialog(this, inputfields, \"Enter zone committee members\", JOptionPane.DEFAULT_OPTION,\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, new Object[] { save }, null);\n\t\t\t}\n\n\t\t}",
"@Override\r\n\tpublic int addTran(Transaction transaction) throws Exception {\n\t\t\t\t\r\n\t\treturn tranDao.insertTran(transaction);\r\n\t}",
"void fillEditTransactionForm(Transaction transaction);",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTree1 = new javax.swing.JTree();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n quantity = new javax.swing.JTextField();\n amount = new javax.swing.JTextField();\n rate = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jComboBox1 = new javax.swing.JComboBox<>();\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n save_button = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Add Purchase\");\n\n jTree1.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {\n public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {\n jTree1ValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(jTree1);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jLabel2.setText(\"Quantity:\");\n\n jLabel3.setText(\"Amount:\");\n\n jLabel4.setText(\"Rate:\");\n\n quantity.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n quantityActionPerformed(evt);\n }\n });\n\n amount.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n amountMouseClicked(evt);\n }\n });\n amount.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n amountActionPerformed(evt);\n }\n });\n\n rate.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n rateMouseClicked(evt);\n }\n });\n rate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rateActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Date\");\n\n jLabel6.setText(\"Item\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel3))\n .addGap(30, 30, 30))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(quantity, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(amount, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(rate, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(82, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(quantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(amount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(3, 3, 3)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jLabel4))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(29, 29, 29)\n .addComponent(jLabel5))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(102, 102, 102))\n );\n\n save_button.setText(\"Save\");\n save_button.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n save_buttonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(131, 131, 131)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(153, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(save_button, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(130, 130, 130))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(save_button, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(19, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void addInventoryInformation() {\r\n \tString[] toolTypeFieldItems = {\"Electrical\", \"Non-Electrical\"};\r\n \t\r\n \taddButton = new JButton (\"Add\");\r\n deleteButton = new JButton (\"Delete\");\r\n clearButton = new JButton (\"Clear\");\r\n decreaseButton = new JButton (\"Buy\");\r\n toolIdText = new JTextField (5);\r\n toolNameText = new JTextField (5);\r\n stockText = new JTextField (5);\r\n priceText = new JTextField (5);\r\n supplierText = new JTextField (5);\r\n toolTypeField = new JComboBox<String> (toolTypeFieldItems); \r\n powerText = new JTextField (5);\r\n\r\n add (addButton);\r\n add (deleteButton);\r\n add (clearButton);\r\n add (decreaseButton);\r\n add (toolIdText);\r\n add (toolNameText);\r\n add (stockText);\r\n add (priceText);\r\n add (supplierText);\r\n add (toolTypeField);\r\n add (powerText);\r\n \r\n addButton.setBounds (585, 590, 100, 25);\r\n deleteButton.setBounds (715, 590, 100, 25);\r\n clearButton.setBounds (650, 630, 100, 25);\r\n decreaseButton.setBounds (650, 670, 100, 25);\r\n toolIdText.setBounds (690, 290, 100, 25);\r\n toolNameText.setBounds (690, 330, 100, 25);\r\n stockText.setBounds (690, 410, 100, 25);\r\n priceText.setBounds (690, 450, 100, 25);\r\n supplierText.setBounds (690, 490, 100, 25);\r\n toolTypeField.setBounds (690, 370, 100, 25);\r\n powerText.setBounds (690, 530, 100, 25);\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnAdd = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n btnSave = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n btnExit = new javax.swing.JButton();\n btnSearch = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtId = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jdcTransaksi = new com.toedter.calendar.JDateChooser();\n jLabel3 = new javax.swing.JLabel();\n txtIdBarang = new javax.swing.JTextField();\n btnBrowseId = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n salesDetailTable = new javax.swing.JTable();\n jLabel4 = new javax.swing.JLabel();\n txtTotal = new javax.swing.JTextField();\n\n setClosable(true);\n setTitle(\"Penjualan\");\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameClosed(evt);\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n btnAdd.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnAdd.setText(\"Tambah\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnEdit.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnEdit.setText(\"Edit\");\n btnEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditActionPerformed(evt);\n }\n });\n\n btnDelete.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnDelete.setText(\"Hapus\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n btnSave.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnSave.setText(\"Simpan\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnCancel.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnCancel.setText(\"Batal\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnExit.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnExit.setText(\"Keluar\");\n btnExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExitActionPerformed(evt);\n }\n });\n\n btnSearch.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnSearch.setText(\"Cari\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n jLabel1.setText(\"ID Transaksi :\");\n\n txtId.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n jLabel2.setText(\"Tanggal :\");\n\n jdcTransaksi.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n\n jLabel3.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n jLabel3.setText(\"Kode Barang :\");\n\n txtIdBarang.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n txtIdBarang.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtIdBarangActionPerformed(evt);\n }\n });\n\n btnBrowseId.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnBrowseId.setText(\"...\");\n btnBrowseId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBrowseIdActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(txtIdBarang)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnBrowseId))\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jdcTransaksi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jdcTransaksi, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtIdBarang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBrowseId))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n salesDetailTable.setFont(new java.awt.Font(\"Segoe UI\", 0, 18)); // NOI18N\n salesDetailTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Tandai\", \"ID Barang\", \"Nama Barang\", \"Harga\", \"Kuantitas\", \"Subtotal\"\n }\n ));\n salesDetailTable.setCellSelectionEnabled(true);\n salesDetailTable.setGridColor(new java.awt.Color(204, 204, 204));\n salesDetailTable.setRowHeight(26);\n salesDetailTable.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n salesDetailTableKeyReleased(evt);\n }\n });\n jScrollPane1.setViewportView(salesDetailTable);\n\n jLabel4.setFont(new java.awt.Font(\"Segoe UI\", 1, 36)); // NOI18N\n jLabel4.setText(\"Total :\");\n\n txtTotal.setFont(new java.awt.Font(\"Segoe UI\", 1, 36)); // NOI18N\n txtTotal.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnAdd)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEdit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnExit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 459, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnAdd, btnCancel, btnDelete, btnEdit, btnExit, btnSave, btnSearch});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdd)\n .addComponent(btnEdit)\n .addComponent(btnDelete)\n .addComponent(btnSave)\n .addComponent(btnCancel)\n .addComponent(btnExit)\n .addComponent(btnSearch))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"void addConfirmedTransaction(int transId, String userId);",
"private void onClickBtAdd() {\n\t\tDbAdapter db = new DbAdapter(this);\n\t\tdb.open();\n\n\t\tfloat amount = 0;\n\n\t\ttry {\n\t\t\tamount = Float.parseFloat(etAmount.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\tamount = 0;\n\t\t}\n\n\t\t// create a medicine event\n\t\tdb.createMedicineEvent(amount,\n\t\t\t\tnew Functions().getDateAsStringFromCalendar(mCalendar),\n\t\t\t\tspMedicine.getSelectedItemId());\n\n\t\tdb.close();\n\n\t\tActivityGroupTracking.group.restartThisActivity();\n\n\t\t// clear the edittext\n\t\tetAmount.setText(\"\");\n\n\t\t// Go to tracking tab when clicked on add\n\t\tShowHomeTab parentActivity;\n\t\tparentActivity = (ShowHomeTab) this.getParent().getParent();\n\t\tparentActivity.goToTab(DataParser.activityIDTracking);\n\t}",
"@Test\n\tpublic void testAddTransaction(){\n setDoubleEntryEnabled(true);\n\t\tsetDefaultTransactionType(TransactionType.DEBIT);\n validateTransactionListDisplayed();\n\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Lunch\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"899\"));\n\t\tonView(withId(R.id.input_transaction_type))\n\t\t\t\t.check(matches(allOf(isDisplayed(), withText(R.string.label_receive))))\n\t\t\t\t.perform(click())\n\t\t\t\t.check(matches(withText(R.string.label_spend)));\n\n\t\tString expectedValue = NumberFormat.getInstance().format(-899);\n\t\tonView(withId(R.id.input_transaction_amount)).check(matches(withText(expectedValue)));\n\n int transactionsCount = getTransactionCount();\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n validateTransactionListDisplayed();\n\n List<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(DUMMY_ACCOUNT_UID);\n assertThat(transactions).hasSize(2);\n Transaction transaction = transactions.get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\n assertThat(getTransactionCount()).isEqualTo(transactionsCount + 1);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n winTransporte = new javax.swing.JDialog();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n cbo_Fecha_Trans = new datechooser.beans.DateChooserCombo();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtMatricula = new javax.swing.JTextField();\n txtCosto = new javax.swing.JTextField();\n txtKilom = new javax.swing.JTextField();\n txtDestino = new javax.swing.JTextField();\n txtId = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n btnCancel = new javax.swing.JButton();\n btnAceptar = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jToolBar1 = new javax.swing.JToolBar();\n btnGuardar = new javax.swing.JButton();\n btnEditar = new javax.swing.JButton();\n btnEliminar = new javax.swing.JButton();\n btnActualizar = new javax.swing.JButton();\n btnImprimir = new javax.swing.JButton();\n btnClose = new javax.swing.JButton();\n escritorio = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblTransporte = new javax.swing.JTable();\n lblTotal = new javax.swing.JLabel();\n\n jLabel2.setText(\"Destino\");\n\n jLabel3.setText(\"Id Transporte\");\n\n jLabel4.setText(\"Costo\");\n\n jLabel5.setText(\"Matrucula\");\n\n jLabel6.setText(\"Fecha Transporte\");\n\n jLabel7.setText(\"Kilometros\");\n\n txtMatricula.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtMatriculaActionPerformed(evt);\n }\n });\n\n txtId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtIdActionPerformed(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel8.setText(\"Registro\");\n\n btnCancel.setText(\"Cancelar\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnAceptar.setText(\"Aceptar\");\n btnAceptar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAceptarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(64, 64, 64)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(15, 15, 15))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnAceptar)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbo_Fecha_Trans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtMatricula)\n .addComponent(txtCosto)\n .addComponent(txtKilom)\n .addComponent(txtDestino)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(btnCancel, javax.swing.GroupLayout.Alignment.TRAILING)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(160, 160, 160)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(95, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtDestino, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(23, 23, 23)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtKilom, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(14, 14, 14)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(15, 15, 15)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(31, 31, 31)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cbo_Fecha_Trans, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnCancel)\n .addComponent(btnAceptar))\n .addContainerGap(78, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout winTransporteLayout = new javax.swing.GroupLayout(winTransporte.getContentPane());\n winTransporte.getContentPane().setLayout(winTransporteLayout);\n winTransporteLayout.setHorizontalGroup(\n winTransporteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n winTransporteLayout.setVerticalGroup(\n winTransporteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n jToolBar1.setRollover(true);\n\n btnGuardar.setText(\"Guardar\");\n btnGuardar.setFocusable(false);\n btnGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnGuardar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGuardarActionPerformed(evt);\n }\n });\n jToolBar1.add(btnGuardar);\n\n btnEditar.setText(\"Editar\");\n btnEditar.setFocusable(false);\n btnEditar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnEditar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnEditar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditarActionPerformed(evt);\n }\n });\n jToolBar1.add(btnEditar);\n\n btnEliminar.setText(\"Eliminar\");\n btnEliminar.setFocusable(false);\n btnEliminar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnEliminar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnEliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEliminarActionPerformed(evt);\n }\n });\n jToolBar1.add(btnEliminar);\n\n btnActualizar.setText(\"Actualizar\");\n btnActualizar.setFocusable(false);\n btnActualizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnActualizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnActualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnActualizarActionPerformed(evt);\n }\n });\n jToolBar1.add(btnActualizar);\n\n btnImprimir.setText(\"Imprimir\");\n btnImprimir.setFocusable(false);\n btnImprimir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnImprimir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnImprimir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnImprimirActionPerformed(evt);\n }\n });\n jToolBar1.add(btnImprimir);\n\n btnClose.setText(\"Cerrar\");\n btnClose.setFocusable(false);\n btnClose.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnClose.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnClose.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCloseActionPerformed(evt);\n }\n });\n jToolBar1.add(btnClose);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 619, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n tblTransporte.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Id Trasporte\", \"Destino\", \"Costo\", \"Matricula\", \"Fecha Trasporte\"\n }\n ));\n jScrollPane1.setViewportView(tblTransporte);\n\n lblTotal.setText(\"Total: 0\");\n\n javax.swing.GroupLayout escritorioLayout = new javax.swing.GroupLayout(escritorio);\n escritorio.setLayout(escritorioLayout);\n escritorioLayout.setHorizontalGroup(\n escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, escritorioLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1)\n .addContainerGap())\n .addGroup(escritorioLayout.createSequentialGroup()\n .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n escritorioLayout.setVerticalGroup(\n escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(escritorioLayout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(escritorio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(escritorio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"private void createTransaction() {\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n if(mCategory == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Category_Income_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(etAmount.getText().toString().replaceAll(\",\", \"\"));\n if(amount < 0) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Amount_Invalid));\n return;\n }\n\n int CategoryId = mCategory != null ? mCategory.getId() : 0;\n String Description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n boolean isDebtValid = true;\n // Less: DebtCollect, More: Borrow\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n }\n\n if(isDebtValid) {\n Transaction transaction = new Transaction(0,\n TransactionEnum.Income.getValue(),\n amount,\n CategoryId,\n Description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n long newTransactionId = mDbHelper.createTransaction(transaction);\n\n if (newTransactionId != -1) {\n\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) newTransactionId);\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n mDbHelper.deleteTransaction(newTransactionId);\n }\n } else {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n }\n }\n\n }",
"void addTransaction(Transaction transaction) throws SQLException, BusinessException;",
"public void addClicked(View v){\n android.util.Log.d(this.getClass().getSimpleName(), \"add Clicked. Adding: \" + this.nameET.getText().toString());\n try{\n PartnerDB db = new PartnerDB((Context)this);\n SQLiteDatabase plcDB = db.openDB();\n ContentValues hm = new ContentValues();\n hm.put(\"name\", this.nameET.getText().toString());\n double hours = Double.parseDouble(this.tippableHoursET.getText().toString());\n hm.put(\"tippableHours\", hours);\n double tipsPerHour = Double.parseDouble(this.tipsPerHourET.getText().toString());\n hm.put(\"tipsPerHour\", tipsPerHour);\n //double tips = Double.parseDouble(this.tipsET.getText().toString());\n //hm.put(\"tips\", tips);\n plcDB.insert(\"partner\",null, hm);\n plcDB.close();\n db.close();\n String addedName = this.nameET.getText().toString();\n setupselectSpinner1();\n this.selectedPartner = addedName;\n this.selectSpinner1.setSelection(Arrays.asList(partners).indexOf(this.selectedPartner));\n } catch (Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"Exception adding partner information: \"+\n ex.getMessage());\n }\n }",
"void addTransaction(final TransactionVM transactionVM);",
"@FXML\n private void addCivilization(ActionEvent event) {\n \ttry {\n\n\t\t\tString civilizationName = newCivilizationNameTextField.getText();\n\n\t\t\tint type = 0 ;\n\n\t\t\tif(t1.isSelected()) {\n\n\t\t\t\ttype = 1 ;\n\n\t\t\t}\n\t\t\telse if(t2.isSelected()) {\n\n\t\t\t\ttype = 2;\n\n\t\t\t}\n\t\t\telse if(t3.isSelected()) {\n\n\t\t\t\ttype = 3;\n\n\t\t\t}\n\n\t\t\tif(civilizationName == null || civilizationName.isEmpty() || type == 0) {\n\n\t\t\t\tthrow new InsufficientInformationException();\n\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\tcivilizationsTemp.add(new Pair<String, Integer>(civilizationName, type));\n\t\t\t\tnewCivilizationNameTextField.setText(\"\");\n\t\t\t\tt1.setSelected(false);\n\t\t\t\tt2.setSelected(false);\n\t\t\t\tt3.setSelected(false);\n\t\t\t\n\t\t\t\ttableCivilizations.getItems().clear();\n\t\t\t\ttableCivilizations.getItems().addAll(civilizationsTemp);\n\t\t\t}\n\n\t\t}\n \tcatch(InsufficientInformationException e1) {\n\n\t\t\tinsufficientDataAlert();\n\n\t\t}\n }",
"public static void newTrans(Transaction t) {\r\n\t\ttransList = new ArrayList<Transaction>();\r\n\t\tload();\r\n\t\ttransList.add(t);\r\n\t\tsave();\r\n\t}",
"public boolean ADDCHEDTransact(CHEDTransact trans) {\n query = \"INSERT INTO transact(NumberO)\";\n try {\n ps = con.prepareStatement(query);\n\n java.util.Date dateP = trans.getiTDate();\n\n Date dateSigned = new Date(dateP.getYear(), dateP.getMonth(), dateP.getDay());\n\n ps.setInt(1, trans.getNumberOFTrees());\n ps.setString(2, trans.getLotNumber());\n ps.setString(3, trans.getiTvoucher());\n ps.setString(4, trans.gettRvoucher());\n ps.setDate(5, dateSigned);\n ps.setFloat(6, trans.getAmountPayable());\n\n if (ps.executeUpdate() != 0) {\n status = true;\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(FarmerManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return status;\n }",
"public void actionPerformed(ActionEvent e){\n\t\t\t\tArrayList<Transaction> transactions = new ArrayList<Transaction>(currentAccount.getTransactionList());\n\t\t\t\tTransactionUI t = new TransactionUI(transactions); //create an interface of the user's selected account transactions\n\t\t\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\tvalidar_campos();\r\n\t\t\t\tif(e.getActionCommand().equals(\"aceptar\") && permetir_alta == 0){\r\n\t\t\t\t\tConexionDb conexdb = new ConexionDb();\r\n\t\t\t\t\tconexdb.Conectardb();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Cogemos el nombre de wp elegido y guardamos su ID en una variable\r\n\t\t\t\t\trs = conexion.ConsultaSQL(\"SELECT id_wp FROM WORKPAQUETS WHERE nombre like'\"+Cmbwp.getSelectedItem()+\"'\" );\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\trs.next();\r\n\t\t\t\t\t\tIDwp = rs.getInt(1);\r\n\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t// cambiar fecha a sql\r\n\t\t\t\t\tjava.sql.Date sqlDate1 = new java.sql.Date(jdc1.getDate().getTime());\r\n\r\n\t\t\t\t\tconexdb.executeUpdate(\"INSERT INTO EQUIPAMIENTOS (partner,descripcion,justificacion,wp,coste_total,fecha,compra_alquiler,grado_depreciacion,meses_usara,grado_utilizacion ) VALUES ('\"\r\n\t\t\t\t\t\t\t+ Integer.toString(CmbPar.getSelectedIndex()+1)+\"','\"+textdescripcion.getText()+\"','\"+textjustificacion.getText()+\"','\"+IDwp+\"','\"+jtxt[0].getText()+\"','\"+sqlDate1+\"','\"+Integer.toString(CmbComp.getSelectedIndex())+\"','\"+jtxt[1].getText()+\"','\"+jtxt[2].getText()+\"','\"+jtxt[3].getText()+\"')\");\r\n\t\t\t\t\t//para ver la id del workpaquets recien creado\r\n\t\t\t\t\trs = conexion.ConsultaSQL(\"SELECT id_wp FROM WORKPAQUETS WHERE nombre like'\"+ jtxt[0].getText()+\"'\" );\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\trs.next();\r\n\t\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPnlMod_equipamientos.actualizar_tabla();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(aviso, rec.idioma[rec.eleidioma][60]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//limpiamos los campos despues de dar de alta\r\n\t\t\t\t\tfor(int i=0;i<2;++i) {\t\r\n\t\t\t\t\t\tjtxt[i].setText(\"\");\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\tjdc1.setDate(null);\r\n\t\t\t\t\ttextdescripcion.setText(null);\r\n\t\t\t\t\ttextjustificacion.setText(null);\r\n\r\n\t\t\t\t\tfor(int i=0;i<fieldNames.length;++i) {\t\r\n\t\t\t\t\t\tjtxt[i].setText(\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCmbPar.setSelectedItem(null);\r\n\t\t\t\t\tCmbwp.setSelectedItem(null);\r\n\t\t\t\t\tCmbComp.setSelectedItem(null);\r\n\t\t\t\t\tmesage.setVisible(false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\talerta.setText(rec.idioma[rec.eleidioma][79]);\r\n\t\t\t\t\tmesage.setBackground(Color.decode(\"#ec8989\"));\r\n\t\t\t\t\tmesage.setVisible(true);\r\n\t\t\t\t\tpermetir_alta = 0;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t// Borrar cuando damos al boton cancelar\r\n\t\t\tif( e.getActionCommand().equals(\"cancelar\")){\r\n\t\t\t\t\r\n\t\t\t\tactualizar_equipamientos();\r\n\t\t\t\t/*for(int i=0;i<2;++i) {\t\r\n\t\t\t\t\tjtxt[i].setText(\"\");\r\n\t\t\t\t\t}\t\r\n\t\t\t\tjdc1.setDate(null);\r\n\t\t\t\ttextdescripcion.setText(null);\r\n\t\t\t\ttextjustificacion.setText(null);\r\n\t\t\t\t\r\n\t\t\t\t// Borrar cuando termine de añadir\r\n\t\t\t\tfor(int i=0;i<fieldNames.length;++i) {\t\r\n\t\t\t\t\tjtxt[i].setText(\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\tCmbPar.setSelectedItem(null);\r\n\t\t\t\tCmbwp.setSelectedItem(null);\r\n\t\t\t\tCmbComp.setSelectedItem(null);\r\n\t\t\t\tmesage.setVisible(false);*/\r\n\t\t\t}\r\n\t\t}",
"@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"> \r\n private void initComponents() {\r\n\r\n jPanel1 = new javax.swing.JPanel();\r\n jLabel1 = new javax.swing.JLabel();\r\n jLabel2 = new javax.swing.JLabel();\r\n jComboBox1 = new javax.swing.JComboBox<>();\r\n jLabel3 = new javax.swing.JLabel();\r\n jTextField1 = new javax.swing.JTextField();\r\n jButton1 = new javax.swing.JButton();\r\n jPanel2 = new javax.swing.JPanel();\r\n jLabel4 = new javax.swing.JLabel();\r\n jTextField2 = new javax.swing.JTextField();\r\n jTextField3 = new javax.swing.JTextField();\r\n jButton2 = new javax.swing.JButton();\r\n jButton3 = new javax.swing.JButton();\r\n jTextField4 = new javax.swing.JTextField();\r\n jButton4 = new javax.swing.JButton();\r\n jTextField5 = new javax.swing.JTextField();\r\n jLabel7 = new javax.swing.JLabel();\r\n jPanel3 = new javax.swing.JPanel();\r\n jLabel5 = new javax.swing.JLabel();\r\n jScrollPane1 = new javax.swing.JScrollPane();\r\n jTextPane1 = new javax.swing.JTextPane();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\r\n jLabel1.setText(\"Create New Account\");\r\n\r\n jLabel2.setText(\"Select Account Type\");\r\n\r\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Savings account\", \"checking account\" }));\r\n jComboBox1.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n jComboBox1MouseClicked(evt);\r\n }\r\n });\r\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jComboBox1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel3.setText(\"initial deposit\");\r\n\r\n jButton1.setText(\"Create\");\r\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n jButton1MouseClicked(evt);\r\n }\r\n });\r\n jButton1.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jButton1ActionPerformed(evt);\r\n }\r\n });\r\n\r\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n jPanel1.setLayout(jPanel1Layout);\r\n jPanel1Layout.setHorizontalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addGap(53, 53, 53)\r\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\r\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)))))\r\n .addContainerGap(50, Short.MAX_VALUE))\r\n );\r\n jPanel1Layout.setVerticalGroup(\r\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel1Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jLabel1)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel2)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel3)\r\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGap(18, 18, 18)\r\n .addComponent(jButton1)\r\n .addContainerGap(40, Short.MAX_VALUE))\r\n );\r\n\r\n jLabel4.setText(\"Access Existing Account\");\r\n\r\n jButton2.setText(\"Select Acc\");\r\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n jButton2MouseClicked(evt);\r\n }\r\n });\r\n\r\n jButton3.setText(\"Deposit\");\r\n jButton3.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n jButton3MouseClicked(evt);\r\n }\r\n });\r\n\r\n jButton4.setText(\"Withdraw\");\r\n jButton4.addMouseListener(new java.awt.event.MouseAdapter() {\r\n public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n jButton4MouseClicked(evt);\r\n }\r\n });\r\n\r\n jTextField5.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n jTextField5ActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel7.setText(\"Balance\");\r\n\r\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\r\n jPanel2.setLayout(jPanel2Layout);\r\n jPanel2Layout.setHorizontalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGap(42, 42, 42)\r\n .addComponent(jLabel4))\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addGap(19, 19, 19)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jTextField2)\r\n .addComponent(jTextField3)\r\n .addComponent(jTextField4)\r\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton2)\r\n .addComponent(jButton4)\r\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n jPanel2Layout.setVerticalGroup(\r\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel2Layout.createSequentialGroup()\r\n .addComponent(jLabel4)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton2))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton3))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jButton4))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel7))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n jLabel5.setText(\"Account List\");\r\n\r\n jTextPane1.setText(\"Savings account 1: balance = $100 Interest Checking account 6: balance = $520 Regular checking account 9: balance = $199 Interest checking account 3: balance = $ 123\");\r\n jScrollPane1.setViewportView(jTextPane1);\r\n\r\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\r\n jPanel3.setLayout(jPanel3Layout);\r\n jPanel3Layout.setHorizontalGroup(\r\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\r\n .addGap(0, 0, Short.MAX_VALUE)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addGap(73, 73, 73))\r\n );\r\n jPanel3Layout.setVerticalGroup(\r\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(jPanel3Layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jLabel5)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }",
"@Override\r\n\tpublic List<ITransactionHistoryDto> viewWeekTransaction(String accountNumber) {\r\n\t\tlog.info(\"inside week transaction\");\r\n\t\tLocalDateTime fromDate = LocalDateTime.now().minusWeeks(1L);\r\n\t\tLocalDateTime toDate = LocalDateTime.now();\r\n\r\n\t\tAccount account = accountRepository.findByAccountNumber(accountNumber);\r\n\t\tif (account == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NUMBER_NOT_FOUND);\r\n\t\t}\r\n\t\tif (transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate).isEmpty()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.WEEK_HISTORY_NOT_FOUND);\r\n\t\t}\r\n\t\treturn transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate);\r\n\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField4 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n notrans = new javax.swing.JTextField();\n kodesupplier = new javax.swing.JTextField();\n namasupplier = new javax.swing.JTextField();\n kodebarang = new javax.swing.JTextField();\n namabarang = new javax.swing.JTextField();\n hargasatuan = new javax.swing.JTextField();\n qty = new javax.swing.JTextField();\n total = new javax.swing.JTextField();\n tanggal = new com.toedter.calendar.JDateChooser();\n jScrollPane1 = new javax.swing.JScrollPane();\n tabel_transaksi = new javax.swing.JTable();\n cari_supplier = new javax.swing.JButton();\n save = new javax.swing.JButton();\n edit = new javax.swing.JButton();\n clea = new javax.swing.JButton();\n delete = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jLabel11 = new javax.swing.JLabel();\n\n jTextField4.setText(\"jTextField4\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setText(\"TRANSAKSI PEMBELIAN\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));\n\n jLabel2.setText(\"Tanggal\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 51, -1, -1));\n\n jLabel3.setText(\"Kode Supplier\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 92, -1, -1));\n\n jLabel4.setText(\"Nama Supplier\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 130, -1, -1));\n\n jLabel5.setText(\"Kode Barang\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 165, -1, -1));\n\n jLabel6.setText(\"Nama Barang\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 166, -1, -1));\n\n jLabel7.setText(\"No Trans\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(403, 71, -1, -1));\n\n jLabel8.setText(\"Harga Satuan\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(279, 165, -1, -1));\n\n jLabel9.setText(\"Qty\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(403, 165, -1, -1));\n\n jLabel10.setText(\"Total\");\n getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 170, -1, -1));\n\n notrans.setEnabled(false);\n getContentPane().add(notrans, new org.netbeans.lib.awtextra.AbsoluteConstraints(464, 68, 97, -1));\n getContentPane().add(kodesupplier, new org.netbeans.lib.awtextra.AbsoluteConstraints(93, 89, 110, -1));\n getContentPane().add(namasupplier, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 127, 170, -1));\n getContentPane().add(kodebarang, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 190, 90, -1));\n getContentPane().add(namabarang, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 190, 140, -1));\n getContentPane().add(hargasatuan, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 190, 110, -1));\n getContentPane().add(qty, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 190, 80, -1));\n getContentPane().add(total, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 190, 100, -1));\n\n tanggal.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n tanggalPropertyChange(evt);\n }\n });\n getContentPane().add(tanggal, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 50, 130, -1));\n\n tabel_transaksi.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tabel_transaksi.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tabel_transaksiMouseClicked(evt);\n }\n });\n tabel_transaksi.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n tabel_transaksiKeyPressed(evt);\n }\n });\n jScrollPane1.setViewportView(tabel_transaksi);\n\n getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 300, 590, 120));\n\n cari_supplier.setText(\"cari\");\n cari_supplier.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cari_supplierActionPerformed(evt);\n }\n });\n getContentPane().add(cari_supplier, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 90, -1, -1));\n\n save.setText(\"SAVE\");\n save.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveActionPerformed(evt);\n }\n });\n getContentPane().add(save, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 250, -1, -1));\n\n edit.setText(\"EDIT\");\n edit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n editActionPerformed(evt);\n }\n });\n getContentPane().add(edit, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 250, -1, -1));\n\n clea.setText(\"CLEAR\");\n clea.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cleaActionPerformed(evt);\n }\n });\n getContentPane().add(clea, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 250, -1, -1));\n\n delete.setText(\"DELETE\");\n delete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteActionPerformed(evt);\n }\n });\n getContentPane().add(delete, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 250, -1, -1));\n\n jButton1.setText(\"HITUNG\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(501, 220, 100, -1));\n\n jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Penjualan/gambar/home-run.png\"))); // NOI18N\n jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jLabel11MouseClicked(evt);\n }\n });\n getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 10, -1, -1));\n\n setSize(new java.awt.Dimension(629, 573));\n setLocationRelativeTo(null);\n }",
"public void addToOrder()\n {\n\n if ( donutTypeComboBox.getSelectionModel().isEmpty() || flavorComboBox.getSelectionModel().isEmpty() )\n {\n Popup.DisplayError(\"Must select donut type AND donut flavor.\");\n return;\n } else\n {\n int quantity = Integer.parseInt(quantityTextField.getText());\n if ( quantity == 0 )\n {\n Popup.DisplayError(\"Quantity must be greater than 0.\");\n return;\n } else\n {\n for ( int i = 0; i < quantity; i++ )\n {\n Donut donut = new Donut(donutTypeComboBox.getSelectionModel().getSelectedIndex(), flavorComboBox.getSelectionModel().getSelectedIndex());\n mainMenuController.getCurrentOrder().add(donut);\n }\n if ( quantity == 1 )\n {\n Popup.Display(\"Donuts\", \"Donut has been added to the current order.\");\n } else\n {\n Popup.Display(\"Donuts\", \"Donuts have been added to the current order.\");\n }\n\n\n donutTypeComboBox.getSelectionModel().clearSelection();\n flavorComboBox.getSelectionModel().clearSelection();\n quantityTextField.setText(\"0\");\n subtotalTextField.setText(\"$0.00\");\n }\n }\n\n\n }",
"private void addPayeeToCollection() {\n\t\tif (getForm().getType() != TRANSFER) {\n\t\t\tPayee payee = new Payee(getForm().getPayFrom());\n\n\t\t\tif (payee.getIdentifier().length() != 0) {\n\t\t\t\tgetPayees().add(payee);\n\t\t\t\tgetForm().getPayFromChooser().displayElements();\n\t\t\t}\n\t\t}\n\t}",
"public boolean addTransaction(Transaction transaction) throws SQLException {\n\t\t\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"INSERT INTO transaction(Date, Type, Category, Amount) VALUES (?, ?, ?, ?)\")) {\n\t\t\tstatement.setDate(1, transaction.date());\n\t\t\tstatement.setString(2, transaction.type());\n\t\t\tstatement.setString(3, transaction.category());\n\t\t\tstatement.setDouble(4, transaction.amount());\n\t\t\treturn statement.executeUpdate() != 0;\n\t\t}\n\t}",
"public static void addArticle(Article article) {\n double summe = 0.0;\n if (!payProcessStarted) {\n// int[] indexes = taArtikel.getSelectedRows();\n// for (int index : indexes) {\n GUIOperations.getRecorderXml().setIsPayment(true);\n //Artikel, der eingefügt wird\n Article tmp = article;\n double price = 0.0;\n if (tmp.getPreis() == 0.0) {\n try {\n int help = Integer.parseInt(\n JOptionPane.showInputDialog(mainframe.getParent(),\n \"Bitte geben Sie den Preis für das Produkt \" + tmp.getArticleName() + \" ein (in Cent)\"));\n price = help / 100.0;\n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(mainframe.getParent(), \"Artikel konnte nicht eingefügt werden, \"\n + \"da keine valide Zahl eingegeben worden ist\");\n// continue;\n }\n } else {\n price = tmp.getPreis();\n }\n if (recorderXml.getBonStornoType() != -1) {\n WarenruecknahmePreisDlg wpdlg = new WarenruecknahmePreisDlg(mainframe, true, tmp.getPreis());\n wpdlg.setVisible(true);\n price = wpdlg.getPreis();\n price *= -1;\n }\n\n if (tmp.getCategory().equalsIgnoreCase(\"Preis EAN\")) {\n price = -1;\n do {\n try {\n price = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie den Preis für diesen Artikel mit Preis EAN ein\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (price == -1);\n price = price / 100;\n }\n\n int amount = -1;\n if (tmp.getCategory().equalsIgnoreCase(\"Gewichts EAN\")) {\n do {\n try {\n amount = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie die Menge für diesen Artikel mit Gewichts EAN ein (in Gramm)\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (amount == -1);\n }\n\n Article art = new Article(tmp.getXmlArticleName(), tmp.isLeergut(),\n tmp.isJugendSchutz(), tmp.getEan(), tmp.getArticleName(),\n tmp.isPfand(), tmp.getPfandArtikel(), price, tmp.isRabatt(), tmp.getUst(),\n tmp.isWeight(), tmp.getCategory(), tmp.isEloading(), tmp.isSerialNrRequired());\n art.setIsAbfrage(tmp.isIsAbfrage());\n if (amount != -1) {\n art.setGewichts_ean_menge(amount);\n }\n JugendschutzDlg jdlg = null;\n if (tmp.isJugendSchutz() && !tmp.isIsAbfrage()) {\n jdlg = new JugendschutzDlg(mainframe, true);\n jdlg.setVisible(true);\n if (jdlg.isOk()) {\n art.setJugendSchutzOk(true);\n }\n }\n if (tmp.isEloading()) {\n if (dlm.getAmount() <= 1) {\n if (tmp.isJugendSchutz() && !tmp.isIsAbfrage()) {\n if (jdlg.isOk()) {\n String status = null;\n do {\n ELoadingDlg edlg = new ELoadingDlg(mainframe, true);\n edlg.setVisible(true);\n status = edlg.getStatus();\n } while (status == null);\n art.setEloadingState(status);\n if (status.equalsIgnoreCase(\"server_offline\") || status.equalsIgnoreCase(\"aufladung_nok\")) {\n art.setPriceZero(true);\n }\n }\n } else {\n String status = null;\n if (!tmp.isIsAbfrage()) {\n do {\n ELoadingDlg edlg = new ELoadingDlg(mainframe, true);\n edlg.setVisible(true);\n status = edlg.getStatus();\n\n } while (status == null);\n art.setEloadingState(status);\n if (status.equalsIgnoreCase(\"server_offline\") || status.equalsIgnoreCase(\"aufladung_nok\")) {\n art.setPriceZero(true);\n }\n }\n }\n } else {\n JOptionPane.showMessageDialog(mainframe, \"E-Loading Artikel können nicht mit einer Menge > 1 eingefügt werden\");\n art.setEloadingAmmountOk(false);\n }\n }\n\n int weight = -1;\n Path weight_path = null;\n if (tmp.isWeight() && !tmp.isIsAbfrage()) {\n int result = JOptionPane.showConfirmDialog(mainframe, \"Es wurde ein Gewichtsartikel ausgewählt. Wollen sie diesen \"\n + \"Artikel mithilfe einer Tastatureingabe abwiegen?\");\n if (result == 0) {\n do {\n try {\n weight = Integer.parseInt(JOptionPane.showInputDialog(mainframe, \"Geben Sie bitte das Gewicht für den Artikel ein\"));\n } catch (NumberFormatException ex) {\n int cancel = JOptionPane.showConfirmDialog(mainframe, \"Es wurde keine gültige Zahl eingeben! Wollen Sie den Kassiervorgang dieses Artikels abbrechen?\");\n if (cancel == 0) {\n return;\n }\n }\n } while (weight == -1);\n } else {\n JFileChooser fc = new JFileChooser(System.getProperty(\"user.home\") + File.separator + \"Documents\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"txt-Dateien\", \"txt\");\n fc.setFileFilter(filter);\n if (fc.showOpenDialog(mainframe) == JFileChooser.APPROVE_OPTION) {\n weight_path = fc.getSelectedFile().toPath();\n } else {\n JOptionPane.showMessageDialog(mainframe, \"Es wurde keine Datei ausgewählt! Der Kassiervorgang dieses Artikels wird abgebrochen\");\n return;\n }\n }\n }\n\n if (tmp.isSerialNrRequired() && !tmp.isIsAbfrage()) {\n //Seriennummer einlesen\n if ((tmp.isJugendSchutzOk() && tmp.isJugendSchutz()) || !tmp.isJugendSchutz()) {\n String serNr;\n do {\n serNr = JOptionPane.showInputDialog(null,\n \"Bitte geben Sie eine Seriennummer ein:\");\n } while (serNr == null || serNr.equals(\"\") || !serNr.matches(\"[0-9]+\"));\n art.setSerialNr(serNr);\n }\n }\n if (tmp.isWeight()) {\n if (weight == -1) {\n art.setWeigthArticles(weight_path);\n } else {\n art.setWeigthArticles(weight);\n }\n }\n int tmp_pfand_amount = -1;\n if (tmp.isPfand()) {\n tmp_pfand_amount = dlm.getAmount();\n }\n dlm.addArtikel(art);\n if (tmp.isPfand() && (art.isJugendSchutzOk() || !tmp.isJugendSchutz())) {\n for (Article arti : atm.getAllArtikels()) {\n if (arti.getXmlArticleName().equals(art.getPfandArtikel())) {\n Article newA = new Article(arti.getXmlArticleName(), arti.isLeergut(), arti.isJugendSchutz(), arti.getEan(), arti.getArticleName(), arti.isPfand(), arti.getPfandArtikel(), arti.getPreis(), arti.isRabatt(), arti.getUst(), arti.isWeight(), arti.getCategory(), arti.isEloading());\n dlm.setAmount(tmp_pfand_amount);\n newA.setInXml(false);\n dlm.addArtikel(newA);\n tmp_pfand_amount = -1;\n }\n }\n }\n JButton btBonSt = paArticle.getBtBonstorno();\n if (btBonSt.isEnabled()) {\n btBonSt.setEnabled(false);\n }\n\n JButton btWrue = paArticle.getBtWRUE();\n if (btWrue.isEnabled()) {\n btWrue.setEnabled(false);\n }\n// }\n\n setPrice();\n setBonStarted(true);\n tfDigitField.setText(\"\");\n money = 0;\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox();\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n jTextField1 = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n\n setClosable(true);\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 14)); // NOI18N\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icons/icons8_Check_Book_26px_4.png\"))); // NOI18N\n jLabel1.setText(\"Adding Expenses\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2), \"Details\", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Georgia\", 0, 18))); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel2.setText(\"Category\");\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel3.setText(\"Date\");\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 12)); // NOI18N\n jLabel4.setText(\"Amount\");\n\n jButton1.setFont(new java.awt.Font(\"Georgia\", 0, 14)); // NOI18N\n jButton1.setText(\"Add\");\n\n jComboBox1.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(124, 124, 124)\n .addComponent(jButton1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)\n .addComponent(jTextField1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))))\n .addContainerGap(121, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(jLabel4)\n .addGap(18, 18, 18)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(63, 63, 63))\n );\n\n jTable1.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null},\n {null, null, null}\n },\n new String [] {\n \"Category\", \"Date\", \"Amount\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(101, 101, 101)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(87, 87, 87)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(437, 437, 437)\n .addComponent(jLabel1)))\n .addContainerGap(360, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(109, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public Transact addTransact(long periodID) {\n long id;\n Transact tr = new Transact(periodID);\n\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(COLUMN_TRANSACT_PERIOD_ID, tr.getPeriodID());\n values.put(COLUMN_TRANSACT_TYPE, tr.getType());\n values.put(COLUMN_TRANSACT_DAY, tr.getTransactDay());\n values.put(COLUMN_TRANSACT_AMOUNT, tr.getAmount());\n values.put(COLUMN_TRANSACT_CATEGORY, tr.getCategory());\n values.put(COLUMN_TRANSACT_DESC, tr.getDesc());\n\n // Inserting Row\n id = db.insert(TABLE_TRANSACT, null, values);\n tr.setId(id);\n db.close();\n return tr;\n }",
"private void addRow() throws CoeusException{\r\n // PDF is not mandatory\r\n// String fileName = displayPDFFileDialog();\r\n// if(fileName == null) {\r\n// //Cancelled\r\n// return ;\r\n// }\r\n \r\n BudgetSubAwardBean budgetSubAwardBean = new BudgetSubAwardBean();\r\n budgetSubAwardBean.setProposalNumber(budgetBean.getProposalNumber());\r\n budgetSubAwardBean.setVersionNumber(budgetBean.getVersionNumber());\r\n budgetSubAwardBean.setAcType(TypeConstants.INSERT_RECORD);\r\n// budgetSubAwardBean.setPdfAcType(TypeConstants.INSERT_RECORD);\r\n budgetSubAwardBean.setSubAwardStatusCode(1);\r\n // PDF is not mandatory\r\n// budgetSubAwardBean.setPdfFileName(fileName);\r\n budgetSubAwardBean.setUpdateUser(userId);\r\n //COEUSQA-4061 \r\n CoeusVector cvBudgetPeriod = new CoeusVector(); \r\n \r\n cvBudgetPeriod = getBudgetPeriodData(budgetSubAwardBean.getProposalNumber(),budgetSubAwardBean.getVersionNumber()); \r\n \r\n //COEUSQA-4061\r\n int rowIndex = 0;\r\n if(data == null || data.size() == 0) {\r\n budgetSubAwardBean.setSubAwardNumber(1);\r\n // Added for COEUSQA-2115 : Subaward budgeting for Proposal Development - Start\r\n // Sub Award Details button will be enabled only when the periods are generated or budget has one period\r\n if(isPeriodsGenerated() || cvBudgetPeriod.size() == 1){\r\n subAwardBudget.btnSubAwardDetails.setEnabled(true);\r\n }\r\n // Added for COEUSQA-2115 : Subaward budgeting for Proposal Development - End\r\n }else{\r\n rowIndex = data.size();\r\n BudgetSubAwardBean lastBean = (BudgetSubAwardBean)data.get(rowIndex - 1);\r\n budgetSubAwardBean.setSubAwardNumber(lastBean.getSubAwardNumber() + 1);\r\n }\r\n if(!subAwardBudget.isEnabled()){\r\n subAwardBudget.btnSubAwardDetails.setEnabled(true);\r\n }\r\n data.add(budgetSubAwardBean);\r\n subAwardBudgetTableModel.fireTableRowsInserted(rowIndex, rowIndex);\r\n subAwardBudget.tblSubAwardBudget.setRowSelectionInterval(rowIndex, rowIndex);\r\n \r\n }",
"@Override\r\n\tpublic void addDelivery(Transaction transaction) throws Exception {\n\t\ttranDao.updateDeliveryInfo(transaction);\r\n\t}",
"private void updateTransactionFields() {\n if (transaction == null) {\n descriptionText.setText(\"\");\n executionDateButton.setText(dateFormat.format(new Date()));\n executionTimeButton.setText(timeFormat.format(new Date()));\n valueText.setText(\"\");\n valueSignToggle.setNegative();\n addButton.setText(R.string.add);\n // If we are editing a node, fill fields with current information\n } else {\n try {\n transaction.load();\n descriptionText.setText(transaction.getDescription());\n executionDateButton.setText(dateFormat.format(\n transaction.getExecutionDate()));\n executionTimeButton.setText(timeFormat.format(\n transaction.getExecutionDate()));\n BigDecimal value = transaction.getValue();\n valueText.setText(value.abs().toString());\n valueSignToggle.setToNumberSign(value);\n addButton.setText(R.string.edit);\n } catch (DatabaseException e) {\n Log.e(\"TMM\", \"Error loading transaction\", e);\n }\n }\n \n if (currentMoneyNode != null) {\n currencyTextView.setText(currentMoneyNode.getCurrency());\n }\n \n updateCategoryFields();\n updateTransferFields();\n }",
"public TransferUI() {\n initComponents();\n \n loadFromAccountName();\n loadToAccountName();\n \n transferDetailsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent lse) {\n\n int selectedRow = transferDetailsTable.getSelectedRow();\n if (selectedRow >= 0) {\n Transfer transfer = transferTableModel.getTransferDetails(selectedRow);\n if (transfer != null) {\n amountField.setText(String.valueOf(transfer.getAmount()));\n accountFromComboBox.setSelectedItem(transfer.getFromAccount()); // CHANGE from transfer class \n accountToComboBox.setSelectedItem(transfer.getToAccount());\n jDateChooser1.setDate(transfer.getTransferDate());\n\n }\n }\n }\n\n });\n }",
"public static void addMealtime(Week w) {\n\t\tMealTime mt = null;\n\t\t\n\t\tint day = Utility.askInt(\"Which week day(1-7): \");\n\t\t\n\t\tCLI.printMealTitles();\n\t\t\n\t\tint mid = Utility.askInt(\"Select meal id: \");\n\t\t\n\t\tmt = amt.add(new MealTime(0, ameal.get(mid), 0, w.getDay(day).getId()));\n\t\t\n\t\tUtility.printString(\"Mealtime added\\n\");\n\t}",
"void savingAddRecurringExpenditure(Transaction newExpenditure, Ui ui) throws BankException, TransactionException {\n throw new BankException(\"This account does not support this feature\");\n }",
"private void submitTransaction() {\n String amountGiven = amount.getText().toString();\n double decimalAmount = Double.parseDouble(amountGiven);\n amountGiven = String.format(\"%.2f\", decimalAmount);\n String sourceGiven = source.getText().toString();\n String descriptionGiven = description.getText().toString();\n String clientId = mAuth.getCurrentUser().getUid();\n String earnedOrSpent = \"\";\n\n if(amountGiven.isEmpty()){\n amount.setError(\"Please provide the amount\");\n amount.requestFocus();\n return;\n }\n\n if(sourceGiven.isEmpty()){\n source.setError(\"Please provide the source\");\n source.requestFocus();\n return;\n }\n\n if(descriptionGiven.isEmpty()){\n descriptionGiven = \"\";\n }\n\n int selectedRadioButton = radioGroup.getCheckedRadioButtonId();\n\n if(selectedRadioButton == R.id.radioSpending){\n Log.d(\"NewTransactionActivity\", \"Clicked on Spending\");\n earnedOrSpent = \"Spent\";\n }\n else{\n Log.d(\"NewTransactionActivity\", \"Clicked on Earning\");\n earnedOrSpent = \"Earned\";\n }\n\n storeTransactionToDatabase(clientId, earnedOrSpent, amountGiven, sourceGiven, descriptionGiven);\n\n }",
"@Override\n public void onClick(View v) {\n if(v == mFab) {\n final Dialog adddialog = new Dialog(getActivity());\n adddialog.setContentView(R.layout.add_plan_layout);\n adddialog.setCancelable(false);\n adddialog.show();\n Button confirm = (Button) adddialog.findViewById(R.id.plan);\n Button cancel = (Button) adddialog.findViewById(R.id.no_thank);\n final EditText plan = (EditText) adddialog.findViewById(R.id.add_plan);\n mDbHelper = new DbHelper(getActivity());\n\n //create plan function\n confirm.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Plan planList = new Plan(mDbHelper.getPlanCount(), String.valueOf(plan.getText()));\n // if(!taskExists(planList)) {\n mDbHelper.insertplan(planList);\n plan_list.add(planList);\n refreshList();\n\n Toast.makeText(getActivity(), \"Plan Created\", Toast.LENGTH_SHORT).show();\n\n adddialog.cancel();\n }\n });\n //cancel button function\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n adddialog.cancel();\n }\n });\n\n }\n }",
"@Override\n public void onClick(View v) {\n \t\tString text = textField.getText().toString();\n \t\t//String priority = priorityField.getText().toString();\n\t\t\t\tCalendar newDate = Calendar.getInstance();\n\t\t\t\tnewDate.set(datePicker.getYear(),\n\t\t\t\t\tdatePicker.getMonth(), datePicker.getDayOfMonth());\n \t\tlistener.onAddDialogDone(text, newDate);\n \t\tgetDialog().dismiss();\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\titem1 = tf[0].getText();\n\t\t\t\titem2 = tf[1].getText();\n\t\t\t\titem3 = tf[2].getText();\n\t\t\t\titem4 = tf[3].getText();\n\t\t\t\tsql = transaction.T7(inx0,item1,inx1,item2,inx2,item3,item4);\n\t\t\t\t\n\t\t\t\tDMT_refresh(sql,0);\n\t\t\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n fecha = new datechooser.beans.DateChooserCombo();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n btn_ingresar = new javax.swing.JButton();\n btn_salir = new javax.swing.JButton();\n txt_boletas = new javax.swing.JFormattedTextField();\n txt_transbank = new javax.swing.JFormattedTextField();\n jLabel5 = new javax.swing.JLabel();\n txt_total = new javax.swing.JFormattedTextField();\n btn_obtenerDatos = new javax.swing.JButton();\n btn_editarBoletas = new javax.swing.JButton();\n btn_editarTransbank = new javax.swing.JButton();\n btn_calcular = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Pili's Coffe | Venta diaria\");\n setResizable(false);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Ingresar venta diaria\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Times New Roman\", 0, 18))); // NOI18N\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jLabel1.setText(\"Fecha:\");\n\n fecha.setCurrentView(new datechooser.view.appearance.AppearancesList(\"Light\",\n new datechooser.view.appearance.ViewAppearance(\"custom\",\n new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font(\"Tahoma\", java.awt.Font.PLAIN, 11),\n new java.awt.Color(0, 0, 0),\n new java.awt.Color(0, 0, 255),\n false,\n true,\n new datechooser.view.appearance.swing.ButtonPainter()),\n new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font(\"Tahoma\", java.awt.Font.PLAIN, 11),\n new java.awt.Color(0, 0, 0),\n new java.awt.Color(0, 0, 255),\n true,\n true,\n new datechooser.view.appearance.swing.ButtonPainter()),\n new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font(\"Tahoma\", java.awt.Font.PLAIN, 11),\n new java.awt.Color(0, 0, 255),\n new java.awt.Color(0, 0, 255),\n false,\n true,\n new datechooser.view.appearance.swing.ButtonPainter()),\n new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font(\"Tahoma\", java.awt.Font.PLAIN, 11),\n new java.awt.Color(128, 128, 128),\n new java.awt.Color(0, 0, 255),\n false,\n true,\n new datechooser.view.appearance.swing.LabelPainter()),\n new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font(\"Tahoma\", java.awt.Font.PLAIN, 11),\n new java.awt.Color(0, 0, 0),\n new java.awt.Color(0, 0, 255),\n false,\n true,\n new datechooser.view.appearance.swing.LabelPainter()),\n new datechooser.view.appearance.swing.SwingCellAppearance(new java.awt.Font(\"Tahoma\", java.awt.Font.PLAIN, 11),\n new java.awt.Color(0, 0, 0),\n new java.awt.Color(255, 0, 0),\n false,\n false,\n new datechooser.view.appearance.swing.ButtonPainter()),\n (datechooser.view.BackRenderer)null,\n false,\n true)));\n fecha.setNothingAllowed(false);\n fecha.setFormat(2);\n fecha.setWeekStyle(datechooser.view.WeekDaysStyle.SHORT);\n fecha.setFieldFont(new java.awt.Font(\"Times New Roman\", java.awt.Font.PLAIN, 14));\n try {\n fecha.setForbiddenPeriods(new datechooser.model.multiple.PeriodSet());\n } catch (datechooser.model.exeptions.IncompatibleDataExeption e1) {\n e1.printStackTrace();\n }\n fecha.setNavigateFont(new java.awt.Font(\"Times New Roman\", java.awt.Font.PLAIN, 14));\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jLabel2.setText(\"Boletas:\");\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n jLabel3.setText(\"Transbank:\");\n\n btn_ingresar.setText(\"Ingresar\");\n btn_ingresar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_ingresarActionPerformed(evt);\n }\n });\n\n btn_salir.setText(\"Salir\");\n btn_salir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_salirActionPerformed(evt);\n }\n });\n\n txt_boletas.setEditable(false);\n txt_boletas.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getIntegerInstance())));\n txt_boletas.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txt_boletasFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txt_boletasFocusLost(evt);\n }\n });\n txt_boletas.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n txt_boletasMouseClicked(evt);\n }\n });\n txt_boletas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_boletasActionPerformed(evt);\n }\n });\n\n txt_transbank.setEditable(false);\n txt_transbank.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getIntegerInstance())));\n txt_transbank.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txt_transbankFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txt_transbankFocusLost(evt);\n }\n });\n txt_transbank.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n txt_transbankMouseClicked(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel5.setText(\"Total:\");\n\n txt_total.setEditable(false);\n txt_total.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getIntegerInstance())));\n txt_total.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n txt_totalFocusLost(evt);\n }\n });\n\n btn_obtenerDatos.setText(\"Obtener datos\");\n btn_obtenerDatos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_obtenerDatosActionPerformed(evt);\n }\n });\n\n btn_editarBoletas.setText(\"Editar\");\n btn_editarBoletas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_editarBoletasActionPerformed(evt);\n }\n });\n\n btn_editarTransbank.setText(\"Editar\");\n btn_editarTransbank.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_editarTransbankActionPerformed(evt);\n }\n });\n\n btn_calcular.setText(\"Calcular\");\n btn_calcular.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_calcularActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txt_boletas, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn_editarBoletas))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txt_transbank, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn_editarTransbank))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(txt_total, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btn_calcular))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(fecha, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btn_ingresar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btn_salir))\n .addComponent(btn_obtenerDatos))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(btn_obtenerDatos))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txt_boletas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn_editarBoletas))\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txt_transbank, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn_editarTransbank)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(txt_total, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btn_calcular))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btn_salir)\n .addComponent(btn_ingresar))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void butTools_Click(Object sender, System.EventArgs e) throws Exception {\n FormFeeSchedTools FormF = new FormFeeSchedTools(FeeSchedC.getListShort()[listFeeSched.SelectedIndex].FeeSchedNum);\n FormF.ShowDialog();\n if (FormF.DialogResult == DialogResult.Cancel)\n {\n return ;\n }\n \n Fees.refreshCache();\n ProcedureCodes.refreshCache();\n changed = true;\n if (Programs.isEnabled(ProgramName.eClinicalWorks))\n {\n fillFeeSchedules();\n }\n \n //To show possible added fee schedule.\n fillGrid();\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Fee Schedule Tools\");\n }",
"public void add(ActionEvent e) {\r\n Customer newCustomer = new Customer();\r\n newCustomer.setContactfirstname(tempcontactfirstname);\r\n newCustomer.setContactlastname(tempcontactlastname);\r\n save(newCustomer);\r\n addRecord = !addRecord;\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n pnl_main = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n cbo_iniName = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n txt_inQty = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n txt_iniId = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n btn_clearitem = new javax.swing.JButton();\n btn_save = new javax.swing.JButton();\n btn_back = new javax.swing.JButton();\n txt_inDate = new org.jdesktop.swingx.JXDatePicker();\n btn_clearAll = new javax.swing.JButton();\n lbl_background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Add inventory\");\n setAlwaysOnTop(true);\n setResizable(false);\n\n pnl_main.setLayout(null);\n\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel1.setText(\"Add item to inventory :\");\n pnl_main.add(jLabel1);\n jLabel1.setBounds(30, 10, 210, 23);\n\n jLabel3.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n jLabel3.setText(\"Inventory date : \");\n pnl_main.add(jLabel3);\n jLabel3.setBounds(30, 60, 110, 16);\n\n cbo_iniName.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n cbo_iniName.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n cbo_iniNameItemStateChanged(evt);\n }\n });\n pnl_main.add(cbo_iniName);\n cbo_iniName.setBounds(140, 100, 210, 30);\n\n jLabel5.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n jLabel5.setText(\"Select item name : \");\n pnl_main.add(jLabel5);\n jLabel5.setBounds(30, 110, 110, 16);\n\n txt_inQty.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n pnl_main.add(txt_inQty);\n txt_inQty.setBounds(140, 200, 210, 30);\n\n jLabel7.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n jLabel7.setText(\"Item quantity : \");\n pnl_main.add(jLabel7);\n jLabel7.setBounds(30, 210, 120, 16);\n\n txt_iniId.setEditable(false);\n txt_iniId.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n pnl_main.add(txt_iniId);\n txt_iniId.setBounds(140, 150, 210, 30);\n\n jLabel8.setFont(new java.awt.Font(\"Calibri\", 0, 12)); // NOI18N\n jLabel8.setText(\"Item Id :\");\n pnl_main.add(jLabel8);\n jLabel8.setBounds(30, 160, 120, 16);\n\n btn_clearitem.setText(\"Clear item details\");\n btn_clearitem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_clearitemActionPerformed(evt);\n }\n });\n pnl_main.add(btn_clearitem);\n btn_clearitem.setBounds(190, 290, 130, 40);\n\n btn_save.setText(\"Save item\");\n btn_save.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_saveActionPerformed(evt);\n }\n });\n pnl_main.add(btn_save);\n btn_save.setBounds(70, 290, 100, 40);\n\n btn_back.setText(\"Back\");\n btn_back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_backActionPerformed(evt);\n }\n });\n pnl_main.add(btn_back);\n btn_back.setBounds(280, 10, 70, 30);\n pnl_main.add(txt_inDate);\n txt_inDate.setBounds(140, 50, 210, 30);\n\n btn_clearAll.setText(\"Clear all details\");\n btn_clearAll.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_clearAllActionPerformed(evt);\n }\n });\n pnl_main.add(btn_clearAll);\n btn_clearAll.setBounds(130, 350, 130, 40);\n\n lbl_background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/com.images/Background image.jpeg\"))); // NOI18N\n pnl_main.add(lbl_background);\n lbl_background.setBounds(0, 0, 400, 420);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pnl_main, javax.swing.GroupLayout.PREFERRED_SIZE, 398, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pnl_main, javax.swing.GroupLayout.PREFERRED_SIZE, 419, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }",
"@FXML\n private void incrementWeek() {\n date = date.plusWeeks(1);\n updateDates();\n }",
"private void btntambahActionPerformed(java.awt.event.ActionEvent evt) {\n\tdiaTambahKelas.pack();\n\tdiaTambahKelas.setVisible(true);\n\trefreshTableKelas();\n//\tDate date = jdWaktu.getDate();\n//\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"YYYY-MM-dd\");\n//\tString strDate = dateFormat.format(date);\n//\tif (validateKelas()) {\n//\t int result = fungsi.executeUpdate(\"insert into kelas values ('\" + txtidkls.getText() + \"', '\" + txtkls.getText() + \"', '\" + txtpertemuan.getText() + \"', '\" + strDate + \"', '\" + txtRuang.getText() + \"')\");\n//\t if (result > 0) {\n//\t\trefreshTableKelas();\n//\t }\n//\t}\n\t\n }",
"public abstract void addInExpenditure(Transaction expenditure, Ui ui, String bankType) throws BankException;",
"public void addButtonClicked() {\n //region Description\n String name = person_name.getText().toString().trim();\n if (name.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Name\", Toast.LENGTH_LONG).show();\n return;\n }\n String no = contact_no.getText().toString().trim();\n if (no.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Contact No.\", Toast.LENGTH_LONG).show();\n return;\n }\n String nName = nickName.getText().toString().trim();\n if (nName.equals(\"\")) {\n nName = \"N/A\";\n }\n String Custno = rootNo.getText().toString().trim();\n if (Custno.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Customer No.\", Toast.LENGTH_LONG).show();\n return;\n }\n float custNo = Float.parseFloat(Custno);\n\n String Fees = monthly_fees.getText().toString().trim();\n if (Fees.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the monthly fees\", Toast.LENGTH_LONG).show();\n return;\n }\n int fees = Integer.parseInt(Fees);\n\n String Balance = balance_.getText().toString().trim();\n if (Balance.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the balance\", Toast.LENGTH_LONG).show();\n return;\n }\n int balance = Integer.parseInt(Balance);\n String date = startdate.getText().toString().trim();\n if (startdate.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Start Date\", Toast.LENGTH_LONG).show();\n return;\n }\n //endregion\n dbHendler.addPerson(new PersonInfo(name, no, custNo, fees, balance, areaId, date, nName), this);\n person_name.setText(\"\");\n contact_no.setText(\"\");\n rootNo.setText(\"\");\n monthly_fees.setText(\"\");\n balance_.setText(\"\");\n nickName.setText(\"\");\n // Toast.makeText(getApplicationContext(), name + \" Saved\", Toast.LENGTH_LONG).show();\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n donationAmountJTextField = new javax.swing.JTextField();\n backJButton4 = new javax.swing.JButton();\n titleJLabel = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n regSiteJTable = new javax.swing.JTable();\n jScrollPane2 = new javax.swing.JScrollPane();\n transationHistoryJTable = new javax.swing.JTable();\n donateJButton = new javax.swing.JButton();\n title2JLabel = new javax.swing.JLabel();\n donateAmountJLabel = new javax.swing.JLabel();\n countryJLabel = new javax.swing.JLabel();\n countryJComboBox = new javax.swing.JComboBox();\n autoTransferJButton = new javax.swing.JButton();\n autoTransferJTextField = new javax.swing.JTextField();\n transferDetailsJPanel = new javax.swing.JPanel();\n dollarJLabel = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n jScrollPane3 = new javax.swing.JScrollPane();\n lowRegJTable = new javax.swing.JTable();\n countryJLabel1 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n donationAmountJTextField.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n\n backJButton4.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n backJButton4.setText(\"<< Back\");\n backJButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButton4ActionPerformed(evt);\n }\n });\n\n titleJLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n titleJLabel.setText(\"Transfer to Reistered Site\");\n\n regSiteJTable.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n regSiteJTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Name\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n regSiteJTable.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n regSiteJTableMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(regSiteJTable);\n if (regSiteJTable.getColumnModel().getColumnCount() > 0) {\n regSiteJTable.getColumnModel().getColumn(0).setResizable(false);\n regSiteJTable.getColumnModel().getColumn(1).setResizable(false);\n }\n\n transationHistoryJTable.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n transationHistoryJTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Transaction ID\", \"Amount\", \"Date\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane2.setViewportView(transationHistoryJTable);\n\n donateJButton.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n donateJButton.setText(\"Transfer\");\n donateJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n donateJButtonActionPerformed(evt);\n }\n });\n\n title2JLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n title2JLabel.setText(\"Donation History\");\n\n donateAmountJLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n donateAmountJLabel.setText(\"Transfer Amount\");\n\n countryJLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n countryJLabel.setText(\"Select Country:\");\n\n countryJComboBox.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n countryJComboBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n countryJComboBoxActionPerformed(evt);\n }\n });\n\n autoTransferJButton.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n autoTransferJButton.setText(\"One touch Auto-Transfer\");\n autoTransferJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n autoTransferJButtonActionPerformed(evt);\n }\n });\n\n autoTransferJTextField.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n\n javax.swing.GroupLayout transferDetailsJPanelLayout = new javax.swing.GroupLayout(transferDetailsJPanel);\n transferDetailsJPanel.setLayout(transferDetailsJPanelLayout);\n transferDetailsJPanelLayout.setHorizontalGroup(\n transferDetailsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n transferDetailsJPanelLayout.setVerticalGroup(\n transferDetailsJPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 200, Short.MAX_VALUE)\n );\n\n dollarJLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n dollarJLabel.setText(\"$\");\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n\n lowRegJTable.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lowRegJTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Name\", \"Country\", \"Balance\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n lowRegJTable.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lowRegJTableMouseClicked(evt);\n }\n });\n jScrollPane3.setViewportView(lowRegJTable);\n if (lowRegJTable.getColumnModel().getColumnCount() > 0) {\n lowRegJTable.getColumnModel().getColumn(0).setResizable(false);\n lowRegJTable.getColumnModel().getColumn(1).setResizable(false);\n lowRegJTable.getColumnModel().getColumn(2).setResizable(false);\n lowRegJTable.getColumnModel().getColumn(3).setResizable(false);\n }\n\n countryJLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 16)); // NOI18N\n countryJLabel1.setText(\"Registered Site with Low Balance\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(236, 236, 236)\n .addComponent(dollarJLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(donationAmountJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(donateJButton))\n .addGroup(layout.createSequentialGroup()\n .addGap(64, 64, 64)\n .addComponent(donateAmountJLabel))))\n .addGroup(layout.createSequentialGroup()\n .addGap(321, 321, 321)\n .addComponent(title2JLabel))\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(backJButton4)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(autoTransferJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(autoTransferJButton))\n .addComponent(jScrollPane1)\n .addComponent(transferDetailsJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(titleJLabel)\n .addComponent(countryJLabel))\n .addGap(18, 18, 18)\n .addComponent(countryJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(52, 52, 52)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 553, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(158, 158, 158)\n .addComponent(countryJLabel1)))\n .addContainerGap(105, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titleJLabel)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(countryJLabel)\n .addComponent(countryJComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(autoTransferJButton)\n .addComponent(autoTransferJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(donateAmountJLabel)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(donateJButton)\n .addComponent(donationAmountJTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dollarJLabel))\n .addGap(18, 18, 18)\n .addComponent(title2JLabel)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(transferDetailsJPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(backJButton4)\n .addContainerGap(27, Short.MAX_VALUE))\n .addComponent(jSeparator1)\n .addGroup(layout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(countryJLabel1)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }",
"public void addTX(){\r\n System.out.println(\"\\n\\n\");//print new line for clarity;\r\n\r\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder builder = null;\r\n\r\n try { builder = factory.newDocumentBuilder(); }\r\n catch (ParserConfigurationException e) { e.printStackTrace(); }\r\n\r\n // Load the input XML document, parse it and return an instance of the document class. will need to make this work on any computer somehow.\r\n Document document = null;\r\n\r\n try { document = builder.parse(new File(\"test.xml\")); }\r\n catch (SAXException e) { e.printStackTrace(); }\r\n catch (IOException e) { e.printStackTrace(); }\r\n\r\n //refere to Transmitter.java\r\n List<sample.Transmitter> transmitters = new ArrayList<sample.Transmitter>();\r\n NodeList nodeList = document.getDocumentElement().getChildNodes();\r\n for (int i = 0; i < nodeList.getLength(); i++) { //loop through to get every item and its attributes from the test.xml\r\n Node node = nodeList.item(i);\r\n if (node.getNodeType() == Node.ELEMENT_NODE) {\r\n Element elem = (Element) node;\r\n // Get the value of the ID attribute.\r\n ID = node.getAttributes().getNamedItem(\"ID\").getNodeValue();// transmitters(i.e. ULXTE-2)\r\n powerRating = Double.parseDouble(elem.getElementsByTagName(\"Power\").item(0).getChildNodes().item(0).getNodeValue());\r\n\r\n transmitters.add(new sample.Transmitter(ID, pa, cabinets, powerblocks, linesize, powerRating));//call constructor in Transmitter.java to set values for variables\r\n //read transmitter ID's into tx_cb combo box\r\n\r\n if(powerRating > Double.parseDouble(tpo.getText())) {\r\n tx_cb.getItems().add(ID);//add each ID(i.e. ULXTE-2) to tx_cb combo box\r\n System.out.println(ID + \"added to Transmitter combo box\");\r\n }\r\n }\r\n }\r\n }",
"public void addPart() {\n\n if(isValidPart()) {\n double price = Double.parseDouble(partPrice.getText());\n String name = partName.getText();\n int stock = Integer.parseInt(inventoryCount.getText());\n int id = Integer.parseInt(partId.getText());\n int minimum = Integer.parseInt(minimumInventory.getText());\n int maximum = Integer.parseInt(maximumInventory.getText());\n String variableText = variableTextField.getText();\n\n if (inHouse.isSelected()) {\n InHouse newPart = new InHouse(id,name,price,stock,minimum,maximum,Integer.parseInt(variableText));\n if (PassableData.isModifyPart()) {\n Controller.getInventory().updatePart(PassableData.getPartIdIndex(), newPart);\n } else {\n Controller.getInventory().addPart(newPart);\n }\n\n } else if (outsourced.isSelected()) {\n Outsourced newPart = new Outsourced(id,name,price,stock,minimum,maximum,variableText);\n if (PassableData.isModifyPart()) {\n Controller.getInventory().updatePart(PassableData.getPartIdIndex(), newPart);\n } else {\n Controller.getInventory().addPart(newPart);\n }\n }\n try {\n InventoryData.getInstance().storePartInventory();\n InventoryData.getInstance().storePartIdIndex();\n } catch (IOException e) {\n e.printStackTrace();\n }\n exit();\n\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n currency = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n payment_for = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n vendor_code = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n vendor_name = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n bank_code = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n bank_name = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n account_number = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n app_number = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel10 = new javax.swing.JLabel();\n total_amount = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n amount_deduct = new javax.swing.JTextField();\n jLabel12 = new javax.swing.JLabel();\n input_date = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n prepared_by = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Currency\");\n\n currency.setEditable(false);\n\n jLabel2.setText(\"Payment For\");\n\n payment_for.setEditable(false);\n\n jLabel3.setText(\"Vendor Code\");\n\n vendor_code.setEditable(false);\n\n jLabel4.setText(\"Vendor Name\");\n\n vendor_name.setEditable(false);\n\n jLabel5.setText(\"Bank Code\");\n\n bank_code.setEditable(false);\n\n jLabel6.setText(\"Bank Name\");\n\n bank_name.setEditable(false);\n\n jLabel7.setText(\"Account Number\");\n\n account_number.setEditable(false);\n\n jLabel8.setText(\"Due Date\");\n\n jLabel9.setText(\"App Number\");\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Invoice Number\", \"Invoice Date\", \"Invoice Amount\", \"Number AWB / BL\"\n }\n ));\n jTable1.setToolTipText(\"\");\n jTable1.setEnabled(false);\n jScrollPane1.setViewportView(jTable1);\n\n jLabel10.setText(\"Total Amount\");\n\n total_amount.setEditable(false);\n\n jLabel11.setText(\"Amount Deduct\");\n\n amount_deduct.setEditable(false);\n\n jLabel12.setText(\"Input Date\");\n\n input_date.setEditable(false);\n\n jLabel13.setText(\"Prepared By\");\n\n prepared_by.setEditable(false);\n\n jButton1.setText(\"Check\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Exit\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Confirm\");\n jButton3.setEnabled(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(currency))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(payment_for))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(vendor_name, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(vendor_code)))\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(account_number))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(bank_name))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(bank_code, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(app_number)\n .addGap(18, 18, 18))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel9)\n .addContainerGap(31, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(total_amount, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel11)\n .addGap(6, 6, 6)\n .addComponent(amount_deduct, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(input_date, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel13)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(prepared_by, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(103, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 548, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(currency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addComponent(bank_code, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(payment_for, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(bank_name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(app_number, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(vendor_code, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addComponent(account_number, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(9, 9, 9)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(vendor_name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(total_amount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel12)\n .addComponent(input_date, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel11)\n .addComponent(amount_deduct, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel13)\n .addComponent(prepared_by, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton4)\n .addComponent(jButton1)\n .addComponent(jButton3))\n .addContainerGap())\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n back = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n dateField = new javax.swing.JTextField();\n checkNumber = new javax.swing.JTextField();\n checkingIDField = new javax.swing.JTextField();\n amountField = new javax.swing.JTextField();\n saveButton = new javax.swing.JButton();\n status = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n taxIDField = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n back.setText(\"CANCEL\");\n back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"DATE:\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel2.setText(\"CHECK NUMBER:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setText(\"Checking Account ID:\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"Amount:\");\n\n dateField.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n dateField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n\n checkNumber.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n checkNumber.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n\n checkingIDField.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n checkingIDField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n\n amountField.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n amountField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n amountField.setToolTipText(\"\");\n\n saveButton.setText(\"SAVE\");\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n status.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n status.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setText(\"TaxID:\");\n\n taxIDField.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n taxIDField.setHorizontalAlignment(javax.swing.JTextField.CENTER);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(back)\n .addGap(18, 18, 18)\n .addComponent(saveButton)\n .addGap(23, 23, 23))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(84, 84, 84)\n .addComponent(amountField, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(checkingIDField, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)\n .addComponent(taxIDField))))\n .addGap(116, 116, 116))))\n .addGroup(layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(status, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(dateField, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(checkNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 31, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(dateField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(checkNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(taxIDField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(checkingIDField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(amountField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(21, 21, 21)\n .addComponent(status, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(back)\n .addComponent(saveButton))\n .addContainerGap())\n );\n\n pack();\n }",
"public void addWeeklyTravelCard(AppiumActions action) throws Throwable{\n\t\taction.click(HomePageAndroid.imageView, \"imageView\");\n\t\taction.click(addTravelCardPageAndroid.buyBtn, \"buyBtn\");\n\t\taction.click(addTravelCardPageAndroid.travelcardType, \"travelcardType\");\n\t\taction.click(addTravelCardPageAndroid.weekLabel, \"weekLabel\");\n\t\taction.click(addTravelCardPageAndroid.fromZone, \"fromZone\");\n\t\taction.click(addTravelCardPageAndroid.fromZoneValue, \"fromZoneValue\");\n\t\taction.click(addTravelCardPageAndroid.toZone, \"toZone\");\n\t\taction.click(addTravelCardPageAndroid.toZoneValue, \"toZoneValue\");\n\t\taction.click(addTravelCardPageAndroid.startDate, \"startDate\");\n\t\taction.click(addTravelCardPageAndroid.dateValue, \"dateValue\");\n\t\taction.click(addTravelCardPageAndroid.confirm, \"confirm\");\n\t\taction.click(addTravelCardPageAndroid.next, \"next\");\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n exerciseAddPanel = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n exerciseIDTF = new javax.swing.JTextField();\n exerciseDescriptionTF = new javax.swing.JTextField();\n exerciseBurntTF = new javax.swing.JTextField();\n exerciseAddButton = new javax.swing.JButton();\n goEAGBackButton = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel2.setText(\"Ingresa la ID de tu Ejercicio\");\n\n jLabel3.setText(\"Añade una Descripcion\");\n\n jLabel4.setText(\"Ingresa la cantidad de calorias quemadas cada hora\");\n\n exerciseIDTF.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exerciseIDTFActionPerformed(evt);\n }\n });\n\n exerciseAddButton.setText(\"Añadir Ejercicio\");\n exerciseAddButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exerciseAddButtonActionPerformed(evt);\n }\n });\n\n goEAGBackButton.setText(\"Regresar\");\n goEAGBackButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n goEAGBackButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout exerciseAddPanelLayout = new javax.swing.GroupLayout(exerciseAddPanel);\n exerciseAddPanel.setLayout(exerciseAddPanelLayout);\n exerciseAddPanelLayout.setHorizontalGroup(\n exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(exerciseAddPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(exerciseAddPanelLayout.createSequentialGroup()\n .addGroup(exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(101, 101, 101))\n .addGroup(exerciseAddPanelLayout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))\n .addGroup(exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(exerciseDescriptionTF)\n .addComponent(exerciseIDTF)\n .addComponent(exerciseBurntTF)\n .addComponent(exerciseAddButton, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE))\n .addContainerGap())\n .addGroup(exerciseAddPanelLayout.createSequentialGroup()\n .addComponent(goEAGBackButton, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n exerciseAddPanelLayout.setVerticalGroup(\n exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(exerciseAddPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(exerciseIDTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(exerciseDescriptionTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(exerciseAddPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(exerciseBurntTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(32, 32, 32)\n .addComponent(exerciseAddButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE)\n .addComponent(goEAGBackButton)\n .addContainerGap())\n );\n\n jLabel1.setText(\"Añade tu Ejercicio\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(exerciseAddPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(exerciseAddPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 500, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 313, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n\n pack();\n }",
"public last_transactions() {\n initComponents();\n }",
"public void setWeek(String week) {\r\n this.week = week;\r\n }",
"public String handleAdd() \n throws HttpPresentationException, webschedulePresentationException\n { \n\t try {\n\t Project project = new Project();\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n\t } catch(Exception ex) {\n return showAddPage(\"You must fill out all fields to add this project\");\n }\n }",
"private void addrec() {\n\t\tnmfkpinds.setPgmInd34(false);\n\t\tnmfkpinds.setPgmInd36(true);\n\t\tnmfkpinds.setPgmInd37(false);\n\t\tstateVariable.setActdsp(replaceStr(stateVariable.getActdsp(), 1, 8, \"ADDITION\"));\n\t\tstateVariable.setXwricd(\"INV\");\n\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00003 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t}\n\t\tstateVariable.setXwa2cd(\"EAC\");\n\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\taddrec0();\n\t}",
"public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }",
"public void crearReaTrans(){\n\t // could have been factorized with the precedent view\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t \n\t\tp1 = new JPanel();\n\t p2 = new JPanel();\n\t \n\t String[] a = {\"Regresar\",\"Continuar\"}, c = {\"Cuenta de origen\",\"Monto\",\"Cuenta de destino\"};\n\t \n\t p1.setLayout(new GridLayout(1,2));\n\t p2.setLayout(new GridLayout(1,3));\n\t \n\t for (int x=0; x<2; x++) {\n\t b = new JButton(a[x]);\n\t botones.add(b);\n\t }\n\t for (JButton x:botones) {\n\t x.setPreferredSize(new Dimension(110,110));\n\t p1.add(x);\n\t }\n // Add buttons panel \n\t add(p1, BorderLayout.SOUTH);\n\t \n\t for (int x=0; x<3; x++){\n\t tf=new JTextField(c[x]);\n\t tf.setPreferredSize(new Dimension(10,100));\n textos.add(tf);\n\t p2.add(tf);\n\t }\n // Add textfields panel\n\t add(p2, BorderLayout.NORTH);\n\t}",
"@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}",
"protected void addButtonActionPerformed() {\n\t\tFoodTruckManagementSystem ftms = FoodTruckManagementSystem.getInstance();\n\t\t// Initialize controller\n\t\tMenuController mc = new MenuControllerAdapter();\n\t\t\n\t\t// Get selected supply type\n\t\tSupplyType supply = null;\n\t\ttry {\n\t\t\tsupply = ftms.getSupplyType(selectedSupply);\n\t\t} catch (NullPointerException | IndexOutOfBoundsException e) {\n\t\t}\n\t\t\n\t\t// Get given quantity\n\t\tdouble qty = -1;\n\t\ttry {\n\t\t\tqty = Double.parseDouble(qtyTextField.getText());\n\t\t} catch (NumberFormatException | NullPointerException e) {\n\t\t}\n\t\t\n\t\t// Add supply to item\n\t\ttry {\n\t\t\tmc.addIngredientToItem(item, supply, qty);\n\t\t} catch (InvalidInputException | DuplicateTypeException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\t\t\n\t\trefreshData();\n\t\t\n\t}",
"@Override\n\tpublic boolean addWithdraw(Withdraws wd) throws Exception {\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tString sql = \"insert into withdraws(a_id,amount,currency,draw_time) values('\"\n\t\t\t\t+wd.getA_id()+\"','\"\n\t\t\t\t+wd.getAmount()+\"','\"\n\t\t\t\t+wd.getCurrency()+\"','\"\n\t\t\t\t+wd.getDraw_time()+\"')\";\n\t\ttry {\n\t\t\tconn = DBConnection.getConnection();\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tint col = ps.executeUpdate();\n\t\t\tif (col > 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} catch (SQLException e) {\n\t\t\tthrow new Exception(\"insert withdraw record exception:\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (ps != null) {\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new Exception(\"ps close exception:\" + e.getMessage());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new Exception(\"conn close exception:\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t}",
"@FXML\n private void addNewPartType(ActionEvent event) {\n String name = nameText.getText();\n name = name.trim();\n if(name.equals(\"\")){\n showAlert(\"No Name\", \"This part type has no name, please input a name\");\n return;\n }\n \n String costText = this.costText.getText();\n costText = costText.trim();\n if(costText.equals(\"\")){\n showAlert(\"No Cost\", \"This part type has no cost, please input a cost.\");\n return;\n }\n \n String quantityText = this.quantityText.getText();\n quantityText = quantityText.trim();\n if(quantityText.equals(\"\")){\n showAlert(\"No Quantity\", \"This part type has no quantity, please input a quantity.\");\n return;\n }\n \n String description = descriptionText.getText();\n description = description.trim();\n if(description.equals(\"\")){\n showAlert(\"No Description\", \"This part type has no decription, please input a description.\");\n return;\n }\n \n double cost = Double.parseDouble(costText);\n int quantity = Integer.parseInt(quantityText);\n boolean success = partInventory.addNewPartTypeToInventory(name, \n description, cost, quantity);\n if(success){\n showAlert(\"Part Type Sucessfully Added\", \"The new part type was sucessfully added\");\n }else{\n showAlert(\"Part Type Already Exists\", \"This part already exists. If you would like to add stock, please select \\\"Add Stock\\\" on the righthand side of the screen.\\n\" \n + \"If you would like to edit this part, please double click it in the table.\");\n }\n // gets the popup window and closes it once part added\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n stage.close();\n }",
"protected abstract Transaction createAndAdd();",
"public void onSaveButton(View v) {\n\n hasMoney = true;\n\n transactionNotes = findViewById(R.id.transaction_notes);\n final FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n final EditText transactionPrice = findViewById(R.id.transaction_price);\n\n\n // check the field of the transaction\n if (dateText.getText().toString().matches(\"\")) {\n return;\n }\n\n if (transactionPrice.getText().toString().matches(\"\")) {\n Toast.makeText(EditTransaction.this, \"Insert a price!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // delete the unnecessary data\n DocumentReference docRef = db.document(firebaseAuth.getCurrentUser().getUid()).collection(transactionDate).document(transactionID);\n docRef.delete();\n\n // update the totalsum in the DB\n HashMap<String, Double> sum = new HashMap<>();\n sum.put(\"amount\", totalSum - transaction.getAmount());\n db.document(firebaseAuth.getCurrentUser().getUid()).collection(\"Wallet\").document(\"MainWallet\").set(sum);\n\n // in case the transaction was moved to another month\n // we need to insert this transaction to the documents where it belongs\n db.document(firebaseAuth.getCurrentUser().getUid()).collection(\"Wallet\").document(\"MainWallet\").get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n\n if (task.isSuccessful()) {\n\n DocumentSnapshot documentSnapshot = task.getResult();\n Boolean isPosivite = false;\n if (income.get(CategoryText.getText().toString()) != null)\n isPosivite = true;\n\n totalSum = (double) documentSnapshot.getData().get(\"amount\");\n\n // if the transaction is not possible\n // i.e the user does not have enough money\n // then show a little message\n if (totalSum - Double.parseDouble(transactionPrice.getText().toString()) < 0 && !isPosivite) {\n Toast.makeText(EditTransaction.this, \"You are a little poor human\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n // otherweise save the new transaction to the DB\n DocumentReference ref = db\n .document(firebaseAuth.getCurrentUser().getUid()).collection(monthCollection).document();\n\n Map<String, String> transaction = new HashMap<>();\n transaction.put(\"date\", dateText.getText().toString());\n transaction.put(\"price\", transactionPrice.getText().toString());\n transaction.put(\"notes\", transactionNotes.getText().toString());\n Toast.makeText(EditTransaction.this, dateText.getText().toString() + transactionPrice.getText().toString() + transactionNotes.getText().toString(), Toast.LENGTH_SHORT).show();\n\n CategoryText = findViewById(R.id.transaction_select_category);\n String[] dates = dateText.getText().toString().split(\"-\");\n String luna = dates[0], zi = dates[1], an = dates[2];\n\n\n HashMap<String, String> months = new HashMap<>();\n String[] mnths = {\"\", \"Jan\", \"Feb\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"Sept\", \"Oct\", \"Nov\", \"Dec\"};\n for (int i = 1; i <= 12; i++) {\n if (i < 10) {\n months.put(Integer.toString(i), mnths[i]);\n } else {\n\n months.put(Integer.toString(i), mnths[i]);\n }\n }\n\n Toast.makeText(EditTransaction.this, months.get(luna), Toast.LENGTH_SHORT).show();\n\n\n TransactionDetails transactionDetails = new TransactionDetails(Integer.parseInt(zi), zi, months.get(luna), an, CategoryText.getText().toString(), (Integer) findViewById(R.id.category_image).getTag(), -Double.parseDouble(transactionPrice.getText().toString()), ref.getId());\n\n // daca adaug bani dau cu plus\n if (isPosivite)\n transactionDetails.setAmount(-transactionDetails.getAmount());\n\n ref.set(transactionDetails);\n\n // update totalsum\n HashMap<String, Double> sum = new HashMap<>();\n sum.put(\"amount\", totalSum + transactionDetails.getAmount());\n db.document(firebaseAuth.getCurrentUser().getUid()).collection(\"Wallet\").document(\"MainWallet\").set(sum);\n\n startActivity(new Intent(EditTransaction.this, MainActivity.class));\n\n }\n\n }\n\n }\n });\n }",
"private void addDailyReportButtonFunction() {\n\t\tdailyReportButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}\t\t\n\t\t});\n\t}",
"@Override\n\tpublic edu.weather.servicebuilder.model.Weather addWeather(\n\t\tedu.weather.servicebuilder.model.Weather weather) {\n\t\treturn _weatherLocalService.addWeather(weather);\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextField5 = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jDateChooser1 = new com.toedter.calendar.JDateChooser();\n jDateChooser2 = new com.toedter.calendar.JDateChooser();\n jComboBox1 = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jLabel7 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n\n jTextField5.setText(\"jTextField5\");\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setTitle(\"Payments\");\n setPreferredSize(new java.awt.Dimension(1000, 500));\n\n jLabel1.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jLabel1.setText(\"Event ID\");\n\n jLabel2.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jLabel2.setText(\"Event Name\");\n\n jLabel3.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jLabel3.setText(\"Select Location\");\n\n jLabel4.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jLabel4.setText(\"Start Date \");\n\n jLabel5.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jLabel5.setText(\"End Date\");\n\n jLabel6.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jLabel6.setText(\"Number of days :\");\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Type\", \"Exhibition\", \"Bridal show\", \"Book fair\", \"Conference\", \"Motor Shows\", \"Pro food\", \"Architect\", \"Musical show\", \"Social event\", \"Movie Premiers\", \"Other(verify below\" }));\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), null));\n\n jLabel7.setFont(new java.awt.Font(\"Georgia\", 0, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(0, 0, 102));\n jLabel7.setText(\"Total Balance :\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jLabel7)\n .addContainerGap(191, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel7)\n .addContainerGap(23, Short.MAX_VALUE))\n );\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), \"Income table\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Georgia\", 0, 11))); // NOI18N\n\n jTable1.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null},\n {null, null, null, null, null, null}\n },\n new String [] {\n \"Event ID\", \"Event name\", \"Location\", \"Start date\", \"End date\", \"Amount\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(56, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(45, 45, 45))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(280, 280, 280))\n );\n\n jButton1.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/icons8_Save_26px.png\"))); // NOI18N\n jButton1.setText(\"Save\");\n\n jButton2.setBackground(new java.awt.Color(255, 255, 255));\n jButton2.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/icons8_User_Group_Man_Man_26px.png\"))); // NOI18N\n jButton2.setText(\"Forward to Finance\");\n\n jButton3.setFont(new java.awt.Font(\"Georgia\", 0, 11)); // NOI18N\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Icon/icons8_SMS_26px.png\"))); // NOI18N\n jButton3.setText(\"Inform Organizer\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addGroup(layout.createSequentialGroup()\n .addGap(2, 2, 2)\n .addComponent(jLabel5)))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField2)\n .addComponent(jTextField1)\n .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(81, 81, 81)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addGap(317, 317, 317)\n .addComponent(jButton1)\n .addGap(44, 44, 44)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))\n .addGroup(layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(47, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(29, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(38, 38, 38)\n .addComponent(jLabel4)))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(132, 132, 132)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(213, 213, 213))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnExit = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n btnSave = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n btnAdd = new javax.swing.JButton();\n btnSearch = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblSalesDetail = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n txtProductId = new javax.swing.JTextField();\n btnLookupProduct = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtId = new javax.swing.JTextField();\n jdcTransaction = new com.toedter.calendar.JDateChooser();\n lblTotal = new javax.swing.JLabel();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setTitle(\"Penjualan\");\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameClosing(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n btnExit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnudoor.png\"))); // NOI18N\n btnExit.setText(\"Keluar\");\n btnExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExitActionPerformed(evt);\n }\n });\n\n btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuCancel.png\"))); // NOI18N\n btnCancel.setText(\"Batal\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuSave.png\"))); // NOI18N\n btnSave.setText(\"Simpan\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnudelete.png\"))); // NOI18N\n btnDelete.setText(\"Hapus\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n btnEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuManuaEdit.png\"))); // NOI18N\n btnEdit.setText(\"Edit\");\n btnEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditActionPerformed(evt);\n }\n });\n\n btnAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuNew.png\"))); // NOI18N\n btnAdd.setText(\"Tambah\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuFind.png\"))); // NOI18N\n btnSearch.setText(\"Cari\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(evt);\n }\n });\n\n tblSalesDetail.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Kode Barang\", \"Nama Barang\", \"Harga Satuan\", \"Kuantitas\", \"Sub Total\"\n }\n ));\n tblSalesDetail.setCellSelectionEnabled(true);\n jScrollPane1.setViewportView(tblSalesDetail);\n\n jLabel1.setText(\"Kode Barang\");\n\n txtProductId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtProductIdActionPerformed(evt);\n }\n });\n\n btnLookupProduct.setText(\"...\");\n btnLookupProduct.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLookupProductActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"ID Transaksi\");\n\n jLabel3.setText(\"Tanggal\");\n\n txtId.setEnabled(false);\n\n jdcTransaction.setEnabled(false);\n\n lblTotal.setFont(new java.awt.Font(\"Courier New\", 1, 36)); // NOI18N\n lblTotal.setText(\"Rp. 0\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnAdd)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEdit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnExit)\n .addGap(73, 73, 73))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 630, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(txtProductId, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnLookupProduct))\n .addComponent(txtId, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jdcTransaction, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(80, 80, 80))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblTotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnAdd, btnCancel, btnDelete, btnEdit, btnExit, btnSave, btnSearch});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDelete)\n .addComponent(btnSave)\n .addComponent(btnCancel)\n .addComponent(btnEdit)\n .addComponent(btnSearch)\n .addComponent(btnExit))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jdcTransaction, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtProductId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnLookupProduct)))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(9, 9, 9)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnAdd, btnCancel, btnDelete, btnEdit, btnExit, btnSave, btnSearch});\n\n pack();\n }",
"private static Calendar add(Calendar cal, int field, int amount) {\n cal.add(field, amount);\n return cal;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtFieldTimeanddate2 = new javax.swing.JTextField();\n lblTimeanddate2 = new javax.swing.JLabel();\n lblTimeanddate5 = new javax.swing.JLabel();\n txtFieldTimeanddate3 = new javax.swing.JTextField();\n jButtonAddPayment = new javax.swing.JButton();\n lblPaymentType = new javax.swing.JLabel();\n txtFieldTimeanddate4 = new javax.swing.JTextField();\n jLabelBackground = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n setMinimumSize(new java.awt.Dimension(500, 300));\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n getContentPane().add(txtFieldTimeanddate2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 140, 180, 23));\n\n lblTimeanddate2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n lblTimeanddate2.setForeground(new java.awt.Color(255, 255, 255));\n lblTimeanddate2.setText(\"Pcs\");\n getContentPane().add(lblTimeanddate2, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 140, 40, 23));\n\n lblTimeanddate5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n lblTimeanddate5.setForeground(new java.awt.Color(255, 255, 255));\n lblTimeanddate5.setText(\"Feet\");\n getContentPane().add(lblTimeanddate5, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 60, 40, 23));\n getContentPane().add(txtFieldTimeanddate3, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 110, 180, 23));\n\n jButtonAddPayment.setBackground(new java.awt.Color(0, 51, 153));\n jButtonAddPayment.setFont(new java.awt.Font(\"Titillium Web\", 1, 12)); // NOI18N\n jButtonAddPayment.setForeground(new java.awt.Color(255, 255, 255));\n jButtonAddPayment.setText(\"Calculate\");\n jButtonAddPayment.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonAddPaymentActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonAddPayment, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 190, 180, 30));\n\n lblPaymentType.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n lblPaymentType.setForeground(new java.awt.Color(255, 255, 255));\n lblPaymentType.setText(\"Box\");\n getContentPane().add(lblPaymentType, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 110, 60, 23));\n getContentPane().add(txtFieldTimeanddate4, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 60, 180, 23));\n\n jLabelBackground.setForeground(new java.awt.Color(255, 255, 255));\n jLabelBackground.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Resources/Icons/background.png\"))); // NOI18N\n getContentPane().add(jLabelBackground, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 510, 290));\n\n pack();\n }",
"@FXML\n\tprivate void handleNewTaxi() {\n\t\tTaxi tempTaxi = new Taxi();\n\t\tboolean okClicked = mainApp.showTaxiEditDialog(tempTaxi);\n\t\tif (okClicked) {\n\t\t\tmainApp.getTaxiData().add(tempTaxi);\n\t\t}\n\t}",
"public void addEvent() {\n TimetableUserItem event;\n try {\n String description = getDescription();\n String date = getDate();\n String startTime = getStartTime();\n String endTime = getEndTime();\n verifyCorrectTime(startTime, endTime);\n String location = getLocation();\n event = new TimetableUserItem(description, date, startTime, endTime, location);\n verifyNoConflict(event);\n timetable.addEvent(event.getDayOfWeek(), event);\n timetable.addToEvents(event);\n addUI.printEventMessage(event);\n } catch (AddException e) {\n e.printMessage();\n logger.log(Level.WARNING, \"Invalid event created, event has not been added to timetable\");\n }\n }",
"@FXML\n void addButton(ActionEvent event) {\n\n Part selectedPart = partTableView.getSelectionModel().getSelectedItem();\n\n if (selectedPart == null) {\n AlartMessage.displayAlertAdd(6);\n } else {\n assocParts.add(selectedPart);\n assocPartTableView.setItems(assocParts);\n }\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.FinancialStatement addNewFinancialStatements();",
"public void agregar(JComboBox cbx, RSDateChooser dt,\n JPasswordField pws, JTextField txtCorreo, JTextField txtDNI, JTextField txtNombre, JTextField txtApellidos,\n JTextField txtTelef) {\n\n dConfirmar = new D_Confirmar(new JFrame(), true);\n\n mComboRoll = (M_ComboRoll) cbx.getSelectedItem();\n date = dt.getDatoFecha();\n d = date.getTime();\n sqlFecha = new java.sql.Date(d);\n\n Pass = new String(pws.getPassword());\n\n nuevoPass = rText.ecnode(secretKey, Pass);\n\n mUsuarios.setDni(txtDNI.getText());\n mUsuarios.setPassword(nuevoPass);\n mUsuarios.setNombre(txtNombre.getText());\n mUsuarios.setApellidos(txtApellidos.getText());\n mUsuarios.setFechaNacimiento(sqlFecha.toString());\n mUsuarios.setCorreoElectronico(txtCorreo.getText());\n mUsuarios.setTelefono(txtTelef.getText());\n mUsuarios.setRoll(mComboRoll.getId());\n\n if (sUsuario.agregarUsuarios(mUsuarios)) {\n rAgregarImg.agregarImagen(\"/Img/Dialogos/Hecho.png\", D_Confirmar.lblImg);\n D_Confirmar.lblMensaje.setText(\"Registro Exitoso\".toUpperCase());\n limpiarCajas(pws, txtDNI, txtNombre, txtApellidos, txtTelef, txtCorreo, cbx, dt);\n mostrarTablaUsuario(V_PanelUsuario.tblUsuarios);\n dConfirmar.setVisible(true);\n } else {\n rAgregarImg.agregarImagen(\"/Img/Dialogos/Error.png\", D_Confirmar.lblImg);\n D_Confirmar.lblMensaje.setText(\"Al parecer ocurrio un error\".toUpperCase());\n limpiarCajas(pws, txtDNI, txtNombre, txtApellidos, txtTelef, txtCorreo, cbx, dt);\n dConfirmar.setVisible(true);\n }\n }",
"void addTrade(Trade trade);",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n Dos = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n lbRoomCharges = new javax.swing.JLabel();\n lbServiceTax = new javax.swing.JLabel();\n lbTourismTax = new javax.swing.JLabel();\n lbTotal = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n txtpay = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n txtchange = new javax.swing.JTextField();\n btnpay = new javax.swing.JButton();\n btnback = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setResizable(false);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel1.setText(\"Payment\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"Days of stay:\");\n\n Dos.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n Dos.setText(\"DOS\");\n\n jLabel3.setText(\"Room charges:\");\n\n jLabel4.setText(\"Service tax: \");\n\n jLabel5.setText(\"Tourism tax: \");\n\n jLabel6.setText(\"Total:\");\n\n lbRoomCharges.setText(\"----------\");\n\n lbServiceTax.setText(\"----------\");\n\n lbTourismTax.setText(\"----------\");\n\n lbTotal.setText(\"----------\");\n\n jLabel7.setText(\"Pay (RM):\");\n\n txtpay.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtpayFocusLost(evt);\n }\n });\n txtpay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtpayActionPerformed(evt);\n }\n });\n txtpay.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n txtpayKeyPressed(evt);\n }\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtpayKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtpayKeyTyped(evt);\n }\n });\n\n jLabel8.setText(\"Change (RM):\");\n\n txtchange.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtchangeKeyTyped(evt);\n }\n });\n\n btnpay.setText(\"PAY\");\n btnpay.setEnabled(false);\n btnpay.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnpayActionPerformed(evt);\n }\n });\n\n btnback.setText(\"back\");\n btnback.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnbackActionPerformed(evt);\n }\n });\n\n jLabel9.setText(\"Press ENTER key to confirm pay amount.\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnpay, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 138, Short.MAX_VALUE)\n .addComponent(btnback, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel9)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(18, 18, 18)\n .addComponent(txtpay, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lbTotal)\n .addComponent(lbTourismTax)\n .addComponent(lbServiceTax)\n .addComponent(lbRoomCharges)\n .addGroup(layout.createSequentialGroup()\n .addGap(67, 67, 67)\n .addComponent(jLabel8)\n .addGap(18, 18, 18)\n .addComponent(txtchange, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(Dos, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(Dos))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(lbRoomCharges))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(lbServiceTax))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(lbTourismTax))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(lbTotal))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtpay, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(txtchange, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(4, 4, 4)\n .addComponent(jLabel9)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnpay, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnback)))\n .addContainerGap())\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"public void setAdd() {\n viewState.setWithdraw(false);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n ConnectDatabase.connectDatabase(); //Open the connection\n\n\n /*\n * Begin preparing statements\n */\n\n /* Prepare the name fields */\n try{\n String nameInsertString = \"INSERT INTO names (firstName, middleName, lastName) value(?, ?, ?)\";\n PreparedStatement nameStmt = conn.prepareStatement(nameInsertString);\n //stmt.executeUpdate(\"INSERT INTO names (firstName, middleName, lastName) value(\" + nameEntry + \")\");\n\n nameStmt.setNString(1, firstNameField.getText());\n nameStmt.setNString(2, middleNameField.getText());\n nameStmt.setNString(3, lastNameField.getText());\n\n nameStmt.executeUpdate();\n\n }catch(SQLException se){\n se.printStackTrace();\n }\n\n /* Prepare the address fields */\n try{\n String addressInsertString = \"INSERT INTO direct_deposit (address, city, state, zip_code) value(?, ?, ?, ?)\";\n PreparedStatement addrStmt = conn.prepareStatement(addressInsertString);\n\n addrStmt.setNString(1, addressField.getText());\n addrStmt.setNString(2, cityField.getText());\n addrStmt.setNString(3, stateField.getText());\n addrStmt.setNString(4, zipCodeField.getText());\n\n addrStmt.executeUpdate();\n }catch (SQLException se){\n se.printStackTrace();\n }\n\n /* Check which radio button is pressed (checkings or savings) and update that field */\n if(checkAcctButton.isSelected()){ //User has selected the checking account\n try{\n String checkInsertString = \"INSERT INTO account_num (checking, bank_rout) value(?, ?)\";\n PreparedStatement acctStmt = conn.prepareStatement(checkInsertString);\n\n acctStmt.setNString(1, checkAcctField.getText());\n acctStmt.setNString(2, routNumField.getText());\n\n acctStmt.executeUpdate();\n }catch (SQLException se){\n se.printStackTrace();\n }\n }else{ //User has selected the savings account\n try{\n String saveInsertString = \"INSERT INTO account_num (savings, bank_rout) value(?, ?)\";\n PreparedStatement acctStmt = conn.prepareStatement(saveInsertString);\n\n acctStmt.setNString(1, saveAcctField.getText());\n acctStmt.setNString(2, routNumField.getText());\n\n acctStmt.executeUpdate();\n }catch (SQLException se){\n se.printStackTrace();\n }\n }\n\n dataSentField.setText(\"Data sent\");\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n dateTbox = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n branchTbox = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n debitTbox = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n creditTbox = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n amountTbox = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n narrationTbox = new javax.swing.JTextField();\n exitButton = new javax.swing.JButton();\n headButton = new javax.swing.JButton();\n\n setTitle(\"Transactions Data Entry\");\n\n jPanel1.setLayout(new java.awt.GridLayout(7, 2, 20, 20));\n\n jLabel1.setText(\"Date\");\n jPanel1.add(jLabel1);\n jPanel1.add(dateTbox);\n\n jLabel2.setText(\"Branch\");\n jPanel1.add(jLabel2);\n jPanel1.add(branchTbox);\n\n jLabel3.setText(\"Debit ( R )\");\n jPanel1.add(jLabel3);\n jPanel1.add(debitTbox);\n\n jLabel4.setText(\"Credit ( P )\");\n jPanel1.add(jLabel4);\n jPanel1.add(creditTbox);\n\n jLabel5.setText(\"Amount\");\n jPanel1.add(jLabel5);\n jPanel1.add(amountTbox);\n\n jLabel6.setText(\"Narration\");\n jPanel1.add(jLabel6);\n jPanel1.add(narrationTbox);\n\n exitButton.setText(\"Esc : Exit\");\n jPanel1.add(exitButton);\n\n headButton.setText(\"F10 : A/c Head\");\n jPanel1.add(headButton);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n cmbPiece = new javax.swing.JComboBox<>();\n cmbProvider = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtQuantity = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblWarehouse = new javax.swing.JTable();\n btnSave = new javax.swing.JButton();\n lblDate = new javax.swing.JLabel();\n btnClear = new javax.swing.JButton();\n btnUpdate = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n dtpFrom = new org.jdesktop.swingx.JXDatePicker();\n jLabel7 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n dtpTo = new org.jdesktop.swingx.JXDatePicker();\n btnReport = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Pieza:\");\n\n cmbPiece.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n cmbProvider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel2.setText(\"Proveedor:\");\n\n jLabel3.setText(\"Cantidad:\");\n\n jLabel4.setText(\"Fecha de compra:\");\n\n tblWarehouse.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Id\", \"Pieza\", \"Proveedor\", \"Cantidad\", \"Fecha de compra\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblWarehouse.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblWarehouseMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblWarehouse);\n if (tblWarehouse.getColumnModel().getColumnCount() > 0) {\n tblWarehouse.getColumnModel().getColumn(0).setResizable(false);\n tblWarehouse.getColumnModel().getColumn(1).setResizable(false);\n tblWarehouse.getColumnModel().getColumn(2).setResizable(false);\n tblWarehouse.getColumnModel().getColumn(3).setResizable(false);\n tblWarehouse.getColumnModel().getColumn(4).setResizable(false);\n }\n\n btnSave.setText(\"Guardar\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n lblDate.setText(\"jLabel5\");\n\n btnClear.setText(\"Limpiar\");\n btnClear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnClearActionPerformed(evt);\n }\n });\n\n btnUpdate.setText(\"Modificar\");\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n\n btnDelete.setText(\"Eliminar\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1)\n .addComponent(cmbPiece, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addComponent(cmbProvider, 0, 114, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtQuantity)))\n .addComponent(lblDate))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(btnSave, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnUpdate, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnClear, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cmbPiece, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cmbProvider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblDate)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSave)\n .addComponent(btnClear))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnUpdate)\n .addComponent(btnDelete))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Bodegas\", jPanel1);\n\n jPanel3.setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel6.setText(\"Desde:\");\n\n dtpFrom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dtpFromActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Hasta:\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel5.setText(\"Datos del reporte\");\n\n dtpTo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n dtpToActionPerformed(evt);\n }\n });\n\n btnReport.setText(\"Imprimir\");\n btnReport.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnReportActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnReport)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dtpFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(43, 43, 43)\n .addComponent(jLabel7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dtpTo, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel5)))\n .addContainerGap(25, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(dtpFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel7)\n .addComponent(dtpTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnReport)\n .addGap(0, 13, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(77, 77, 77)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(86, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(164, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Reportes\", jPanel2);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTabbedPane1)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTabbedPane1)\n );\n\n pack();\n }"
] |
[
"0.55309874",
"0.55143386",
"0.5464463",
"0.5290246",
"0.52563536",
"0.5196423",
"0.51583046",
"0.5079448",
"0.5073422",
"0.5052731",
"0.50307184",
"0.5009341",
"0.49707973",
"0.4969069",
"0.49645206",
"0.4953964",
"0.4945089",
"0.4943274",
"0.49396017",
"0.4938806",
"0.49375147",
"0.49346772",
"0.49329725",
"0.49119207",
"0.49064082",
"0.49036446",
"0.48978293",
"0.48908466",
"0.48897913",
"0.4867451",
"0.48659945",
"0.48658574",
"0.48591033",
"0.48574507",
"0.48510537",
"0.48462406",
"0.48439515",
"0.48378253",
"0.48336995",
"0.4829679",
"0.48157153",
"0.48144478",
"0.48061076",
"0.47953445",
"0.47907984",
"0.47826636",
"0.47791523",
"0.4778951",
"0.4757657",
"0.47565272",
"0.47560146",
"0.47492063",
"0.47346136",
"0.47341454",
"0.47145656",
"0.47125176",
"0.47105137",
"0.47098935",
"0.47035885",
"0.47003794",
"0.46975067",
"0.46936813",
"0.46903935",
"0.4688667",
"0.46871454",
"0.46868688",
"0.46843576",
"0.4678455",
"0.46774888",
"0.46773714",
"0.46680856",
"0.46658868",
"0.46629623",
"0.46608624",
"0.4659043",
"0.46580413",
"0.46536002",
"0.46498114",
"0.46497372",
"0.4647275",
"0.46414733",
"0.46400166",
"0.46376446",
"0.46349877",
"0.46325886",
"0.4632255",
"0.4630617",
"0.46283078",
"0.46242636",
"0.46207836",
"0.46155882",
"0.46063223",
"0.4605319",
"0.46040812",
"0.460088",
"0.459675",
"0.45936438",
"0.4593372",
"0.4583862",
"0.45764828"
] |
0.7431392
|
0
|
/ compiled from: Predicate
|
public interface j<T> {
boolean apply(T t);
boolean equals(Object obj);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface Predicate<I> extends Function<I,Boolean> {}",
"public interface Predicate<E> {\n\t\n\t/** Checks if a binary predicate relation holds. */\n\tboolean evaluate(E input);\n\t\n}",
"public interface ApplePredicate {\n boolean test (Apple apple);\n}",
"Predicate<Method> getPredicate();",
"BPredicate createBPredicate();",
"GeneralPredicate createGeneralPredicate();",
"public RelationPredicate(){}",
"public interface Filter extends Predicate<Element> {\n\n}",
"public interface MyPredicate<T> {\n\n boolean command(T t);\n\n}",
"@FunctionalInterface\n/* */ public interface Predicate<T>\n/* */ {\n/* */ default Predicate<T> and(Predicate<? super T> paramPredicate) {\n/* 68 */ Objects.requireNonNull(paramPredicate);\n/* 69 */ return paramObject -> (test((T)paramObject) && paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> negate() {\n/* 80 */ return paramObject -> !test((T)paramObject);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static <T> Predicate<T> isEqual(Object paramObject) {\n/* 115 */ return (null == paramObject) ? Objects::isNull : (paramObject2 -> paramObject1.equals(paramObject2));\n/* */ }\n/* */ \n/* */ boolean test(T paramT);\n/* */ }",
"IEmfPredicate<R> getPredicateEditable();",
"public ElementList getPredicate() {\r\n return predicate;\r\n }",
"List<E> list(Predicate<E> predicate);",
"private PredicateTransformer(Predicate predicate) {\n super();\n iPredicate = predicate;\n }",
"public interface PredicateBinaryExpr extends BinaryExpr {\r\n /**\r\n * Returns the wildcard operator.\r\n * \r\n * @return the wildcard operator.\r\n */\r\n public PredicateOperator getOperator();\r\n\r\n /**\r\n * Returns the property.\r\n * \r\n * @return the property.\r\n */\r\n public Property getProperty();\r\n\r\n /**\r\n * Returns the string representation of the path qualified property.\r\n * \r\n * @return the string representation of the path qualified property\r\n */\r\n public String getPropertyPath();\r\n\r\n /**\r\n * Returns the query literal\r\n * \r\n * @return the query literal\r\n */\r\n public Literal getLiteral();\r\n}",
"IEmfPredicate<R> getPredicateVisible();",
"public interface IntPredicate {\n boolean test(int t);\n}",
"default Predicate<T> negate() {\n/* 80 */ return paramObject -> !test((T)paramObject);\n/* */ }",
"@SuppressWarnings(\"unchecked\")\n @Test\n public void oneTruePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(true);\n\n assertTrue(allPredicate(predicate).evaluate(getTestValue()), \"single true predicate evaluated to false\");\n }",
"private static Predicate<Person> predicate(CrudFilter filter) {\n return filter.getConstraints().entrySet().stream()\n .map(constraint -> (Predicate<Person>) person -> {\n try {\n Object value = valueOf(constraint.getKey(), person);\n return value != null && value.toString().toLowerCase()\n .contains(constraint.getValue().toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n })\n .reduce(Predicate::and)\n .orElse(e -> true);\n }",
"public PredicateOperator getOperator();",
"public Element getPredicateVariable();",
"public static Predicate<Boolean> identity() {\n return new Predicate<Boolean>() {\n\n @Override\n public boolean test(Boolean b) {\n return b;\n }\n\n };\n }",
"public static void main(String[] args) {\n\t\tPredicate<Integer> fun1= x-> x>5;\r\n\t\tSystem.out.println(fun1.test(5));\r\n\t\t\r\n\t\tPredicate<String> fun2 = x-> x.isEmpty();\r\n\t\tSystem.out.println(fun2.test(\"\"));\r\n\t\t\r\n\t\tList<Integer> numbers = Arrays.asList(1,2,3,4,6,5,7,8,0);\r\n\t\tSystem.out.println(numbers.stream().filter(fun1).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with and\r\n\t\tSystem.out.println(numbers.stream().filter(x-> x>5 && x<8).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with negate\r\n\t\tList<String> names = Arrays.asList(\"Nayeem\", \"John\", \"SDET\");\r\n\t\tPredicate<String> fun3 = x -> x.contains(\"e\");\r\n\t\tSystem.out.println(names.stream().filter(fun3.negate()).collect(Collectors.toList()));\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tPredicate<Integer> p1 = a-> a%2==0;\n\t\tSystem.out.println(p1.test(101));\n\t\tProduct product = new Product(100,\"shoes\",12.00);\n\t\t\n\t\tPredicate<Product> p2 = p->(p.id<50);\n\t\t\n\t\tSystem.out.println(p2.test(product));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public Predicate getPredicate() {\n\t\treturn pred;\n\t}",
"private static UnaryPredicate bepred() {\n return new UnaryPredicate() {\n public boolean execute(Object o) {\n\tif (o instanceof BulkEstimate) {\n\t return ((BulkEstimate)o).isComplete();\n }\n\treturn false;\n }\n };\n }",
"@Test\n public void testPredicateNot() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n\n assertTrue(isEven.apply(10));\n assertFalse(isEven.not().apply(10));\n }",
"Predicate<File> pass();",
"public Predicate(String type, String id, String value) {\r\n\t\t super();\r\n\t\t this.type = type;\r\n\t\t this.id = id;\r\n\t\t this.value = value;\r\n\t\t selfSatisfied = false;\r\n\t}",
"public abstract PredicateExpr getNext();",
"private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}",
"protected PredicatedList(List list, Predicate predicate) {\n/* 79 */ super(list, predicate);\n/* */ }",
"Boolean forAll(Predicate<X> p);",
"public static <A> CompositePredicate<A> predicate(Predicate<? super A> pred) {\n return new CompositePredicate<A>(pred);\n }",
"@FunctionalInterface\npublic interface IntPredicate {\n boolean test(int t);\n}",
"private IPredicateElement createPredicate() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IAxiom.ELEMENT_TYPE, null, null);\n\t}",
"PolynomialNode filter(Predicate test);",
"default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }",
"@SuppressWarnings(\"unchecked\")\n @Test\n public void oneFalsePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(false);\n assertFalse(allPredicate(predicate).evaluate(getTestValue()),\n \"single false predicate evaluated to true\");\n }",
"@Test\n public void testPredicateAnd() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0;\n\n Predicate<Integer> evenOrDivSeven = isEven.and(isDivSeven);\n\n assertTrue(evenOrDivSeven.apply(14));\n assertFalse(evenOrDivSeven.apply(21));\n assertFalse(evenOrDivSeven.apply(8));\n assertFalse(evenOrDivSeven.apply(5));\n }",
"public RelationPredicate(String name){\n\t\tthis.name=name;\n\t}",
"Boolean exists(Predicate<X> p);",
"public Iterator<Clause> iterator(PredicateLiteralDescriptor predicate, boolean isPositive);",
"private LogicPredicate(Type type, Predicate... predicates)\n {\n this.type = type;\n this.predicates = predicates;\n }",
"public interface Predicate<T> {\n boolean test(@NonNull T t) throws Exception;\n}",
"public Object transform(Object input) {\n try {\n return new Boolean(iPredicate.evaluate(input));\n\n } catch (PredicateException ex) {\n throw new TransformerException(\"PredicateTransformer: \" + ex.getMessage(), ex);\n }\n }",
"Try<T> filter(Predicate<? super T> p);",
"@Test\n public void testPredicateOr() {\n Predicate<Integer> isEven = (x) -> (x % 2) == 0;\n Predicate<Integer> isDivSeven = (x) -> (x % 7) == 0;\n\n Predicate<Integer> evenOrDivSeven = isEven.or(isDivSeven);\n\n assertTrue(evenOrDivSeven.apply(14));\n assertTrue(evenOrDivSeven.apply(21));\n assertTrue(evenOrDivSeven.apply(8));\n assertFalse(evenOrDivSeven.apply(5));\n }",
"@Test\n public void testPredicateAlwaysTrue() {\n Predicate<Integer> predicate = Predicate.alwaysTrue();\n\n assertTrue(predicate.apply(10));\n assertTrue(predicate.apply(null));\n assertTrue(predicate.apply(0));\n }",
"IEmfPredicate<R> getPredicateMandatory();",
"static <T> Predicate<T> isEqual(Object paramObject) {\n/* 115 */ return (null == paramObject) ? Objects::isNull : (paramObject2 -> paramObject1.equals(paramObject2));\n/* */ }",
"KTable<K, V> filter(Predicate<K, V> predicate);",
"public Filter condition();",
"public PredicateBuilder openPredicate(String name, String... argTypes) { return predicate(false, name, argTypes); }",
"public static <T> Predicate<Predicate<T>> test(T t) {\n\t\treturn pred -> pred.test(t);\n\t}",
"@Test\n public void test5(){\n List<Employee> list= fileEmployee(employees, new MyPredicate<Employee>() {\n @Override\n public boolean test(Employee employee) {\n return employee.getSalary()<=5000;\n }\n });\n for (Employee e : list){\n System.out.println(e);\n }\n }",
"@Override\n\tprotected void initPredicate() {\n\t\t\n\t\tString pred1 = \"pred list(root) == root::DoubleLinkedList<modCount,header,size> * header::Entry<ele,header,header> & size=0 || \" +\n\t\t\"root::DoubleLinkedList<modCount,header,size> * header::Entry<eleH,first,last> * first::Entry<ele1,header,header> & first=last & size=1 || \" +\n\t\t\"root::DoubleLinkedList<modCount,header,size> * header::Entry<eleH,first,last> * first::Entry<ele1,nextF,prevF> * last::Entry<ele2,nextL,prevL> * lseg(nextF,first,last,prevL,size1) & prevF=header & nextL=header & size=2+size1\";\n\t\t\n\t\tString pred2 = \"pred lseg(next,first,last,prev,size) == next=last & prev=first & size=0 || \" +\n\t\t\t\t\"next::Entry<item,next1,prev1> * lseg(next1,next,last,prev,size1) & prev1=first & size=size1+1\";\n\t\t\n\t\t\n//\t\tString pred0 = \"pred list(root) == root::DoubleLinkedList<modCount,header,size> * dll(header,size)\";\n//\t\tString pred1 = \"pred dll(header,size) == header::Entry<ele,header,header> & size=0 || header::Entry<ele,next,prev> * nndll(next,header,header,prev,size)\";\n//\t\tString pred2 = \"pred nndll(curr,prev,header,prevH,size) == curr::Entry<ele,header,prev> & prevH=curr & size=1 || curr::Entry<ele,next,prev> * nndll(next,curr,header,prevH,size1) & size=size1+1\";\n\t\t\t\t\n\t\tString pred = pred1 + \";\" + pred2;\n\t\tInitializer.initPredicate(pred);\n\t}",
"public boolean satisfies(Predicate p){\r\n\t\tif(selfSatisfied)\r\n\t\t\treturn isSatisfied();\r\n\t\telse return ((type.equals(p.type))&&(id.equals(p.id) || p.id.equals(\"?\"))&&(value.equals(p.value)));\r\n\t}",
"public static <T> Predicate<T> asPredicate(Function<T, Boolean> function) {\n\t\treturn function::apply;\n\t}",
"@Override\n public Possible<T> filter(Predicate<? super T> predicate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n if (self.isPresent()) {\n boolean reallyPresent = true;\n T t = null;\n try {\n t = self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n reallyPresent = false;\n }\n if (reallyPresent) {\n return predicate.test(t);\n }\n }\n return false;\n }\n\n @Override\n public T get() {\n T result = self.get();\n if (predicate.test(result)) {\n return result;\n }\n throw new NoSuchElementException();\n }\n };\n }",
"@Test\n public void testPredicate2() throws Exception {\n final RuleDescr rule = ((RuleDescr) (parse(\"rule\", \"rule X when Foo(eval( $var.equals(\\\"xyz\\\") )) then end\")));\n final PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n final List<?> constraints = pattern.getConstraint().getDescrs();\n TestCase.assertEquals(1, constraints.size());\n final ExprConstraintDescr predicate = ((ExprConstraintDescr) (constraints.get(0)));\n TestCase.assertEquals(\"eval( $var.equals(\\\"xyz\\\") )\", predicate.getExpression());\n }",
"default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }",
"public T casePredicate(Predicate object)\n {\n return null;\n }",
"public interface TimeRule extends Predicate<DateTime>{\n \n}",
"public RelationPredicate (RelationPredicate p){\n\t\tname = p.name;\n\t\tfor(int i=0; i<p.terms.size(); i++){\n\t\t\tTerm t = p.terms.get(i);\n\t\t\taddTerm(t.clone());\n\t\t}\n\t\tsource=p.source;\n\t}",
"@javax.annotation.Generated(date = \"2014-09-08T10:42:29+0200\", value = \"HPPC generated from: ShortPredicate.java\") \npublic interface ShortPredicate\n{\n public boolean apply(short value);\n}",
"@Override\n public Predicate<Transaction> getPredicate() {\n return t -> t.getTags().stream().anyMatch(budgets::containsKey);\n }",
"public Filter(Predicate p, OpIterator child) {\n\t\t// some code goes here\n\t\tpred = p;\n\t\tchildOperator = child;\n\t}",
"public static void main (String args [ ] ) {\r\n\t\r\n\tList<String> colors = Arrays.asList(\"red\", \"green\", \"yellow\");\r\n\t \r\n\tPredicate<String> test = n -> {\r\n\t \r\n\tSystem.out.println(\"Searching…\");\r\n\t \r\n\treturn n.contains(\"red\");\r\n\t \r\n\t};\r\n\t \r\n\tcolors.stream()\r\n\t \r\n\t.filter(c -> c.length() > 3).peek(System.out::println\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t)\r\n\t \r\n\t.allMatch(test);\r\n \r\n}",
"List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);",
"public interface ColorPredicate<E extends Color> {\n\n boolean apply(E input, int iw, int ih);\n\n}",
"@Test\n public void testPredicateAlwaysFalse() {\n Predicate<Integer> predicate = Predicate.alwaysFalse();\n\n assertFalse(predicate.apply(10));\n assertFalse(predicate.apply(null));\n assertFalse(predicate.apply(0));\n }",
"public interface GroupPredicateBuilder {\r\n\r\n Predicate build(CriteriaBuilder criteriaBuilder, List<Predicate> criteriaList);\r\n \r\n}",
"public interface MilestoneFilter extends Predicate<JiraVersion> {\n}",
"public static <T> Function<T, Boolean> asFunction(Predicate<T> predicate) {\n\t\treturn predicate::test;\n\t}",
"default boolean any( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().anyMatch(predicate);\n }",
"public QueryIterable<T> where(\n final Func2<Boolean, T> predicate\n ) {\n return Query.where(iterable, predicate);\n }",
"public void getEditorTagsWithPredicate(Predicate<EclipseEditorTag> predicate, Collection<EclipseEditorTag> result){\r\n \t\ttry {\r\n \t\t\tPosition[] positions = getPositions(EclipseEditorTag.CHAMELEON_CATEGORY); // throws BadPositionCategoryException\r\n \t\t\tfor (Position position : positions) {\r\n \t\t\t\tint count=1;\r\n \t\t\t\tif(position instanceof EclipseEditorTag ){\r\n \t\t\t\t\tEclipseEditorTag editorTag = (EclipseEditorTag) position;\r\n \t\t\t\t\tif(predicate.eval(editorTag)){\r\n //\t\t\t\t\t\tSystem.out.println(count+\" Found cross reference tag at offset: \" +editorTag.getOffset()+\"with length: \"+editorTag.getLength());\r\n \t\t\t\t\t\tresult.add(editorTag);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} catch (BadPositionCategoryException e) {\r\n \t\t\t// There exist no editorTags of the type EditorTag.CHAMELEON_CATEGORY\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (Exception e) {\r\n \t\t\t// the predicate has thrown an exception\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t}",
"public void check(final Predicate<T> property);",
"@Nonnull\r\n\tpublic static <T> Observable<Boolean> any(\r\n\t\t\t@Nonnull final Observable<T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> predicate) {\r\n\t\treturn new Containment.Any<T>(source, predicate);\r\n\t}",
"public static void main(final String[] args) {\n\t\tfinal Predicate<Integer> p1 = i -> i > 10;\n\t\tSystem.out.println(p1.test(10)); // OP: false\n\n\t\t// i>10 && number is even then return true\n\t\tfinal Predicate<Integer> p2 = i -> i % 2 == 0;\n\t\tSystem.out.println(p1.and(p2).test(20)); // OP: true\n\n\t\t// i>10 || number is even then return true\n\t\tSystem.out.println(p1.or(p2).test(21)); // OP: true\n\n\t\t// i>10 && number is odd then return true\n\t\tSystem.out.println(p1.and(p2.negate()).test(21)); // OP: true\n\t}",
"@FunctionalInterface\n/* */ public interface DoublePredicate\n/* */ {\n/* */ default DoublePredicate and(DoublePredicate paramDoublePredicate) {\n/* 69 */ Objects.requireNonNull(paramDoublePredicate);\n/* 70 */ return paramDouble -> (test(paramDouble) && paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate negate() {\n/* 81 */ return paramDouble -> !test(paramDouble);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default DoublePredicate or(DoublePredicate paramDoublePredicate) {\n/* 101 */ Objects.requireNonNull(paramDoublePredicate);\n/* 102 */ return paramDouble -> (test(paramDouble) || paramDoublePredicate.test(paramDouble));\n/* */ }\n/* */ \n/* */ boolean test(double paramDouble);\n/* */ }",
"Stream<T> filter(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate);",
"public PredicateBuilder closedPredicate(String name, String... argTypes) { return predicate(true, name, argTypes); }",
"public interface Filter {\n\n /**\n * Determines whether or not a word may pass through this filter.\n * @param word test word\n * @return TRUE if word may pass, FALSE otherwise\n */\n public boolean pass(String word);\n\n /**\n * Generates a new filter based on the provided\n * definition.\n * @param x definition\n * @return reference to newly-generated filter\n */\n public Filter spawn(String x);\n\n}",
"default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }",
"private boolean allTrue(CompositeTrue predicate) {\n if (kids.isEmpty()) {\n return false;\n }\n\n Iterator<E> i = kids.iterator();\n while (i.hasNext()) {\n E future = i.next();\n if (!predicate.isTrue(future)) {\n return false;\n }\n }\n return true;\n }",
"public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }",
"private interface FilterFunction\n\t{\n\t\tpublic Boolean filter(Review review);\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tArrayList<Employe> ar=new ArrayList<Employe>();\n\t\t\n\t\tar.add(new Employe(\"chakri\",55000));\n\t\tar.add(new Employe(\"chakravarthi\",75000));\n\t\tar.add(new Employe(\"chak\",85000));\n\t\tar.add(new Employe(\"ec\",95000));\n\t\t\n\tPredicate<Employe> p=s->s.salary>55000;\n\tfor(Employe e1:ar)\n\t{\n\t\tif(p.test(e1))\n\t\t{\n\t\t\tSystem.out.println(e1.name + \"->\" + e1.salary);\n\t\t}\n\t}\n\t\t\n\t\t\n\n\t}",
"public static <T> Predicate<T> not(Predicate<T> predicate) { return object -> !predicate.test(object); }",
"public MethodPredicate withPredicate(Predicate<Method> predicate) {\n this.predicate = predicate;\n return this;\n }",
"public abstract boolean contains(LambdaTerm P);",
"@Override\n \tvoid writeNormalPredicate(NormalPredicate predicate, Appendable target) {\n \t\ttry {\n \t\t\tString name = predicate.getName();\n \t\t\tString newp = name;\n \t\t\tif (name.matches(\"^p\\\\d+$\")) {\n \t\t\t\tString d = ldlpCompilerManager.decompile(name);\n \t\t\t\tMatcher matcher = qIriPattern.matcher(d);\n \t\t\t\tif (matcher.find()) {\n \t\t\t\t\tnewp = matcher.group(1);\n \t\t\t\t}\n \t\t\t}\n \t\t\ttarget.append(newp);\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }",
"public abstract DoublePredicate lowerPredicate(double lowerBound);",
"List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);",
"protected abstract T criterion(Result r);",
"public static void main(String[] args) {\n\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"veg\");\n\t\tlist.add(\"veg\");\n\t\tlist.add(\"veg\");\n\t\tlist.add(\"nveg\");\n\t\tlist.add(\"veg\");\n\t\tlist.add(\"nveg\");\n\t\tlist.add(\"veg\");\n\n\t\t// -------------------------------------\n\t\t// way-1\n\t\t// -------------------------------------\n\n//\t\tlist.removeIf(item->item.equals(\"nveg\"));\n//\t\tSystem.out.println(list);\n\n\t\t// -------------------------------------\n\t\t// way-2\n\t\t// -------------------------------------\n\n\t\tlist.removeIf(item -> Method_Reference_Ex.isNonVeg(item));\n\t\tSystem.out.println(list);\n\n\t\t// -------------------------------------\n\t\t// way-3\n\t\t// -------------------------------------\n\t\t\n\t\tPredicate<String> predicate=Method_Reference_Ex::isNonVeg;\n\n\t\tlist.removeIf(Method_Reference_Ex::isNonVeg);\n\t\tSystem.out.println(list);\n\n\t}",
"public void addPredicate(Predicate p) throws StandardException{\n if (p.isMultiProbeQualifier(keyColumns)) // MultiProbeQualifier against keys (BASE)\n addSelectivity(new InListSelectivity(scc,p,QualifierPhase.BASE));\n else if (p.isInQualifier(scanColumns)) // In Qualifier in Base Table (FILTER_PROJECTION) // This is not as expected, needs more research.\n addSelectivity(new InListSelectivity(scc,p, QualifierPhase.FILTER_PROJECTION));\n else if (p.isInQualifier(lookupColumns)) // In Qualifier against looked up columns (FILTER_PROJECTION)\n addSelectivity(new InListSelectivity(scc,p, QualifierPhase.FILTER_PROJECTION));\n else if (p.isStartKey() || p.isStopKey()) // Range Qualifier on Start/Stop Keys (BASE)\n performQualifierSelectivity(p,QualifierPhase.BASE);\n else if (p.isQualifier()) // Qualifier in Base Table (FILTER_BASE)\n performQualifierSelectivity(p, QualifierPhase.FILTER_BASE);\n else if (PredicateList.isQualifier(p,baseTable,false)) // Qualifier on Base Table After Index Lookup (FILTER_PROJECTION)\n performQualifierSelectivity(p, QualifierPhase.FILTER_PROJECTION);\n else // Project Restrict Selectivity Filter\n addSelectivity(new PredicateSelectivity(p,baseTable,QualifierPhase.FILTER_PROJECTION));\n }"
] |
[
"0.71592057",
"0.69665027",
"0.69389373",
"0.6932171",
"0.68726397",
"0.6836381",
"0.6729652",
"0.66469437",
"0.6630748",
"0.66126585",
"0.6528185",
"0.64042276",
"0.6392112",
"0.63255143",
"0.6319697",
"0.62906516",
"0.62895274",
"0.62462735",
"0.62362903",
"0.62292314",
"0.6201239",
"0.6191025",
"0.6184716",
"0.6164378",
"0.6145699",
"0.61445224",
"0.61212116",
"0.60944045",
"0.60927206",
"0.6076333",
"0.60748446",
"0.6067116",
"0.60612184",
"0.6054778",
"0.6017809",
"0.6002677",
"0.59864306",
"0.5985551",
"0.59832275",
"0.5946231",
"0.5939651",
"0.5893674",
"0.58715355",
"0.5869592",
"0.5867701",
"0.5855773",
"0.5851168",
"0.584715",
"0.5830592",
"0.5825745",
"0.5782172",
"0.5758225",
"0.57554114",
"0.57505345",
"0.5740591",
"0.5703633",
"0.5699157",
"0.568271",
"0.5671294",
"0.5668132",
"0.5664482",
"0.56635606",
"0.5618009",
"0.56073755",
"0.5598709",
"0.5581752",
"0.5581425",
"0.5576178",
"0.55703044",
"0.5568672",
"0.55609155",
"0.55584097",
"0.5557251",
"0.554267",
"0.5541824",
"0.5532619",
"0.5523438",
"0.55221546",
"0.5520927",
"0.5518532",
"0.5511281",
"0.5505265",
"0.55016345",
"0.54940706",
"0.5489834",
"0.5481783",
"0.54574347",
"0.5453813",
"0.54378694",
"0.54317445",
"0.5426081",
"0.5425396",
"0.54091835",
"0.5405494",
"0.538972",
"0.53894776",
"0.53774405",
"0.5370873",
"0.53706944",
"0.5368678",
"0.53684694"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onMapViewCenterPointMoved(MapView arg0, MapPoint arg1) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onMapViewDoubleTapped(MapView mapView, MapPoint MapPoint) {
}
|
{
"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 Move and Zoom to
|
@Override
public void onMapViewInitialized(MapView mapView) {
settingZoomMarkMap(mapView);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n protected void paint2d(Graphics2D g) {\n \n }",
"@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void resize() {\n\t\t\r\n\t}",
"public void Exterior() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}",
"@Override\n\tpublic void resize() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void RefreshView() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\n\tprotected void refreshView() {\n\t\t\n\t}",
"@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void refresh() {\n\t\t\n\t}",
"@Override\n\tpublic void refresh() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\n\tpublic void refresh() {\n\n\t}",
"@Override\r\n\tpublic void getROI() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\n public void Zoom(double zoomNo) {\n\t \n }",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public void mo38117a() {\n }",
"@Override\n\tprotected void initView() {\n\t\t\n\t}",
"@Override\n\tprotected void initView() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"ZHDraweeView mo91981h();",
"@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 public void update() {\n \n }",
"public void mo68520e() {\n super.mo68520e();\n C26780aa.m87959a(this.itemView, mo75290r(), this.f77546j);\n C24942al.m81837c(mo75261ab(), this.f89221bo);\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"otherclick\").mo65283e(\"video\").mo65270a(mo75261ab());\n }",
"@Override\n\tprotected void getDataRefresh() {\n\t\t\n\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\t\tpublic void update() {\n\n\t\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}",
"private zza.zza()\n\t\t{\n\t\t}",
"@Override\n\tprotected void controlRender(RenderManager rm, ViewPort vp) {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }",
"@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}",
"private SpreadsheetMetadataPropertyNameViewportCell() {\n super();\n }",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}"
] |
[
"0.63257724",
"0.62833977",
"0.61689025",
"0.6144073",
"0.6128256",
"0.60591686",
"0.6056812",
"0.59923095",
"0.59852034",
"0.5984682",
"0.59229934",
"0.5913401",
"0.5913401",
"0.59096897",
"0.58926773",
"0.5865405",
"0.58572596",
"0.5839059",
"0.5794802",
"0.57863104",
"0.5764379",
"0.5764379",
"0.5755943",
"0.5750017",
"0.5749762",
"0.5728441",
"0.57095236",
"0.57076305",
"0.56857985",
"0.5684499",
"0.56721604",
"0.56699085",
"0.56613463",
"0.56613463",
"0.5649762",
"0.5642158",
"0.56363934",
"0.5614157",
"0.56125015",
"0.560406",
"0.557372",
"0.5571653",
"0.5537553",
"0.5534317",
"0.5530169",
"0.5526326",
"0.5506568",
"0.55051607",
"0.55051607",
"0.55021036",
"0.54973614",
"0.5491769",
"0.5491769",
"0.5474299",
"0.546906",
"0.5456301",
"0.5452088",
"0.54519975",
"0.5445767",
"0.5441072",
"0.5431229",
"0.54305065",
"0.54265875",
"0.54265875",
"0.5420501",
"0.54153055",
"0.54094046",
"0.5407143",
"0.5405325",
"0.5405325",
"0.5405325",
"0.5405325",
"0.5405325",
"0.5405325",
"0.53995806",
"0.5397047",
"0.5389871",
"0.5388843",
"0.5388843",
"0.5388843",
"0.53870666",
"0.53870666",
"0.5379859",
"0.5379577",
"0.53791034",
"0.53724444",
"0.5369168",
"0.5357056",
"0.53542906",
"0.53542906",
"0.534936",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684",
"0.5339684"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onMapViewLongPressed(MapView mapView, MapPoint MapPoint) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onMapViewSingleTapped(MapView mapView, MapPoint MapPoint) {
settingZoomMarkMap(mapView);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onMapViewZoomLevelChanged(MapView arg0, int arg1) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
Displays a menu with a save and delete icon if this is an existing term and only a save button if it is a new term
|
@Override
public boolean onCreateOptionsMenu(Menu menu){
getMenuInflater().inflate(R.menu.menu_save, menu);
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addTerm(View v){\n termListView.setVisibility(View.GONE);\n addButton.setVisibility(View.GONE);\n termEntry.setVisibility(View.VISIBLE);\n\n if (db.isTermsEmpty()){\n termHeader.setText(\"Term 1\");\n } else {\n fillInTerm();\n }\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n menu.add(\"Edit record \");\n menu.add(\"delete\");\n return super.onCreateOptionsMenu(menu);\n }",
"private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n //menu.setHeaderTitle(\"Select The Action\");\n menu.add(0, v.getId(), 0, \"Edit word\");\n menu.add(1, v.getId(), 0, \"Delete word\");\n\n super.onCreateContextMenu(menu, v, menuInfo);\n }",
"private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n scrObras = new javax.swing.JScrollPane();\n btnSave = new javax.swing.JButton();\n btnLoad = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n mnuFile = new javax.swing.JMenu();\n mniSave = new javax.swing.JMenuItem();\n mniLoad = new javax.swing.JMenuItem();\n mniExit = new javax.swing.JMenuItem();\n mnuCrud = new javax.swing.JMenu();\n mniInsert = new javax.swing.JMenuItem();\n mniUpdate = new javax.swing.JMenuItem();\n mniDelete = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n scrObras.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n scrObrasMouseClicked(evt);\n }\n });\n\n btnSave.setText(\"Save\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnLoad.setText(\"Load\");\n btnLoad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLoadActionPerformed(evt);\n }\n });\n\n mnuFile.setText(\"File\");\n\n mniSave.setText(\"Save\");\n mniSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniSaveActionPerformed(evt);\n }\n });\n mnuFile.add(mniSave);\n\n mniLoad.setText(\"Load\");\n mniLoad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniLoadActionPerformed(evt);\n }\n });\n mnuFile.add(mniLoad);\n\n mniExit.setText(\"mniExit\");\n mniExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniExitActionPerformed(evt);\n }\n });\n mnuFile.add(mniExit);\n\n jMenuBar1.add(mnuFile);\n\n mnuCrud.setText(\"CRUD\");\n\n mniInsert.setText(\"Insert new opus\");\n mniInsert.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniInsertActionPerformed(evt);\n }\n });\n mnuCrud.add(mniInsert);\n\n mniUpdate.setText(\"Update opus\");\n mniUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniUpdateActionPerformed(evt);\n }\n });\n mnuCrud.add(mniUpdate);\n\n mniDelete.setText(\"Delete Opus\");\n mniDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniDeleteActionPerformed(evt);\n }\n });\n mnuCrud.add(mniDelete);\n\n jMenuBar1.add(mnuCrud);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(scrObras, javax.swing.GroupLayout.DEFAULT_SIZE, 610, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnLoad)\n .addGap(30, 30, 30))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(118, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSave)\n .addComponent(btnLoad))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(scrObras, javax.swing.GroupLayout.PREFERRED_SIZE, 361, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n pack();\n }",
"private void createContextMenu(){\r\n\t\tmenu = new JMenuBar();\r\n\t\tint ctrl;\r\n\t\tif(MAC)\r\n\t\t\tctrl = ActionEvent.META_MASK;\r\n\t\telse\r\n\t\t\tctrl = ActionEvent.CTRL_MASK;\r\n\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tnewMenu = new JMenuItem(\"New\");\r\n\t\tnewMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrl));\r\n\t\tnewMenu.addActionListener(this);\r\n\t\topenMenu = new JMenuItem(\"Open\");\r\n\t\topenMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrl));\r\n\t\topenMenu.addActionListener(this);\r\n\t\trecentMenu = new JMenu(\"Open Recent\");\r\n\t\tpopulateRecentMenu();\r\n\t\tsaveMenu = new JMenuItem(\"Save\");\r\n\t\tsaveMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ctrl));\r\n\t\tsaveMenu.addActionListener(this);\r\n\t\tsaveAsMenu = new JMenuItem(\"Save As...\");\r\n\t\tsaveAsMenu.addActionListener(this);\r\n\t\tfileMenu.add(newMenu);\r\n\t\tfileMenu.add(openMenu);\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.add(saveMenu);\r\n\t\tfileMenu.add(saveAsMenu);\r\n\r\n\t\tmenu.add(fileMenu);\r\n\r\n\t\tJMenu editMenu = new JMenu(\"Edit\");\r\n\t\tpreferencesMenu = new JMenuItem(\"Preferences\");\r\n\t\tpreferencesMenu.addActionListener(this);\r\n\t\teditMenu.add(preferencesMenu);\r\n\r\n\t\tmenu.add(editMenu);\r\n\r\n\t\tif(!MAC){\r\n\t\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\t\tJMenuItem aboutMenuI = new JMenuItem(\"About\");\r\n\r\n\t\t\taboutMenuI.addActionListener(new ActionListener(){\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tshowAboutMenu();\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t\thelpMenu.add(aboutMenuI);\r\n\t\t\tmenu.add(helpMenu);\r\n\t\t}\r\n\t}",
"private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(Menu.NONE,1,Menu.NONE,\"save\");\n menu.add(Menu.NONE,2,Menu.NONE,\"exit\");\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n String cmd = (String)e.getActionCommand();\n\n String newMenu = menuName.getText();\n String newRecipe = recipeName.getText();\n String newQuantity = quantityName.getText();\n String newStep = stepName.getText();\n\n if (cmd.equals(\"Show Book\"))\n ta.append(mb.toString());\n\n if (cmd.equals(\"Create Menu\")) {\n if (breakfast.isSelected())\n {\n menuList.insertItemAt(newMenu,0);\n menuList.setSelectedIndex(0);\n mb.add(new FoodMenu(newMenu, MenuType.BREAKFAST));\n ta.append(\"\\nMenu: \" + newMenu + \" has been added to the Menu Book\\n\");\n }\n if (lunch.isSelected())\n {\n menuList.insertItemAt(newMenu,0);\n menuList.setSelectedIndex(0);\n mb.add(new FoodMenu(newMenu, MenuType.LUNCH));\n ta.append(\"\\nMenu: \" + newMenu + \" has been added to the Menu Book\\n\");\n }\n if (dinner.isSelected())\n {\n menuList.insertItemAt(newMenu,0);\n menuList.setSelectedIndex(0);\n mb.add(new FoodMenu(newMenu, MenuType.DINNER));\n ta.append(\"\\nMenu: \" + newMenu + \" has been added to the Menu Book\\n\");\n }\n }\n\n if (cmd.equals(\"Show Menu\")) {\n ta.append(FoodMenu.hashMap.get(menuList.getSelectedItem().toString()).toString());\n }\n\n if (cmd.equals(\"Remove Menu\")) {\n ta.append(\"\\nMenu: \" + menuList.getSelectedItem().toString() + \" has been removed from the Menu Book\\n\");\n mb.remove(FoodMenu.hashMap.get(menuList.getSelectedItem().toString()));\n FoodMenu.hashMap.remove(menuList.getSelectedItem().toString());\n menuList.removeItem(menuList.getSelectedItem());\n }\n\n if (cmd.equals(\"Create Recipe\")) {\n recipeList.insertItemAt(newRecipe,0);\n recipeList.setSelectedIndex(0);\n Recipe.hashMap.put(newRecipe, new Recipe(newRecipe));\n ta.append(\"\\nRecipe: \" + recipeList.getSelectedItem().toString() + \" has been added to the Recipe List\\n\");\n }\n\n if (cmd.equals(\"Show Recipe\")) {\n ta.append(Recipe.hashMap.get(recipeList.getSelectedItem().toString()).toString());\n }\n\n if (cmd.equals(\"Add Recipe\")) {\n Recipe RecipeObj = Recipe.hashMap.get(recipeList.getSelectedItem().toString());\n FoodMenu MenuObj = FoodMenu.hashMap.get(menuList.getSelectedItem().toString());\n MenuObj.add(RecipeObj);\n ta.append(\"\\nRecipe: \" + recipeList.getSelectedItem().toString() + \" has been added to the menu \" + menuList.getSelectedItem().toString() + \"\\n\");\n }\n\n if (cmd.equals(\"Remove Recipe\")) {\n ta.append(\"\\nRecipe: \" + recipeList.getSelectedItem().toString() + \" has been removed from menu \" + menuList.getSelectedItem().toString() + \"\\n\");\n FoodMenu slctdMenu = FoodMenu.hashMap.get(menuList.getSelectedItem().toString());\n slctdMenu.remove(Recipe.hashMap.get(recipeList.getSelectedItem().toString()));\n Recipe.hashMap.remove(recipeList.getSelectedItem().toString());\n recipeList.removeItem(recipeList.getSelectedItem().toString());\n }\n\n if (cmd.equals(\"Add Ingredient\")) {\n ta.append(\"\\n\" + newQuantity + \" \" + unitList.getSelectedItem().toString() + \" of \" + itemList.getSelectedItem().toString() + \" has been added to the recipe \" + recipeList.getSelectedItem().toString() + \"\\n\");\n Recipe getRecipe = Recipe.hashMap.get(recipeList.getSelectedItem().toString());\n Item getItem = Item.hashMap.get(itemList.getSelectedItem().toString());\n Unit getUnit = Unit.hashMap.get(unitList.getSelectedItem().toString());\n double qty = Double.parseDouble(newQuantity);\n Ingredient getIngredient = new Ingredient(getItem, qty, getUnit);\n getRecipe.add(getIngredient);\n }\n\n if (cmd.equals(\"Add Step\")) {\n Recipe RecStep = Recipe.hashMap.get(recipeList.getSelectedItem().toString());\n Step addedStep = new Step(newStep);\n RecStep.add(addedStep);\n ta.append(\"\\nStep: '\" + addedStep + \"' has been added to the recipe \" + recipeList.getSelectedItem().toString() + \"\\n\");\n }\n }",
"public JMenuBar createMenuBar ()\n {\n MenuListener menuListener = new MenuListener ();\n\t //-----------------------------Menu options.--------------------------------------------------------------\n JMenu fileMenu = new JMenu (\"File\");\n JMenu editMenu = new JMenu (\"Edit\");\n JMenu viewMenu = new JMenu (\"View\");\n JMenu colorMenu = new JMenu (\"Colors\");\n JMenu filterMenu = new JMenu (\"Filter\");\n JMenu helpMenu = new JMenu (\"Help\");\n\n //----------------------------Submenu options.-------------------------------------------------------------\n JMenuItem newMenuItem = new JMenuItem (\"New\",new ImageIcon(\"../img/new.gif\"));\n newMenuItem.addActionListener (menuListener);\n newMenuItem.setEnabled (true);\n\n JMenuItem openMenuItem = new JMenuItem (\"Open\",new ImageIcon(\"../img/open.gif\"));\n openMenuItem.addActionListener (menuListener);\n openMenuItem.setEnabled (true);\n\n JMenuItem saveMenuItem = new JMenuItem (\"Save\",new ImageIcon(\"../img/save.gif\"));\n saveMenuItem.addActionListener (menuListener);\n saveMenuItem.setEnabled (true);\n \n JMenuItem exitMenuItem = new JMenuItem (\"Exit\",new ImageIcon(\"../img/close.gif\"));\n exitMenuItem.addActionListener (menuListener);\n exitMenuItem.setEnabled (true);\n \n fileMenu.add (newMenuItem);\n fileMenu.add (openMenuItem);\n fileMenu.add (saveMenuItem);\n fileMenu.add (exitMenuItem);\n\n //---------------------------------------------End of File Menu--------------------------------------------\n JMenuItem undoMenuItem = new JMenuItem (\"Undo\",new ImageIcon(\"../img/undo.gif\"));\n undoMenuItem.addActionListener (menuListener);\n undoMenuItem.setEnabled (true);\n\n JMenuItem redoMenuItem = new JMenuItem (\"Redo\",new ImageIcon(\"../img/redo.gif\"));\n redoMenuItem.addActionListener (menuListener);\n redoMenuItem.setEnabled (true);\n\n JMenuItem clearMenuItem = new JMenuItem (\"Clear All\",new ImageIcon(\"../img/clear.gif\"));\n clearMenuItem.addActionListener (menuListener);\n clearMenuItem.setEnabled (true);\n\n editMenu.add (undoMenuItem);\n editMenu.add (redoMenuItem);\n editMenu.add (clearMenuItem);\n\n //----------------------------------------End of Edit Menu-------------------------------------------------\n JMenuItem toolboxMenuItem = new JMenuItem (\"Tool Box\",new ImageIcon(\"../img/tool.gif\"));\n toolboxMenuItem.addActionListener(menuListener);\n toolboxMenuItem.setEnabled (true);\n\n JMenuItem colorboxMenuItem = new JMenuItem (\"Color Box\",new ImageIcon(\"../img/cbox.gif\"));\n colorboxMenuItem.addActionListener(menuListener);\n colorboxMenuItem.setEnabled (true);\n\n JMenuItem cursorMenuItem = new JMenuItem (\"Cursor Position\",new ImageIcon(\"../img/pos.gif\"));\n cursorMenuItem.addActionListener(menuListener);\n cursorMenuItem.setEnabled (true);\n \n viewMenu.add (toolboxMenuItem);\n viewMenu.add (colorboxMenuItem);\n viewMenu.add (cursorMenuItem);\n\n //--------------------------------------End of View Menu-------------------------------------------------- \n JMenuItem editcolorMenuItem = new JMenuItem (\"Edit Colors\",new ImageIcon(\"../img/color.gif\"));\n editcolorMenuItem.addActionListener(menuListener);\n editcolorMenuItem.setEnabled (true);\n \n colorMenu.add (editcolorMenuItem);\n\n //------------------------------------End of Color Menu--------------------------------------------------- \n JMenuItem brightnessMenuItem = new JMenuItem (\"Brightness\",new ImageIcon(\"../img/bright.gif\"));\n brightnessMenuItem.addActionListener(menuListener);\n brightnessMenuItem.setEnabled (true);\n \n JMenuItem blurMenuItem = new JMenuItem (\"Blur\",new ImageIcon(\"../img/blur.gif\"));\n blurMenuItem.addActionListener(menuListener);\n blurMenuItem.setEnabled (true);\n \n filterMenu.add (brightnessMenuItem);\n filterMenu.add (blurMenuItem);\n\n //--------------------------------------End of Filter Menu------------------------------------------------ \n JMenuItem helpMenuItem = new JMenuItem (\"Help Topics\",new ImageIcon(\"../img/help.gif\"));\n helpMenuItem.addActionListener(menuListener);\n helpMenuItem.setEnabled (true); \n JMenuItem aboutMenuItem = new JMenuItem (\"About Multi Brush\",new ImageIcon(\"../img/license.gif\"));\n aboutMenuItem.addActionListener(menuListener);\n aboutMenuItem.setEnabled (true);\n \n helpMenu.add (helpMenuItem);\n helpMenu.add (aboutMenuItem);\n\n //-----------------------------------------End of Help Menu----------------------------------------------- \t \n JMenuBar menubar = new JMenuBar ();\n menubar.add (fileMenu);\n menubar.add (editMenu);\n menubar.add (viewMenu);\n menubar.add (colorMenu);\n //menubar.add (filterMenu);\n menubar.add (helpMenu);\n\n return menubar;\n }",
"protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }",
"MenuItem getMenuItemDelete();",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tswitch(id){\n\t\tcase R.id.action_settings:\n\t\t\treturn true;\n\t\t\t\n\t\tcase R.id.delete_all:\n\t\t\t//TODO delete all the tags!\n\t\t\treturn true;\n\t\t\t\n\t\tcase R.id.action_add:\n\t\t\tLog.i(TAG, \"add-button pressend\");\n\t\t\tnewEntry();\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu_save:\n String text = mText.getText().toString();\n String titleText = title.getText().toString();\n updateRecipe(text, titleText);\n \n break;\n case R.id.menu_delete:\n deleteRecipe();\n break;\n case R.id.menu_revert:\n cancelRecipe();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"protected void addEditMenuItems (JMenu edit)\n {\n }",
"private void makeStockMenu() {\r\n\t\tJMenu stockMnu = new JMenu(\"Inventario\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Inventario\")) {\r\n\t\t\tisAccesible = true;\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarInventario\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Articulo\");\r\n\t\t\t\taddItem.setMnemonic('a');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo articulo\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddStockItem(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tstockMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"world.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'v', \"Ver el inventario\",\r\n\t\t\t\t\tKeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), Stock.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t\tstockMnu.addSeparator();\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Kardex\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ver Kardex\", \r\n\t\t\t\t\timageLoader.getImage(\"kardexSingle.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'k', \"Ver el kardex\", null,\r\n\t\t\t\t\tKardex.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tstockMnu.setMnemonic('i');\r\n\t\t\tadd(stockMnu);\r\n\t\t}\r\n\t}",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor, menu);\n MenuItem deleteItem = menu.findItem(R.id.delete);\n deleteItem.setVisible(false);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n menu.add(0, MENU_ITEM_ADD_TERM, 100, getString(R.string.Add));\n menu.findItem(MENU_ITEM_ADD_TERM).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);\n return super.onCreateOptionsMenu(menu);\n }",
"private void showSaveAndAdd() {\n\t\tButton saveButton = (Button) findViewById(R.id.b_recipeSave);\n\t\tButton addButton = (Button) findViewById(R.id.bNewIngredient);\n\t\tsaveButton.setVisibility(1);\n\t\taddButton.setVisibility(1);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(\"Save Note\")\n\t\t\t\t.setOnMenuItemClickListener(this.SaveButtonClickListener)\n\t\t\t\t.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@NotifyChange({\"matkulKur\", \"addNew\", \"resetInputIcon\"}) \n @Command(\"batal\")\n public void batal(){\n if (isAddNew()==true) setMatkulKur(getTempMatkulKur()); //\n setResetInputIcon(false);\n setAddNew(false); //apapun itu buat supaya tambah baru selalu kondisi false\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int menuItem = item.getItemId();\n switch (menuItem) {\n case R.id.action_save_symptom:\n saveRecord();\n finish(); // exit activity\n return true;\n case R.id.action_delete_symptom:\n // Alert Dialog for deleting one record;\n showDeleteConfirmationDialogFragment();\n // deleteRecord();\n return true;\n // this is the <- button on the toolbar\n case android.R.id.home:\n // record has not changed\n if (!mEditSymptomChanged) {\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n return true;\n }\n\n // show user they have unsaved changes\n mHomeChecked = true;\n showUnsavedChangesDialogFragment();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_delete) {\n// DatabaseHelper helper = DatabaseHelper.getInstance(this);\n switch (type) {\n case AUTHOR:\n DatabaseAuthor authorDb = new DatabaseAuthor(this);\n authorDb.deleteAuthor(author);\n break;\n case SERIES:\n DatabaseSeries seriesDb = new DatabaseSeries(this);\n seriesDb.deleteSeries(series);\n break;\n case STATUS:\n DatabaseStatus statusDb = new DatabaseStatus(this);\n statusDb.deleteStatus(status);\n break;\n case EDITOR:\n DatabasePublisher publisherDb = new DatabasePublisher(this);\n publisherDb.deletePublisher(publisher);\n break;\n }\n finish();\n return true;\n } else if (id == R.id.action_edit) {\n Log.i(TAG, \"Indo para StandardForm\");\n Intent intent = new Intent(this, StandardFormActivity.class);\n intent.putExtra(\"logged_user\", user);\n intent.putExtra(\"Type\", type);\n switch (type) {\n case AUTHOR:\n intent.putExtra(\"Author\", author);\n break;\n case SERIES:\n intent.putExtra(\"Series\", series);\n break;\n case STATUS:\n intent.putExtra(\"Status\", status);\n break;\n case EDITOR:\n intent.putExtra(\"Publisher\", publisher);\n break;\n }\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t\t\t\t\tpublic void onCreateContextMenu(ContextMenu menu, View v,\n\t\t\t\t\t\t\tContextMenuInfo menuInfo) {\n\t\t\t\t\t\tmenu.add(0, 0, 0, \"更新\");\n\t\t\t\t\t\tmenu.add(0, 1, 0, \"删除\");\n\t\t\t\t\t}",
"private void buildMenu() {\r\n\t\tJMenuBar mainmenu = new JMenuBar();\r\n\t\tsetJMenuBar(mainmenu);\r\n\r\n\t\tui.fileMenu = new JMenu(\"File\");\r\n\t\tui.editMenu = new JMenu(\"Edit\");\r\n\t\tui.viewMenu = new JMenu(\"View\");\r\n\t\tui.helpMenu = new JMenu(\"Help\");\r\n\t\t\r\n\t\tui.fileNew = new JMenuItem(\"New...\");\r\n\t\tui.fileOpen = new JMenuItem(\"Open...\");\r\n\t\tui.fileImport = new JMenuItem(\"Import...\");\r\n\t\tui.fileSave = new JMenuItem(\"Save\");\r\n\t\tui.fileSaveAs = new JMenuItem(\"Save as...\");\r\n\t\tui.fileExit = new JMenuItem(\"Exit\");\r\n\r\n\t\tui.fileOpen.setAccelerator(KeyStroke.getKeyStroke('O', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.fileSave.setAccelerator(KeyStroke.getKeyStroke('S', InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.fileImport.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doImport(); } });\r\n\t\tui.fileExit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dispose(); doExit(); } });\r\n\t\t\r\n\t\tui.fileOpen.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoLoad();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSave.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSave();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSaveAs.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSaveAs();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editUndo = new JMenuItem(\"Undo\");\r\n\t\tui.editUndo.setEnabled(undoManager.canUndo()); \r\n\t\t\r\n\t\tui.editRedo = new JMenuItem(\"Redo\");\r\n\t\tui.editRedo.setEnabled(undoManager.canRedo()); \r\n\t\t\r\n\t\t\r\n\t\tui.editCut = new JMenuItem(\"Cut\");\r\n\t\tui.editCopy = new JMenuItem(\"Copy\");\r\n\t\tui.editPaste = new JMenuItem(\"Paste\");\r\n\t\t\r\n\t\tui.editCut.addActionListener(new Act() { @Override public void act() { doCut(true, true); } });\r\n\t\tui.editCopy.addActionListener(new Act() { @Override public void act() { doCopy(true, true); } });\r\n\t\tui.editPaste.addActionListener(new Act() { @Override public void act() { doPaste(true, true); } });\r\n\t\t\r\n\t\tui.editPlaceMode = new JCheckBoxMenuItem(\"Placement mode\");\r\n\t\t\r\n\t\tui.editDeleteBuilding = new JMenuItem(\"Delete building\");\r\n\t\tui.editDeleteSurface = new JMenuItem(\"Delete surface\");\r\n\t\tui.editDeleteBoth = new JMenuItem(\"Delete both\");\r\n\t\t\r\n\t\tui.editClearBuildings = new JMenuItem(\"Clear buildings\");\r\n\t\tui.editClearSurface = new JMenuItem(\"Clear surface\");\r\n\r\n\t\tui.editUndo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doUndo(); } });\r\n\t\tui.editRedo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doRedo(); } });\r\n\t\tui.editClearBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearBuildings(true); } });\r\n\t\tui.editClearSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearSurfaces(true); } });\r\n\t\t\r\n\r\n\t\tui.editUndo.setAccelerator(KeyStroke.getKeyStroke('Z', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editRedo.setAccelerator(KeyStroke.getKeyStroke('Y', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCut.setAccelerator(KeyStroke.getKeyStroke('X', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCopy.setAccelerator(KeyStroke.getKeyStroke('C', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPaste.setAccelerator(KeyStroke.getKeyStroke('V', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPlaceMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0));\r\n\t\t\r\n\t\tui.editDeleteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));\r\n\t\tui.editDeleteSurface.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editDeleteBoth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editDeleteBuilding.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBuilding(); } });\r\n\t\tui.editDeleteSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteSurface(); } });\r\n\t\tui.editDeleteBoth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBoth(); } });\r\n\t\tui.editPlaceMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doPlaceMode(ui.editPlaceMode.isSelected()); } });\r\n\t\t\r\n\t\tui.editPlaceRoads = new JMenu(\"Place roads\");\r\n\t\t\r\n\t\tui.editResize = new JMenuItem(\"Resize map\");\r\n\t\tui.editCleanup = new JMenuItem(\"Remove outbound objects\");\r\n\t\t\r\n\t\tui.editResize.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoResize();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.editCleanup.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoCleanup();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editCutBuilding = new JMenuItem(\"Cut: building\");\r\n\t\tui.editCutSurface = new JMenuItem(\"Cut: surface\");\r\n\t\tui.editPasteBuilding = new JMenuItem(\"Paste: building\");\r\n\t\tui.editPasteSurface = new JMenuItem(\"Paste: surface\");\r\n\t\tui.editCopyBuilding = new JMenuItem(\"Copy: building\");\r\n\t\tui.editCopySurface = new JMenuItem(\"Copy: surface\");\r\n\t\t\r\n\t\tui.editCutBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editCopyBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editPasteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editCutBuilding.addActionListener(new Act() { @Override public void act() { doCut(false, true); } });\r\n\t\tui.editCutSurface.addActionListener(new Act() { @Override public void act() { doCut(true, false); } });\r\n\t\tui.editCopyBuilding.addActionListener(new Act() { @Override public void act() { doCopy(false, true); } });\r\n\t\tui.editCopySurface.addActionListener(new Act() { @Override public void act() { doCopy(true, false); } });\r\n\t\tui.editPasteBuilding.addActionListener(new Act() { @Override public void act() { doPaste(false, true); } });\r\n\t\tui.editPasteSurface.addActionListener(new Act() { @Override public void act() { doPaste(true, false); } });\r\n\t\t\r\n\t\tui.viewZoomIn = new JMenuItem(\"Zoom in\");\r\n\t\tui.viewZoomOut = new JMenuItem(\"Zoom out\");\r\n\t\tui.viewZoomNormal = new JMenuItem(\"Zoom normal\");\r\n\t\tui.viewBrighter = new JMenuItem(\"Daylight (1.0)\");\r\n\t\tui.viewDarker = new JMenuItem(\"Night (0.5)\");\r\n\t\tui.viewMoreLight = new JMenuItem(\"More light (+0.05)\");\r\n\t\tui.viewLessLight = new JMenuItem(\"Less light (-0.05)\");\r\n\t\t\r\n\t\tui.viewShowBuildings = new JCheckBoxMenuItem(\"Show/hide buildings\", renderer.showBuildings);\r\n\t\tui.viewShowBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewSymbolicBuildings = new JCheckBoxMenuItem(\"Minimap rendering mode\", renderer.minimapMode);\r\n\t\tui.viewSymbolicBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewTextBackgrounds = new JCheckBoxMenuItem(\"Show/hide text background boxes\", renderer.textBackgrounds);\r\n\t\tui.viewTextBackgrounds.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewTextBackgrounds.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleTextBackgrounds(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomIn(); } });\r\n\t\tui.viewZoomOut.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomOut(); } });\r\n\t\tui.viewZoomNormal.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomNormal(); } });\r\n\t\tui.viewShowBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleBuildings(); } });\r\n\t\tui.viewSymbolicBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleMinimap(); } });\r\n\t\t\r\n\t\tui.viewBrighter.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doBright(); } });\r\n\t\tui.viewDarker.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDark(); } });\r\n\t\tui.viewMoreLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doMoreLight(); } });\r\n\t\tui.viewLessLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doLessLight(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD9, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomOut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD3, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomNormal.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD0, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewMoreLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD8, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewLessLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD2, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewBrighter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD7, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewDarker.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD1, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewStandardFonts = new JCheckBoxMenuItem(\"Use standard fonts\", TextRenderer.USE_STANDARD_FONTS);\r\n\t\t\r\n\t\tui.viewStandardFonts.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoStandardFonts();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.viewPlacementHints = new JCheckBoxMenuItem(\"View placement hints\", renderer.placementHints);\r\n\t\tui.viewPlacementHints.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoViewPlacementHints();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.helpOnline = new JMenuItem(\"Online wiki...\");\r\n\t\tui.helpOnline.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.helpAbout = new JMenuItem(\"About...\");\r\n\t\tui.helpAbout.setEnabled(false); // TODO implement\r\n\t\t\r\n\t\tui.languageMenu = new JMenu(\"Language\");\r\n\t\t\r\n\t\tui.languageEn = new JRadioButtonMenuItem(\"English\", true);\r\n\t\tui.languageEn.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"en\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.languageHu = new JRadioButtonMenuItem(\"Hungarian\", false);\r\n\t\tui.languageHu.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"hu\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tButtonGroup bg = new ButtonGroup();\r\n\t\tbg.add(ui.languageEn);\r\n\t\tbg.add(ui.languageHu);\r\n\t\t\r\n\t\tui.fileRecent = new JMenu(\"Recent\");\r\n\t\tui.clearRecent = new JMenuItem(\"Clear recent\");\r\n\t\tui.clearRecent.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoClearRecent();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddAll(ui.fileRecent, ui.clearRecent);\r\n\t\t\r\n\t\taddAll(mainmenu, ui.fileMenu, ui.editMenu, ui.viewMenu, ui.languageMenu, ui.helpMenu);\r\n\t\taddAll(ui.fileMenu, ui.fileNew, null, ui.fileOpen, ui.fileRecent, ui.fileImport, null, ui.fileSave, ui.fileSaveAs, null, ui.fileExit);\r\n\t\taddAll(ui.editMenu, ui.editUndo, ui.editRedo, null, \r\n\t\t\t\tui.editCut, ui.editCopy, ui.editPaste, null, \r\n\t\t\t\tui.editCutBuilding, ui.editCopyBuilding, ui.editPasteBuilding, null, \r\n\t\t\t\tui.editCutSurface, ui.editCopySurface, ui.editPasteSurface, null, \r\n\t\t\t\tui.editPlaceMode, null, ui.editDeleteBuilding, ui.editDeleteSurface, ui.editDeleteBoth, null, \r\n\t\t\t\tui.editClearBuildings, ui.editClearSurface, null, ui.editPlaceRoads, null, ui.editResize, ui.editCleanup);\r\n\t\taddAll(ui.viewMenu, ui.viewZoomIn, ui.viewZoomOut, ui.viewZoomNormal, null, \r\n\t\t\t\tui.viewBrighter, ui.viewDarker, ui.viewMoreLight, ui.viewLessLight, null, \r\n\t\t\t\tui.viewShowBuildings, ui.viewSymbolicBuildings, ui.viewTextBackgrounds, ui.viewStandardFonts, ui.viewPlacementHints);\r\n\t\taddAll(ui.helpMenu, ui.helpOnline, null, ui.helpAbout);\r\n\t\t\r\n\t\taddAll(ui.languageMenu, ui.languageEn, ui.languageHu);\r\n\t\t\r\n\t\tui.fileNew.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoNew();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.toolbar = new JToolBar(\"Tools\");\r\n\t\tContainer c = getContentPane();\r\n\t\tc.add(ui.toolbar, BorderLayout.PAGE_START);\r\n\r\n\t\tui.toolbarCut = createFor(\"res/Cut24.gif\", \"Cut\", ui.editCut, false);\r\n\t\tui.toolbarCopy = createFor(\"res/Copy24.gif\", \"Copy\", ui.editCopy, false);\r\n\t\tui.toolbarPaste = createFor(\"res/Paste24.gif\", \"Paste\", ui.editPaste, false);\r\n\t\tui.toolbarRemove = createFor(\"res/Remove24.gif\", \"Remove\", ui.editDeleteBuilding, false);\r\n\t\tui.toolbarUndo = createFor(\"res/Undo24.gif\", \"Undo\", ui.editUndo, false);\r\n\t\tui.toolbarRedo = createFor(\"res/Redo24.gif\", \"Redo\", ui.editRedo, false);\r\n\t\tui.toolbarPlacementMode = createFor(\"res/Down24.gif\", \"Placement mode\", ui.editPlaceMode, true);\r\n\r\n\t\tui.toolbarUndo.setEnabled(false);\r\n\t\tui.toolbarRedo.setEnabled(false);\r\n\t\t\r\n\t\tui.toolbarNew = createFor(\"res/New24.gif\", \"New\", ui.fileNew, false);\r\n\t\tui.toolbarOpen = createFor(\"res/Open24.gif\", \"Open\", ui.fileOpen, false);\r\n\t\tui.toolbarSave = createFor(\"res/Save24.gif\", \"Save\", ui.fileSave, false);\r\n\t\tui.toolbarImport = createFor(\"res/Import24.gif\", \"Import\", ui.fileImport, false);\r\n\t\tui.toolbarSaveAs = createFor(\"res/SaveAs24.gif\", \"Save as\", ui.fileSaveAs, false);\r\n\t\tui.toolbarZoomNormal = createFor(\"res/Zoom24.gif\", \"Zoom normal\", ui.viewZoomNormal, false);\r\n\t\tui.toolbarZoomIn = createFor(\"res/ZoomIn24.gif\", \"Zoom in\", ui.viewZoomIn, false);\r\n\t\tui.toolbarZoomOut = createFor(\"res/ZoomOut24.gif\", \"Zoom out\", ui.viewZoomOut, false);\r\n\t\tui.toolbarBrighter = createFor(\"res/TipOfTheDay24.gif\", \"Daylight\", ui.viewBrighter, false);\r\n\t\tui.toolbarDarker = createFor(\"res/TipOfTheDayDark24.gif\", \"Night\", ui.viewDarker, false);\r\n\t\tui.toolbarHelp = createFor(\"res/Help24.gif\", \"Help\", ui.helpOnline, false);\r\n\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarNew);\r\n\t\tui.toolbar.add(ui.toolbarOpen);\r\n\t\tui.toolbar.add(ui.toolbarSave);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarImport);\r\n\t\tui.toolbar.add(ui.toolbarSaveAs);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarCut);\r\n\t\tui.toolbar.add(ui.toolbarCopy);\r\n\t\tui.toolbar.add(ui.toolbarPaste);\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarRemove);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarUndo);\r\n\t\tui.toolbar.add(ui.toolbarRedo);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarPlacementMode);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarZoomNormal);\r\n\t\tui.toolbar.add(ui.toolbarZoomIn);\r\n\t\tui.toolbar.add(ui.toolbarZoomOut);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarBrighter);\r\n\t\tui.toolbar.add(ui.toolbarDarker);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarHelp);\r\n\t\t\r\n\t}",
"public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }",
"private void drawMenu(final Terminal term)\n {\n\n /*\n * Clear the area for the menu.\n */\n for (int row = firstRow; row < lastRow; row++)\n {\n term.moveCursor(firstColumn, row);\n for (int col = firstColumn; col < lastColumn; col++)\n {\n term.putCharacter(SPACE);\n }\n }\n\n /*\n * Draw all the options\n */\n final int minWidth = minWidth();\n for (int i = 0; i < options.size(); i++)\n {\n LanternaUtil.termPrint(term, options.get(i).getText(), minWidth, i + firstRow);\n }\n term.flush();\n }",
"Menu getMenuEdit();",
"private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}",
"private MenuManager createEditMenu() {\n\t\tMenuManager menu = new MenuManager(\"&Edition\", Messages.getString(\"IU.Strings.40\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tmenu.add(new GroupMarker(Messages.getString(\"IU.Strings.41\"))); //$NON-NLS-1$\n\n\t\tmenu.add(getAction(ActionFactory.UNDO.getId()));\n\t\tmenu.add(getAction(ActionFactory.REDO.getId()));;\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.CUT.getId()));\n\t\tmenu.add(getAction(ActionFactory.COPY.getId()));\n\t\tmenu.add(getAction(ActionFactory.PASTE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.DELETE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SELECT_ALL.getId()));\n\t\tmenu.add(getAction(ActionFactory.FIND.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PREFERENCES.getId()));\n\t\treturn menu;\n\t}",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n\n switch (item.getItemId()){\n\n case R.id.save:\n\n if (assetDB.assetCount() == 0)\n {\n Toast.makeText(this, \"Fill all the fields\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent back = new Intent(this, AddAssetsLiabilities.class);\n String save = \"Assets\";\n back.putExtra(\"saved\", save);\n startActivity(back);\n }\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.receipt_detail, menu);\n\n\t\tIconsBarView iconsBar = (IconsBarView)this.findViewById(R.id.iconsBarView1);\n\t\tResources res = this.getResources();\n\t\ticonsBar.clearIconMenus();\n\n\t\tboolean anychecked = false;\n\t\tfor(int i=0; i<this.receipt.size(); i++){\n\t\t\tanychecked = anychecked || cbs.get(i).isChecked();\n\t\t}\n\t\ticonsBar.addIconMenus(5, \"戻る\", BitmapFactory.decodeResource(res, R.drawable.back_key), true);\n\t\tif(this.receipt == Data.getInstance().getCurrentReceipt()){\n\t\t\tboolean checkable = true;\n\t\t\tMenuItem item1 = menu.findItem(R.id.check);\n\t\t\titem1.setVisible(true);\n\t\t\tif(this.receipt.size() == 0){\n\t\t\t\tcheckable = false;\n\t\t\t\titem1.setEnabled(false);\n\t\t\t}\n\t\t\ticonsBar.addIconMenus(0, \"精算\", BitmapFactory.decodeResource(res, R.drawable.cacher), checkable);\n\t\t\ticonsBar.addIconMenus(1, \"カテゴリ変更\", BitmapFactory.decodeResource(res, R.drawable.change_category), anychecked);\n\t\t\ticonsBar.addIconMenus(2, \"削除\", BitmapFactory.decodeResource(res, R.drawable.trash), anychecked);\n\t\t}else{\n\t\t\ticonsBar.addIconMenus(1, \"カテゴリ変更\", BitmapFactory.decodeResource(res, R.drawable.change_category), anychecked);\n\t\t\ticonsBar.addIconMenus(3, \"レシート撮影\", BitmapFactory.decodeResource(res, R.drawable.camera), true);\n\t\t\ticonsBar.addIconMenus(4, \"レシート画像\", BitmapFactory.decodeResource(res, R.drawable.show), this.receipt.getImage() != null);\n\t\t}\n\t\tif(!anychecked){\n\t\t\tMenuItem item1 = menu.findItem(R.id.deleteRows);\n\t\t\tMenuItem item2 = menu.findItem(R.id.changeCategory);\n\t\t\titem1.setEnabled(false);\n\t\t\titem2.setEnabled(false);\n\t\t}\n\t\tif(this.receipt.getImage() == null){\n\t MenuItem item1 = menu.findItem(R.id.showReceiptImage);\n\t item1.setVisible(false);\n\t\t}\n\t\ticonsBar.invalidate();\n\t\t\n\t\treturn true;\n\t}",
"private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor, menu);\n //Hiding Delete Menu option for Add Item\n if (mCurrentItemInfoUri == null) {\n MenuItem deleteMenuItem = menu.findItem(R.id.action_delete);\n deleteMenuItem.setVisible(false);\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (R.id.menu_edit == id) {\n item.setVisible(false);\n gMenu.findItem(R.id.menu_save).setVisible(true);\n gMenu.findItem(R.id.menu_cancel).setVisible(true);\n switchEditStatus(true);\n }\n else if (R.id.menu_save == id) {\n try {\n mPageItemValues[0] = mEtxName.getText().toString();\n mPageItemValues[1] = String.valueOf(mSpnCategory.getSelectedItemPosition());\n mPageItemValues[2] = mEtxBrief.getText().toString();\n mPageItemValues[3] = mEtxDetails.getText().toString();\n mPageItemValues[4] = mEtxRemarks.getText().toString();\n mPageItemValues[5] = getIntent().getStringExtra(\"id\");\n mDbHelper.updateItemDetails(mPageItemValues);\n\n Hint.alert(this, R.string.save_successfully, R.string.asking_after_save_operation,\n mExitActivity, null);\n } catch(SQLException e) {\n Hint.alert(this, getString(R.string.alert_failed_to_update),\n getString(R.string.alert_checking_input) + e.getMessage());\n }\n }\n else if (R.id.menu_cancel == id) {\n item.setVisible(false);\n gMenu.findItem(R.id.menu_save).setVisible(false);\n gMenu.findItem(R.id.menu_edit).setVisible(true);\n switchEditStatus(false);\n }\n else\n ;\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n getMenuInflater().inflate(R.menu.save_changes, menu);\n btn_save = menu.findItem(R.id.action_save);\n\n return true;\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search_gen_menu, menu);\r\n\t\tFile savedSelectedCourses = new File(getFilesDir(),\r\n\t\t\t\t\"savedSelectedCourses.txt\");\r\n\t\tMenuItem item = menu.findItem(R.id.UserTableSearch);\r\n\t\tif (savedSelectedCourses.length() > 0) {\r\n\t\t\titem.setTitle(\"Your timetable\");\r\n\t\t} else {\r\n\t\t\titem.setTitle(\"Create Timetable\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void addNomesJMenu() {\n List<SaveModel> saveList = SaveDAO.retreveSaveName();\n for (SaveModel s : saveList) {\n savesRecetes.add(new JMenuItem(s.getSaveName()));\n }\n\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case R.id.action_save:\r\n save();\r\n //check if the data was saved before closing the editor\r\n if (dataSaved) {\r\n finish();\r\n }\r\n return true;\r\n case R.id.action_delete:\r\n showDeleteConfirmationDialog();\r\n return true;\r\n case R.id.home:\r\n //navigate back to main page\r\n if (!RecipeHasChanged) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n } else {\r\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n NavUtils.navigateUpFromSameTask(RecipeEditor.this);\r\n }\r\n };\r\n showUnsavedChnageDialog(discardButtonClickListener);\r\n return true;\r\n }\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"private void makeUtilitiesMenu() {\r\n\t\tJMenu utilitiesMnu = new JMenu(\"Utilidades\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Reportes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Reportes\",\r\n\t\t\t\t\timageLoader.getImage(\"reports.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'r',\r\n\t\t\t\t\t\"Ver los reportes del sistema\", null,\r\n\t\t\t\t\tReports.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"ConsultarPrecios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Consultar Precios\",\r\n\t\t\t\t\timageLoader.getImage(\"money.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'p',\r\n\t\t\t\t\t\"Consultar los precios de los productos\", null,\r\n\t\t\t\t\tPriceRead.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Calculadora\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Calculadora Impuesto\",\r\n\t\t\t\t\timageLoader.getImage(\"pc.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Calculadora de impuesto\", null, Calculator.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tutilitiesMnu.addSeparator();\r\n\t\tif (StoreCore.getAccess(\"Categorias\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Categorias Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"group.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'i',\r\n\t\t\t\t\t\"Manejar las categorias del inventario\", null, Groups.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Impuestos\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Impuestos\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Manejar el listado de impuestos\", null, Tax.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Ciudades\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ciudades\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'u',\r\n\t\t\t\t\t\"Manejar el listado de ciudades\", null, City.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tutilitiesMnu.setMnemonic('u');\r\n\t\t\tadd(utilitiesMnu);\r\n\t\t}\r\n\t}",
"protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}",
"public Menu_deleted_panel() {\n initComponents();\n MenuList();\n show_product();\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_add:\n return true;\n case R.id.action_clear:\n mViewMaster.toolbarClear();\n return true;\n case R.id.action_save:\n mViewMaster.saveDialog();\n return true;\n case android.R.id.home:\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public Menu createFileMenu();",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tmenu.add(group1Id, Edit, Edit, \"Edit\");\n\t\t\tmenu.add(group1Id, Delete, Delete, \"Delete\");\n\t\t\tmenu.add(group1Id, Finish, Finish, \"Finish\");\n\t\t\treturn super.onCreateOptionsMenu(menu); \n\t\t}",
"protected void contextMenuAboutToShow(IMenuManager menuManager) {\n IDocument doc = textViewer.getDocument();\n if (doc == null) {\n return;\n }\n\n menuManager\n .add(globalActions.get(ActionFactory.COPY.getId()));\n menuManager.add(globalActions.get(ActionFactory.SELECT_ALL\n .getId()));\n\n menuManager.add(new Separator(\"FIND\")); //$NON-NLS-1$\n menuManager\n .add(globalActions.get(ActionFactory.FIND.getId()));\n\n menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));\n }",
"private JMenuBar createMenuBar()\r\n {\r\n UIManager.put(\"Menu.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.LIGHT_GRAY);\r\n JMenuBar menuBar = new JMenuBar();\r\n JMenu menu = new JMenu(\"Fil\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menu.getBackground());\r\n menuItemSave = new JMenuItem(\"Lagre\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menuItemSave.getBackground());\r\n menuItemSave.setForeground(Color.LIGHT_GRAY);\r\n menuItemSave.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemSave.setAccelerator(KeyStroke.getKeyStroke('S', Event.CTRL_MASK));\r\n menuItemSave.addActionListener(listener);\r\n menu.add(menuItemSave);\r\n menuItemPrint = new JMenuItem(\"Skriv ut\");\r\n menuItemPrint.setForeground(Color.LIGHT_GRAY);\r\n menuItemPrint.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemPrint.setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));\r\n menuItemPrint.addActionListener(listener);\r\n menu.add(menuItemPrint);\r\n menu.addSeparator();\r\n menuItemLogout = new JMenuItem(\"Logg av\");\r\n menuItemLogout.setForeground(Color.LIGHT_GRAY);\r\n menuItemLogout.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemLogout.addActionListener(listener);\r\n menuItemLogout.setAccelerator(KeyStroke.getKeyStroke('L', Event.CTRL_MASK));\r\n menu.add(menuItemLogout);\r\n UIManager.put(\"MenuItem.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.BLACK);\r\n menuItemClose = new JMenuItem(\"Avslutt\");\r\n menuItemClose.setAccelerator(KeyStroke.getKeyStroke('A', Event.CTRL_MASK));\r\n menuItemClose.addActionListener(listener);\r\n menuBar.add(menu);\r\n menu.add(menuItemClose);\r\n JMenu menu2 = new JMenu(\"Om\");\r\n menuItemAbout = new JMenuItem(\"Om\");\r\n menuItemAbout.setAccelerator(KeyStroke.getKeyStroke('O', Event.CTRL_MASK));\r\n menuItemAbout.addActionListener(listener);\r\n menuItemAbout.setBorder(BorderFactory.createEmptyBorder());\r\n menu2.add(menuItemAbout);\r\n menuBar.add(menu2);\r\n \r\n return menuBar;\r\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_terms, menu);\n return true;\n }",
"public void actionPerformed(ActionEvent e) {\r\n\r\n JMenuItem menuItem = (JMenuItem) e.getSource();\r\n String itemText = menuItem.getName();\r\n\r\n if (itemText.equalsIgnoreCase(\"save\")) {\r\n\r\n } else if (itemText.equalsIgnoreCase(\"print\")) {\r\n\r\n } else if (itemText.equalsIgnoreCase(\"close\")) {\r\n\r\n this.parentWindow.setVisible(false);\r\n this.parentWindow.dispose();\r\n\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Create();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n menu.add(0, getAdapterPosition(),0,\"DELETE\");\n // Log.d(TAG, \"onCreateContextMenu: \" + );\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail, menu);\r\n MenuItem mi=menu.findItem(R.id.action_settings);\r\n SharedPreferences commonpreference=getSharedPreferences(\"Common\",MODE_PRIVATE);\r\n if(commonpreference.contains(id_fav))\r\n mi.setTitle(\"Remove from Favorites\");\r\n else\r\n mi.setTitle(\"Add to Favorites\");\r\n return true;\r\n }",
"private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_save) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"private void buildContextMenu() {\n\n contextMenu = null;\n contextMenu = new ContextMenu();\n MenuItem item1 = new MenuItem(bundle.getString(\"contextMenu.delete\"));\n item1.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) {\n alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(bundle.getString(\"alert.title\"));\n alert.setHeaderText(bundle.getString(\"alert.headerText\"));\n alert.setContentText(bundle.getString(\"alert.text\"));\n\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n stage.getIcons().add(new Image(this.getClass().getResource(\"images/logo.png\").toString()));\n\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n // ... auswahl ok\n try {\n presenter.removeEntry(tableView.getSelectionModel().getSelectedItem().getValue());\n } catch (IllegalBlockSizeException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (BadPaddingException e) {\n e.printStackTrace();\n } catch (InvalidKeyException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n } else {\n\n\n }\n }\n });\n contextMenu.getItems().add(item1);\n MenuItem item2 = new MenuItem(bundle.getString(\"contextMenu.edit\"));\n item2.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) {\n try {\n editEntryScene(tableView.getSelectionModel().getSelectedItem());\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (BadPaddingException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IllegalBlockSizeException e) {\n e.printStackTrace();\n } catch (InvalidKeyException e) {\n e.printStackTrace();\n }\n }\n });\n contextMenu.getItems().add(item2);\n MenuItem item3 = new MenuItem(bundle.getString(\"contextMenu.copyPassword\"));\n item3.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) {\n Clipboard clipboard = Clipboard.getSystemClipboard();\n ClipboardContent content = new ClipboardContent();\n content.putString(tableView.getSelectionModel().getSelectedItem().getValue().getPassword());\n clipboard.setContent(content);\n Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(Integer.parseInt(presenter.getTextField_settings_timeoutClipboard())), ev -> {\n clipboard.clear();\n }));\n timeline.play();\n }\n });\n contextMenu.getItems().add(item3);\n }",
"public int getAddEditMenuText();",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n\n // Add Widget selected from toolbar fragment\n if (id == R.id.action_add) {\n Toast.makeText(getActivity().getApplicationContext(), \"Add Widget Selected!\", Toast.LENGTH_LONG).show();\n }\n\n // Add Widget selected from toolbar fragment\n if (id == R.id.action_edit) {\n Toast.makeText(getActivity().getApplicationContext(), \"Edit Selected!\", Toast.LENGTH_LONG).show();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"private void saveButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_saveButtonMouseClicked\n \n FileDialog dialog = new FileDialog(this, \"Ssuvegarder le fichier dictionnaire\", FileDialog.SAVE);\n dialog.setFile(loadedDictionaryFilename);\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n // add .txt extension if user didn't add it\n if(!filename.substring(filename.length() - 4).equals(\".txt\"))\n filename = filename + \".txt\";\n \n // add full path of the filename\n filename = dialog.getDirectory() + filename;\n \n // get all WordDefinition in an arraylist \n ArrayList<WordDefinition> allWordDefinitionList = new ArrayList<>();\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n ArrayList<WordDefinition> allWordsInTree = lexiNodeTrees.get(i).getAllWordsFromTree();\n \n for(int j = 0 ; j < allWordsInTree.size() ; j++)\n {\n allWordDefinitionList.add(allWordsInTree.get(j));\n }\n }\n \n // sort the list of word definition in alphabetical order\n Collections.sort(allWordDefinitionList, new WordDefinitionComparator());\n \n // save to file\n if(DictioFileOperations.saveListToFile(filename, allWordDefinitionList))\n {\n loadedDictionaryFilename = filename; // save new name in case user wants to save again\n JOptionPane.showMessageDialog(this, \"La list des mots a été \"\n + \"sauvegardé dans le fichier\\n\" + filename + \".\\n\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n\n else // if there was a problem saving the file\n JOptionPane.showMessageDialog(this, \"ERREUR: Impossible de \"\n + \"sauvegarder dans le fichier.\\n\\n\", \"ERREUR\", \n JOptionPane.ERROR_MESSAGE);\n }\n }",
"private static void printFileOperationMenu() {\n System.out.println(\"-------------------------------------\");\n System.out.println(\"File operation menu\");\n System.out.println(\"1. Retrieve file names from directory\");\n System.out.println(\"2. Add a file.\");\n System.out.println(\"3. Delete a file.\");\n System.out.println(\"4. Search a file.\");\n System.out.println(\"5. Change directory.\");\n System.out.println(\"6. Exit to main menu.\");\n\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit_evento_pessoa, menu);\r\n menu.findItem(R.id.action_save).setVisible(false);\r\n this.mInterno = menu;\r\n\r\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\r\n return true;\r\n }",
"private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}",
"public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {\n \tsuper.onCreateContextMenu(menu, view, menuInfo);\n \tmenu.add(Menu.NONE, MENU_CONTEXT_SAVE, Menu.NONE, \n \t\t\tmContext.getText(R.string.context_save));\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_activity_add, menu);\n\n // if edit mode\n if (edit_mode) {\n // show the delete button\n menu.findItem(R.id.action_activity_delete).setVisible(true);\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n\n\n String Title, Content, Date = \"\";\n\n Title = title.getText().toString();\n Content = content.getText().toString();\n\n boolean flag = false;\n\n DataBase myData = new DataBase(this);\n\n Date date = new Date();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-yyyy\");\n\n Date = dateFormat.format(date);\n\n\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (id)\n {\n case R.id.Save:\n\n if (Title.trim().isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Please enter the name of note!\", Toast.LENGTH_SHORT).show();\n\n } else {\n boolean r = myData.insertNotes(Title, Date, Content);\n\n if (r) {\n Toast.makeText(getApplicationContext(), \"Added Successfully\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getApplicationContext(),NoteList.class);\n startActivity(i);\n finish();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error\", Toast.LENGTH_SHORT).show();\n\n }\n\n }\n\n return true;\n\n\n case R.id.edit:\n\n Menu menu ;\n\n setContentView(R.layout.edit_note);\n\n\n\n MenuItem menuItem = (MenuItem) myMenu.findItem(R.id.save2);\n menuItem.setVisible(true);\n menuItem = myMenu.findItem(R.id.edit);\n menuItem.setVisible(false);\n menuItem = myMenu.findItem(R.id.delete);\n menuItem.setVisible(false);\n\n\n title = (EditText) findViewById(R.id.title);\n content = (EditText) findViewById(R.id.txtcontent);\n\n title.setText(Name);\n content.setText(Contents);\n\n title.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n changedTitle = s.toString();\n flagT = true;\n\n\n }\n });\n\n\n content.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n changedContent = s.toString();\n flagC = true;\n\n }\n });\n\n return true;\n\n\n\n case R.id.save2:\n\n if(flagT & !flagC)\n {\n flag = myData.updateNotes(value,changedTitle,Date,\"\");\n }\n\n if(flagC & !flagT)\n {\n flag = myData.updateNotes(value,\"\",Date,changedContent);\n }\n\n if(flagC & flagT)\n {\n flag = myData.updateNotes(value,changedTitle,Date,changedContent);\n }\n\n if(flag)\n {\n Toast.makeText(getApplicationContext(),\"Saved\",Toast.LENGTH_SHORT).show();;\n }\n\n Intent intent = new Intent(getApplicationContext(),NoteList.class);\n\n startActivity(intent);\n\n finish();\n\n\n\n return true;\n\n case R.id.delete:\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Delete!\")\n .setMessage(\"Are you sure you want to delete this ?\");\n\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n DataBase myData = new DataBase(getApplicationContext());\n\n int count = myData.deleteNotes(value);\n\n if(count == 0)\n {\n Toast.makeText(getApplicationContext(),\"Item Not Found\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Toast.makeText(getApplicationContext(),\"Deleted\",Toast.LENGTH_SHORT).show();\n NoteList.adapter.notifyDataSetChanged();\n\n Intent i = new Intent(getApplicationContext(),NoteList.class);\n\n startActivity(i);\n finish();\n\n }\n\n }\n });\n\n builder.setNegativeButton(\"No\", null);\n\n\n AlertDialog alert = builder.create();\n alert.show();\n\n\n Button nbutton = alert.getButton(DialogInterface.BUTTON_NEGATIVE);\n nbutton.setTextColor(Color.BLACK);\n Button pbutton = alert.getButton(DialogInterface.BUTTON_POSITIVE);\n pbutton.setTextColor(Color.BLACK);\n\n return true;\n\n\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@FXML\n void exitDeleteWindow() {\n\n// lists Elements in default mode\n drawMenuElements(false);\n\n// adds all main buttons, removes confirm and cancel buttons for delete\n toggleMenuButtonVisibility(true);\n toggleDeleteButtonVisibility(false);\n\n// creates a message for the user\n setMessage(\"Exited Delete Mode without deleting elements\", false);\n window.setTitle(\"Timelines: Menu\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSeparator4 = new javax.swing.JSeparator();\n desktopPane = new javax.swing.JDesktopPane();\n menuBar = new javax.swing.JMenuBar();\n fileMenu = new javax.swing.JMenu();\n openMenuItem = new javax.swing.JMenuItem();\n saveMenuItem = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n CadPro = new javax.swing.JMenuItem();\n jSeparator5 = new javax.swing.JPopupMenu.Separator();\n jMenuItem6 = new javax.swing.JMenuItem();\n jSeparator2 = new javax.swing.JPopupMenu.Separator();\n exitMenuItem = new javax.swing.JMenuItem();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem10 = new javax.swing.JMenuItem();\n jMenuItem11 = new javax.swing.JMenuItem();\n helpMenu = new javax.swing.JMenu();\n contentMenuItem = new javax.swing.JMenuItem();\n jMenu3 = new javax.swing.JMenu();\n jMenuItem8 = new javax.swing.JMenuItem();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenuItem7 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jSeparator6 = new javax.swing.JPopupMenu.Separator();\n jMenuItem5 = new javax.swing.JMenuItem();\n jMenuItem9 = new javax.swing.JMenuItem();\n jMenuItem4 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"System Hardsearch - CONTROLE DPESSOAL - Versão: 1.0-20.0813.0\");\n\n fileMenu.setBorder(null);\n fileMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/register.png\"))); // NOI18N\n fileMenu.setMnemonic('f');\n fileMenu.setText(\"Cadrastrar\");\n\n openMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.SHIFT_MASK));\n openMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/user.png\"))); // NOI18N\n openMenuItem.setMnemonic('o');\n openMenuItem.setText(\"Cadastrar Usuario\");\n openMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n openMenuItemActionPerformed(evt);\n }\n });\n fileMenu.add(openMenuItem);\n\n saveMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.SHIFT_MASK));\n saveMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/funcionario.png\"))); // NOI18N\n saveMenuItem.setMnemonic('s');\n saveMenuItem.setText(\"Cadastrar Funcionário\");\n saveMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveMenuItemActionPerformed(evt);\n }\n });\n fileMenu.add(saveMenuItem);\n fileMenu.add(jSeparator1);\n\n CadPro.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK));\n CadPro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/procedimento.png\"))); // NOI18N\n CadPro.setMnemonic('y');\n CadPro.setText(\"Cadastrar Procedimento\");\n CadPro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CadProActionPerformed(evt);\n }\n });\n fileMenu.add(CadPro);\n fileMenu.add(jSeparator5);\n\n jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/company.png\"))); // NOI18N\n jMenuItem6.setText(\"Cadastrar Empresa\");\n jMenuItem6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem6ActionPerformed(evt);\n }\n });\n fileMenu.add(jMenuItem6);\n fileMenu.add(jSeparator2);\n\n exitMenuItem.setForeground(new java.awt.Color(255, 0, 51));\n exitMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/exit_black.png\"))); // NOI18N\n exitMenuItem.setMnemonic('x');\n exitMenuItem.setText(\"Exit\");\n exitMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitMenuItemActionPerformed(evt);\n }\n });\n fileMenu.add(exitMenuItem);\n\n menuBar.add(fileMenu);\n\n jMenu1.setBorder(null);\n jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/coparti.png\"))); // NOI18N\n jMenu1.setText(\"Recursos Humanos\");\n\n jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/controle.png\"))); // NOI18N\n jMenuItem1.setText(\"Controle de Coparticipação\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuItem10.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/integracao.png\"))); // NOI18N\n jMenuItem10.setText(\"Controle de Contratos\");\n jMenuItem10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem10ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem10);\n\n jMenuItem11.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/calendar.png\"))); // NOI18N\n jMenuItem11.setText(\"Controle de Cotistas\");\n jMenuItem11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem11ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem11);\n\n menuBar.add(jMenu1);\n\n helpMenu.setBorder(null);\n helpMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/seguranca.png\"))); // NOI18N\n helpMenu.setMnemonic('h');\n helpMenu.setText(\"Seg. Trabalho\");\n\n contentMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/integracao.png\"))); // NOI18N\n contentMenuItem.setMnemonic('c');\n contentMenuItem.setText(\"Controle Integração\");\n contentMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n contentMenuItemActionPerformed(evt);\n }\n });\n helpMenu.add(contentMenuItem);\n\n menuBar.add(helpMenu);\n\n jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/relatorios.png\"))); // NOI18N\n jMenu3.setText(\"Consultas e Relatórios\");\n\n jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem8.setText(\"Relat. Parcelas\");\n jMenuItem8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem8ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem8);\n\n jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem3.setText(\"Relat. Coparticipações Cadastradas\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem3);\n\n jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem7.setText(\"Relatório Razão Pagamento x Arrecadação Coparti.\");\n jMenuItem7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem7ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem7);\n\n jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/controlepro.png\"))); // NOI18N\n jMenuItem2.setText(\"Listagem de Coparticipações P/Conferência\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem2);\n jMenu3.add(jSeparator6);\n\n jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem5.setText(\"Relatório de Integrações Vencidas\");\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem5ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem5);\n\n jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem9.setText(\"Relatório de Integrações Cadastradas\");\n jMenuItem9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem9ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem9);\n\n jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/alert.png\"))); // NOI18N\n jMenuItem4.setText(\"Alertas DP\");\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem4);\n\n menuBar.add(jMenu3);\n\n jMenu2.setForeground(new java.awt.Color(255, 0, 0));\n jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/exit_black.png\"))); // NOI18N\n jMenu2.setText(\"Exit\");\n jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jMenu2MouseClicked(evt);\n }\n });\n menuBar.add(jMenu2);\n\n setJMenuBar(menuBar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1220, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(desktopPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n jMenu4 = new javax.swing.JMenu();\n jMenu5 = new javax.swing.JMenu();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenuItem4 = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\n jMenu1.setText(\"Arquivo\");\n\n jMenuItem1.setText(\"Abrir\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem2.setText(\"Salvar\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem2);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Editar\");\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Imagem\");\n jMenuBar1.add(jMenu3);\n\n jMenu4.setText(\"Cores\");\n jMenuBar1.add(jMenu4);\n\n jMenu5.setText(\"Filtros\");\n\n jMenuItem3.setText(\"Negativo\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenu5.add(jMenuItem3);\n\n jMenuItem4.setText(\"Preto e Branco\");\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenu5.add(jMenuItem4);\n\n jMenuBar1.add(jMenu5);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 251, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }",
"private void makeToolsMenu() {\r\n\t\tJMenu toolsMnu = new JMenu(\"Herramientas\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Usuarios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Manejo de Usuarios\",\r\n\t\t\t\t\timageLoader.getImage(\"users.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'm',\r\n\t\t\t\t\t\"Manejar los usuarios del sistema\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F7, 0), Users.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"FacturacionManual\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion Manual\",\r\n\t\t\t\t\timageLoader.getImage(\"kwrite.png\"));\r\n\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Manejar la Facturacion Manual\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F3, 0), ManualInvoice.class);\r\n\r\n\t\t\ttoolsMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\ttoolsMnu.setMnemonic('h');\r\n\t\t\tadd(toolsMnu);\r\n\t\t}\r\n\t}",
"public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(0, 1, 1, \"添加图书类别\");\n\t\tmenu.add(0, 2, 2, \"返回主界面\");\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\n\t}",
"private void createMenusNow()\n {\n JMenu debugMenu = myToolbox.getUIRegistry().getMenuBarRegistry().getMenu(MenuBarRegistry.MAIN_MENU_BAR,\n MenuBarRegistry.DEBUG_MENU);\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Print Summary\", e -> printSummary()));\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Tag Data Type\", e -> tagDataType()));\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase R.id.context_class_test_add: {\r\n\t\t\tDEL_ADD_textview.setVisibility(View.VISIBLE);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase R.id.context_class_test_delete: {\r\n\t\t\tDEL_ADD_textview.setVisibility(View.INVISIBLE);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase R.id.context_class_test_update: {\r\n\t\t\tDEL_ADD_textview.setText(\"文本改变了\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase R.id.context_class_test_search: {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.edit_profile_menu, menu);\n mSaveItem = menu.getItem(0);\n\n mSaveItem.setIcon(getDrawable(R.drawable.ic_done_black_24dp));\n\n updateUI();\n return true;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenuBar2 = new javax.swing.JMenuBar();\n jMenu3 = new javax.swing.JMenu();\n jMenu4 = new javax.swing.JMenu();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton2 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n\n jMenuItem2.setText(\"jMenuItem2\");\n\n jMenu3.setText(\"File\");\n jMenuBar2.add(jMenu3);\n\n jMenu4.setText(\"Edit\");\n jMenuBar2.add(jMenu4);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Quotas\");\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n jButton1.setText(\"back\");\n if(permissao == 0){\n jButton1.setText(\"Logout\");\n }\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setText(\"Seleções Guardadas\");\n\n jLabel2.setText(\"Insira o numero de contribuinte do cliente:\");\n\n jButton2.setText(\"Pesquisar\");\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n\n if(permissao == 0) jMenuBar1.setVisible(false);\n\n jMenu1.setText(\"File\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 643, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 194, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(201, 201, 201))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(269, 269, 269))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jButton2)\n .addGap(0, 0, Short.MAX_VALUE))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton2))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addGap(5, 5, 5))\n );\n\n pack();\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\tmenu.add(0, MENU_OPTION_DELETE, 0, R.string.delete);\n\t\t\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"private void createTabMenu(Tab tab, MenuItem saveItemTab) {\n Menu tabMenu = new Menu();\n MenuItem closeItem = new MenuItem(\"Close\");\n closeItem.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n tabCloseEvent(tab);\n }\n });\n MenuItem closeOtersItem = new MenuItem(\"Close Others\");\n closeOtersItem.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n for (Tab closeTab : editorTabSet.getTabs()) {\n if (editorTabSet.getTabNumber(closeTab.getID()) != editorTabSet.getTabNumber(tab.getID())) {\n tabCloseEvent(closeTab);\n }\n }\n }\n });\n MenuItem closeLeftItem = new MenuItem(\"Close Tabs to the Left\");\n closeLeftItem.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n for (Tab closeTab : editorTabSet.getTabs()) {\n if (editorTabSet.getTabNumber(closeTab.getID()) < editorTabSet.getTabNumber(tab.getID())) {\n tabCloseEvent(closeTab);\n }\n }\n }\n });\n MenuItem closeRightItem = new MenuItem(\"Close Tabs to the Right\");\n closeRightItem.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n for (Tab closeTab : editorTabSet.getTabs()) {\n if (editorTabSet.getTabNumber(closeTab.getID()) > editorTabSet.getTabNumber(tab.getID())) {\n tabCloseEvent(closeTab);\n }\n }\n }\n });\n MenuItem closeAllItem = new MenuItem(\"Close All\");\n closeAllItem.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n for (Tab closeTab : editorTabSet.getTabs()) {\n tabCloseEvent(closeTab);\n }\n }\n });\n MenuItemSeparator sep = new MenuItemSeparator();\n if (saveItemTab != null) {\n MenuItemIfFunction enableCondition = new MenuItemIfFunction() {\n public boolean execute(Canvas target, Menu menu, MenuItem item) {\n return tab == editorTabSet.getSelectedTab();\n }\n };\n\n saveItemTab.setEnableIfCondition(enableCondition);\n saveItemTab.setKeyTitle(\"Ctrl + S\");\n\n // If you use addItem, the association with the shortcut key is lost.\n tabMenu.setItems(saveItemTab, sep, closeItem, closeOtersItem, closeLeftItem, closeRightItem, sep, closeAllItem);\n } else {\n tabMenu.setItems(closeItem, closeOtersItem, closeLeftItem, closeRightItem, sep, closeAllItem);\n }\n tab.setContextMenu(tabMenu);\n }",
"void ToolBarFileIOHook() {\n\t\ttoolBar.add(newButton = new JButton(new ImageIcon(this.getClass().getResource(\"images/new.gif\"))));\n\t\ttoolBar.add(openButton = new JButton(new ImageIcon(this.getClass().getResource(\"images/open.gif\"))));\n\t\ttoolBar.add(saveButton = new JButton(new ImageIcon(this.getClass().getResource(\"images/save.gif\"))));\n\t\ttoolBar.add(saveAsButton= new JButton(new ImageIcon(this.getClass().getResource(\"images/saveAs.gif\"))));\n\t\ttoolBar.addSeparator();\n\n\t\t//adding a tool tip text to the button for descriping the image icon.\n\t\tnewButton.setToolTipText(\"New\");\n\t\topenButton.setToolTipText(\"Open\");\n\t\tsaveButton.setToolTipText(\"Save\");\n\t\tsaveAsButton.setToolTipText(\"Save As\");\n}",
"private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }",
"private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }",
"private static void displayRepoMenu() {\n\t\tSystem.out.println(\"\\t Repo Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"su <username> : To subcribe users to repo \\n\"\n\t\t\t\t+ \"ci: To check in changes \\n\"\n\t\t\t\t+ \"co: To check out changes \\n\"\n\t\t\t\t+ \"rc: To review change \\n\"\n\t\t\t\t+ \"vh: To get revision history \\n\"\n\t\t\t\t+ \"re: To revert to previous version \\n\"\n\t\t\t\t+ \"ld : To list documents \\n\"\n\t\t\t\t+ \"ed <docname>: To edit doc \\n\"\n\t\t\t\t+ \"ad <docname>: To add doc \\n\"\n\t\t\t\t+ \"dd <docname>: To delete doc \\n\"\n\t\t\t\t+ \"vd <docname>: To view doc \\n\"\n\t\t\t\t+ \"qu : To quit \\n\" \n\t\t\t\t+ \"====================================\\n\");\n\t}",
"static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}",
"private JMenuBar createbar(){\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t//Add a JMenu\n\t\tJMenu c = new JMenu(\"Create\");\n\t\tJMenu m = new JMenu(\"Manipulate\"); \n\t\tJMenu o = new JMenu(\"Other\");\n\n\t\tmenuBar.add(c);\n\t\tmenuBar.add(m);\n\t\tmenuBar.add(o);\n\n\t\t//Create menu\n\t\tJMenuItem cPyramid = new JMenuItem(\"Pyramid\");\n\t\tJMenuItem cSquare = new JMenuItem(\"Square\");\n\t\tJMenuItem cStar = new JMenuItem(\"Star\");\n\t\tJMenuItem cSphere = new JMenuItem(\"Sphere\");\n\t\tJMenuItem cCube = new JMenuItem(\"Cube\");\n\t\tJMenuItem cLight = new JMenuItem(\"Light\");\n\n\t\tc.add(cPyramid);\n\t\tc.add(cSquare);\n\t\tc.add(cStar);\n\t\tc.add(cSphere);\n\t\tc.add(cCube);\n\t\tc.add(cLight);\n\t\t\n\n\t\t//Manipulate menu\n\t\tJMenuItem mModify = new JMenuItem(\"Modify\");\n\t\tJMenuItem mDelete = new JMenuItem(\"Delete\");\n\n\t\tm.add(mModify);\n\t\tm.add(mDelete);\n\n\t\tJMenuItem oDeleteAll = new JMenuItem(\"Delete All (lights remain but will be overwritten)\"); \n\t\tJMenuItem oPrint = new JMenuItem(\"Print Structure\");\n\n\t\to.add(oPrint);\n\t\to.add(oDeleteAll);\n\n\n\t\tcPyramid.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Pyramid, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\n\t\t});\n\n\t\tcSquare.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Square, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcStar.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Star, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcSphere.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Sphere, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\t\t\n\t\tcCube.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Cube, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcLight.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Light, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tmModify.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfor (Figure_deployment_type fig: draw.figurelist) {\n\t\t\t\t\tif (fig.getId()==draw.picked_figure){\n\t\t\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, fig.type, draw.picked_figure);\n\t\t\t\t\t\tif (cdialog.getAnswer()!=null){\n\t\t\t\t\t\t\tfig.modify(cdialog.getModify());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmDelete.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint n =-1;\n\t\t\t\tfor (int i = 0; i < draw.figurelist.size(); i++) {\n\t\t\t\t\tif(draw.figurelist.get(i).getId()==draw.picked_figure)\n\t\t\t\t\t\tn=i;\n\t\t\t\t}\n\t\t\t\tif (n!=-1)\n\t\t\t\tdraw.figurelist.remove(n);\n\t\t\t}\n\t\t});\n\n\t\toDeleteAll.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdraw.figurelist.clear();\n\t\t\t}\n\t\t});\n\n\t\toPrint.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nArrayList<Figure_deployment_type> : {\");\n\t\t\t\tfor (Figure_deployment_type fig : draw.figurelist) {\n\t\t\t\t\tSystem.out.print(\"[ \");\n\t\t\t\t\tSystem.out.print(fig.toString());\n\t\t\t\t\tSystem.out.println(\" ]\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"}\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn menuBar;\n\t}",
"@Override\n public boolean onContextItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n\n case R.id.context_menu_edit:\n Toast.makeText(this,\"Edit\" ,Toast.LENGTH_SHORT ).show();\n return true;\n\n case R.id.context_menu_share:\n Toast.makeText(this,\"Share\" ,Toast.LENGTH_SHORT ).show();\n return true;\n\n case R.id.context_menu_delete:\n Toast.makeText(this,\"Delete\" ,Toast.LENGTH_SHORT ).show();\n\n }\n\n return super.onContextItemSelected(item);\n }",
"public Menu createToolsMenu();",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tmenu.add(0,ADD_INGREDIENT_DIALOG,0,R.string.add).setIcon(R.drawable.ic_menu_add);\n\t\treturn true;\t\n\t}",
"public void deleteMenuItem() {\n\t\tviewMenu();\n\n\t\t//Clean arraylist so that you can neatly add data from saved file\n\t\tmm.clear();\n\t\t\n\t\tString delID;\n\n\t\tScanner delSC = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Menu ID to Delete : \");\n\t\tdelID = delSC.next();\n\t\t\n\t\ttry \n\t\t{\n\t\t\t// Get data contents from saved file\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n \n mm = (ArrayList<AlacarteMenu>) ois.readObject();\n mm.removeIf(menuItem -> menuItem.getMenuName().equals(delID.toUpperCase()));\n \n ois.close();\n fis.close();\n \n try {\n \tFileOutputStream fos = new FileOutputStream(\"menuData\");\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\t\toos.writeObject(mm);\n\t\t\t\toos.close();\n\t\t\t\tfos.close();\n }\n catch (IOException e) {\n \t\t\tSystem.out.println(\"Error deleting menu item!\");\n \t\t\treturn;\n \t\t}\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\treturn;\n\t\t}\n\t\tcatch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mnbMenuBar = new javax.swing.JMenuBar();\n mnuManage = new javax.swing.JMenu();\n mniEmpoyee = new javax.swing.JMenuItem();\n mniStudent = new javax.swing.JMenuItem();\n mniBook = new javax.swing.JMenuItem();\n mnuLoan = new javax.swing.JMenu();\n mniLoanBook = new javax.swing.JMenuItem();\n mnuFine = new javax.swing.JMenu();\n mniFineStudent = new javax.swing.JMenuItem();\n mnuAbout = new javax.swing.JMenu();\n mniSystem = new javax.swing.JMenuItem();\n mniLicense = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Library\");\n\n mnbMenuBar.setBorder(null);\n mnbMenuBar.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n mnuManage.setText(\"Manage\");\n mnuManage.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuManage.setPreferredSize(new java.awt.Dimension(75, 23));\n\n mniEmpoyee.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniEmpoyee.setText(\"Employee\");\n mniEmpoyee.setBorder(null);\n mniEmpoyee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniEmpoyeeActionPerformed(evt);\n }\n });\n mnuManage.add(mniEmpoyee);\n\n mniStudent.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniStudent.setText(\"Student\");\n mniStudent.setBorder(null);\n mniStudent.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniStudentActionPerformed(evt);\n }\n });\n mnuManage.add(mniStudent);\n\n mniBook.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniBook.setText(\"Book\");\n mniBook.setBorder(null);\n mniBook.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniBookActionPerformed(evt);\n }\n });\n mnuManage.add(mniBook);\n\n mnbMenuBar.add(mnuManage);\n\n mnuLoan.setText(\"Loan\");\n mnuLoan.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuLoan.setPreferredSize(new java.awt.Dimension(53, 23));\n\n mniLoanBook.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniLoanBook.setText(\"Book\");\n mniLoanBook.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniLoanBookActionPerformed(evt);\n }\n });\n mnuLoan.add(mniLoanBook);\n\n mnbMenuBar.add(mnuLoan);\n\n mnuFine.setText(\"Fine\");\n mnuFine.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuFine.setPreferredSize(new java.awt.Dimension(49, 23));\n\n mniFineStudent.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniFineStudent.setText(\"Student\");\n mniFineStudent.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniFineStudentActionPerformed(evt);\n }\n });\n mnuFine.add(mniFineStudent);\n\n mnbMenuBar.add(mnuFine);\n\n mnuAbout.setText(\"About\");\n mnuAbout.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuAbout.setPreferredSize(new java.awt.Dimension(61, 19));\n\n mniSystem.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniSystem.setText(\"System\");\n mniSystem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniSystemActionPerformed(evt);\n }\n });\n mnuAbout.add(mniSystem);\n\n mniLicense.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniLicense.setText(\"License\");\n mniLicense.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniLicenseActionPerformed(evt);\n }\n });\n mnuAbout.add(mniLicense);\n\n mnbMenuBar.add(mnuAbout);\n\n setJMenuBar(mnbMenuBar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1000, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 677, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}",
"protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.actions_save, menu);\n }",
"protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_editar) {\n if(!menuVal){\n empresaFragment.Editar(true);\n item.setIcon(R.drawable.ic_save_black_24dp);\n menuVal=true;\n }else {\n empresaFragment.Salvar();\n item.setIcon(R.drawable.ic_edit_black_24dp);\n menuVal = false;\n }\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }"
] |
[
"0.63622344",
"0.61303395",
"0.5996484",
"0.58980215",
"0.58575344",
"0.5855335",
"0.5813599",
"0.5789006",
"0.5779953",
"0.57732934",
"0.5765899",
"0.5750968",
"0.57402426",
"0.5727419",
"0.5726656",
"0.57244825",
"0.57011545",
"0.56967753",
"0.5696666",
"0.56907046",
"0.5640856",
"0.5617264",
"0.5608116",
"0.5598824",
"0.55979145",
"0.5587338",
"0.5582555",
"0.55809104",
"0.55807006",
"0.5578104",
"0.5577071",
"0.5570419",
"0.556769",
"0.5563991",
"0.55532515",
"0.55419874",
"0.55392563",
"0.55320936",
"0.5525713",
"0.54998094",
"0.5489084",
"0.548674",
"0.54844075",
"0.5481671",
"0.54596245",
"0.5458778",
"0.545653",
"0.5448802",
"0.5435594",
"0.5434004",
"0.54333556",
"0.5423946",
"0.5412931",
"0.5410124",
"0.5409581",
"0.5400956",
"0.5398989",
"0.53923684",
"0.53915006",
"0.5383879",
"0.53815573",
"0.537781",
"0.5376237",
"0.53757536",
"0.5373884",
"0.53735864",
"0.53614265",
"0.5357587",
"0.53542036",
"0.5352889",
"0.53489625",
"0.5346995",
"0.53455335",
"0.5344017",
"0.5339666",
"0.53329647",
"0.53283346",
"0.5324317",
"0.53193045",
"0.53192985",
"0.5318433",
"0.53171045",
"0.53027505",
"0.5302076",
"0.52973413",
"0.52971935",
"0.52965474",
"0.5296103",
"0.5295032",
"0.52893007",
"0.528782",
"0.52786607",
"0.5276736",
"0.5273753",
"0.5273083",
"0.52689016",
"0.526362",
"0.5254049",
"0.5253356",
"0.5250177"
] |
0.54476297
|
48
|
TODO Autogenerated method stub
|
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gardenvideo);
context = this;
resources = this.getResources();
viewInit();
try {
BBGJDB tdd = new BBGJDB(context);
tdd.clearjournallistinfo();
tdd.close();
} catch (Exception e) {
// TODO: handle exception
}
if (listview.getCount() == 0) {
sync_state = false;
dialog = new ProgressDialog(this);
dialog.setMessage("正在加载视频列表,请稍等.");
dialog.setIndeterminate(true);
dialog.setCancelable(true);
dialog.show();
}
Thread thread = new Thread(new mGetJournalDataThread());
thread.start();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void run() {
SharedPreferences share = getSharedPreferences("BBGJ_UserInfo",
Activity.MODE_WORLD_READABLE);
int comId = share.getInt("comId", 0);
BBGJDB tdd = new BBGJDB(context);
String qurl = MessengerService.URL;
String qmethodname = MessengerService.METHOD_GETVIDEOINFO;
String qnamespace = MessengerService.NAMESPACE;
String qsoapaction = qnamespace + "/" + qmethodname;
SoapObject rpc = new SoapObject(qnamespace, qmethodname);
rpc.addProperty("pagesize", 1000);
rpc.addProperty("pageindex", 1);
rpc.addProperty("comId", comId);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.setOutputSoapObject(rpc);
HttpTransportSE ht = new HttpTransportSE(qurl);
ht.debug = true;
try {
ht.call(qsoapaction, envelope);
SoapObject journal = (SoapObject) envelope.bodyIn;
for (int i = 0; i < journal.getPropertyCount(); i++) {
SoapObject soapchilds = (SoapObject) journal.getProperty(i);
for (int j = 0; j < soapchilds.getPropertyCount(); j++) {
SoapObject soapchildsson = (SoapObject) soapchilds
.getProperty(j);
String webid = soapchildsson.getProperty("Id")
.toString();
String title = soapchildsson.getProperty("Title")
.toString();
String pic = soapchildsson.getProperty("Pic")
.toString();
String video = soapchildsson.getProperty("Video")
.toString();
String extension = soapchildsson.getProperty(
"Extension").toString();
String size = soapchildsson.getProperty("Size")
.toString();
String content = soapchildsson.getProperty("Content")
.toString();
String crtime = soapchildsson.getProperty("Crtime")
.toString();
ContentValues values = new ContentValues();
values.put(tdd.VIDEO_WEBID, webid);
values.put(tdd.VIDEO_TITLE, title);
values.put(tdd.VIDEO_PIC, pic);
values.put(tdd.VIDEO_VIDEO, video);
values.put(tdd.VIDEO_EXTENSION, extension);
values.put(tdd.VIDEO_SIZE, size);
values.put(tdd.VIDEO_CONTENT, content);
values.put(tdd.VIDEO_CRTIME, crtime);
long aaa = tdd.insertvideo(values);
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Message msg = new Message();
msg.obj = lvbt;
threadMessageHandler.sendMessage(msg);
}
|
{
"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
|
protected void onStop() {
super.onStop();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
protected void onResume() {
super.onResume();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.gardenvideo_back:
this.finish();
break;
default:
break;
}
}
|
{
"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
|
Profile player = this.players.get(id);
|
public boolean end(Match match, Profile player) throws Exception{
System.out.println("S: " + player.getName() + " end game!");
synchronized(this){
player.setEnd(true);
int end = 0;
for(Profile i: this.players)
if(i.finish())
end++;
if(end == this.players.size()){
notifyAll();
return true;
}
wait();
return true;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Player getPlayer() { return player;}",
"public Player getPlayer(){\r\n return player;\r\n }",
"Player getPlayer(int playerNumber){\n return players.get(playerNumber);\n }",
"public Player getPlayer() { return player; }",
"Player getPlayer(UUID playerId);",
"public Player getPlayer()\r\n {\r\n return player;\r\n }",
"public Player getPlayer();",
"public Player getPlayer();",
"public Player getPlayer(UUID id) {\r\n for (Player player : players) {\r\n if (player.getId().equals(id)) {\r\n return player;\r\n }\r\n }\r\n return null;\r\n }",
"Player getPlayer();",
"@Override\n public Player getPlayerById(long id) {\n Player player=entityManager.find(Player.class,id);\n return player;\n }",
"public Player getPlayer(int index) {\r\n return players[index];\r\n }",
"public int getPlayerId();",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\r\n return player;\r\n }",
"Profile getProfile( String profileId );",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public ArrayList<Player> getPlayers() {\n return players;\n}",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer(String username){\n return this.players.get(username);\n }",
"public int getPlayer()\n {\n return this.player;\n }",
"public List<Player> getPlayerList(){\n return this.players;\n }",
"protected Player getPlayer() { return player; }",
"@Override\r\n public Profile getProfileById(int id) {\r\n return profileDAO.getProfileById(id);\r\n }",
"public List<PlayerItem> getSpecific(int playerItemId);",
"public PlayerItem getPlayerItemById(int playerItemId);",
"private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }",
"@Override\n public Player getPlayerOnIndex(int index) {\n return players.get(index);\n }",
"public Player getPlayer(int id)\n\t{\n\t\tif (playerList != null)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tif (player.getId() == id)\n\t\t\t\t{\n\t\t\t\t\treturn player;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int getId() {\n return playerId;\n }",
"public Player getPlayer() {\n return p;\n }",
"BPlayer getPlayer(Player player);",
"public Player getPlayer(String username) {\n for (Player p : players) {\n if (p.username.equals(username))\n return p;\n }\n return null;\n }",
"int getPlayerId();",
"int getPlayerId();",
"public EpicPlayer getEpicPlayer(){ return epicPlayer; }",
"public String getPlayerName(){\n return this.playerName;\n\n }",
"public User getPlayer(String name) {\n\t\tUser ret = null;\n\t\tList<User> searchResult = this.players.stream().filter(x->x.name.equals(name)).collect(Collectors.toList());\n\t\tif (!searchResult.isEmpty()) {\n\t\t\tret = searchResult.get(0);\n\t\t}\n\t\treturn ret;\n\t}",
"public Player getPlayer(){\n\t\treturn this.player;\n\t}",
"public Player getPlayer1(){\n return jugador1;\n }",
"public PlayerProfile getPlayer(P player){\n\n if(playerMap.containsKey(player)){\n //Player is safe to send\n return playerMap.get(player);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s data, but it's not available\");\n return null;\n }\n }",
"public Player getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public List<PlayerItem> getAllPlayerItemById(Player player);",
"public Player getPlayer() {\n return me;\n }",
"public Player getPlayer(int i) {\n return this.players[i];\n }",
"BPlayer getPlayer(UUID uuid);",
"public T getSelectedProfile(int Id);",
"public interface IPlayer {\n public PlayerIdentity getIdentity();\n}",
"Player getCurrentPlayer();",
"Player getCurrentPlayer();",
"List<Player> getPlayers();",
"Collection<User> players();",
"@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"public Player getPlayerFromList(String name){\n for (Player player : players){\n if (player.getName().equals(name)){\n return player;\n }\n }\n return null; //This will never happen. Will always be found. Only called from the takeoverTerritory method\n }",
"long getPlayerId();",
"KingdomUser loadUser(Player player);",
"@Override\n public List<Player> getPlayers() {\n return players;\n }",
"Accessprofile getById(Integer id);",
"public static ArrayList<Player> getWinners(){return winners;}",
"public Game(String id){\n this.id = id;\n players = new ArrayList<>();\n }",
"public PlayerGame find(Long id) {\n return playerGames.stream()\n .filter(p -> p.getId().equals(id))\n .findFirst()\n .orElse(null);\n }",
"@Override\npublic Player<T> getCurrentPlayer() {\n\treturn currentPlayer;\n}",
"Game getGameById(long id);",
"public Player getPlayer2(){\n return jugador2;\n }",
"public Player getPlayerById(int id) {\n\t\tPlayer p = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString playerByIdRecords_sql = \"SELECT * FROM \" + player_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(playerByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tp = new Player(rs.getString(3), rs.getString(4), rs.getDate(5), rs.getInt(6));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn p;\n\t}",
"public Player getPlayerByName(String name){\n for (Player player : players){\n if (name.equals(player.getName())){\n return player;\n }\n }\n return null;\n }",
"public int getPlayerID() {\r\n return playerID;\r\n }",
"GpPubgPlayer selectByPrimaryKey(Long id);",
"public int getPlayerID() {\n return playerID;\n }",
"Player getSelectedPlayer();",
"ArrayList<Player> getAllPlayer();",
"public PlayerParticipant getPlayer(int playerId) {\n try {\n String query = \"SELECT * from playerparticpant WHERE Id = \" + playerId;\n ResultSet resultSet = dbhelper.ExecuteSqlQuery(query);\n if (resultSet.next()) {\n PlayerParticipant playerParticipant = new PlayerParticipant();\n playerParticipant.matchHistoryUri = resultSet.getString(\"MatchHistoryUri\");\n playerParticipant.profileIcon = resultSet.getInt(\"ProfileIconId\");\n playerParticipant.summonerId = resultSet.getLong(\"SummonerId\");\n playerParticipant.summonerName = resultSet.getString(\"SummonerName\");\n \n return playerParticipant;\n }\n } catch (SQLException | IllegalStateException ex) {\n System.out.println(\"An error occurred: \" + ex.getMessage());\n }\n \n return null;\n }",
"List<Player> listPlayers();",
"public Profile getProfile() {\n return _profile;\n }",
"public Player getOwner() {\n return owner;\n }",
"public Mono<PlayList> findById(String id);",
"private Collection<Player> getPlayers() {\n\t\treturn players;\n\t}",
"@Override\r\n\tpublic ArrayList<PlayerPO> findPlayerByName(String name) {\n\t\treturn playerController.findPlayerByName(name);\r\n\t}",
"public PlayerEntity getPlayer() {\n return player;\n }",
"public PlayerEntity getPlayer() {\n return player;\n }",
"protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }",
"@Override\n\tpublic SoccerPlayer getPlayer(String firstName, String lastName) {\n\n if(stats.containsKey(firstName + lastName)) {\n\n return stats.get(firstName + lastName);\n\n }\n\n else{\n\n return null;\n\n }\n }",
"public Player getStaff() {\n return staff;\n }",
"Player currentPlayer();",
"public UUID getPlayerUuid() { return uuid; }",
"public static Player getPlayer(Player player){\n Player returnPlayer = null;\n if (player != null) {\n try {\n returnPlayer = mapper.readValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), Player.class);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return returnPlayer;\n }",
"UUID getActivePlayerId();",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public List<Player> getPlayers() {\r\n return players;\r\n }",
"public Player getPlayer(int idx) {\n\t\ttry {\n\t\t\tPlayer p = players.get(idx);\n\t\t\treturn p;\n\t\t} catch(Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\n\t}",
"public Player getPlayer() {\n return humanPlayer;\n }",
"public Map<String, Player> getPlayersMap(){\n return this.players;\n }",
"public AIObject getAIObject(String id) {\n return aiObjects.get(id);\n }",
"public Card getCard(){\n return cards.get(0);\n }",
"KingdomUser getUser(Player p);",
"public int getProfile_id() {\n return profileID;\n }"
] |
[
"0.70483524",
"0.70395964",
"0.7020752",
"0.6893235",
"0.6858",
"0.6802441",
"0.67995375",
"0.67995375",
"0.676585",
"0.6754612",
"0.6715611",
"0.66854703",
"0.66834795",
"0.668072",
"0.6614256",
"0.6605167",
"0.6604338",
"0.6604338",
"0.6604338",
"0.6604338",
"0.6604338",
"0.6550767",
"0.6527767",
"0.6502318",
"0.64727217",
"0.6461392",
"0.6453293",
"0.64375377",
"0.64374596",
"0.64360386",
"0.6424671",
"0.64219683",
"0.64038354",
"0.6396279",
"0.63962185",
"0.6366082",
"0.63300276",
"0.63291687",
"0.63291687",
"0.6324599",
"0.63151",
"0.63028467",
"0.63024765",
"0.6295044",
"0.6294469",
"0.6279923",
"0.627647",
"0.62597644",
"0.6235135",
"0.6234138",
"0.6232833",
"0.6225535",
"0.61903226",
"0.61903226",
"0.61797965",
"0.6163013",
"0.6162695",
"0.6160299",
"0.61602986",
"0.6156739",
"0.61498386",
"0.6149749",
"0.6124585",
"0.61178917",
"0.6117404",
"0.60972065",
"0.60846573",
"0.60758543",
"0.6070319",
"0.6044014",
"0.60402673",
"0.6034008",
"0.6032352",
"0.6030417",
"0.6027997",
"0.602494",
"0.6015458",
"0.6015345",
"0.6012135",
"0.6009889",
"0.5996359",
"0.59773207",
"0.5976159",
"0.59750426",
"0.59750426",
"0.5965048",
"0.59639394",
"0.5961598",
"0.59512526",
"0.59308785",
"0.5930698",
"0.5928509",
"0.5916362",
"0.5916362",
"0.59163475",
"0.59131956",
"0.5911584",
"0.59064406",
"0.5894326",
"0.58885974",
"0.5888516"
] |
0.0
|
-1
|
anade las ordenes de los clientes
|
public void addOrder(Menu restaurantMenu, String newOrder){
int contAnadidos = 0; // newOrder en formato separado por coma
String info = "";
ArrayList<String> orderList = new ArrayList<>(Arrays.asList(newOrder.split(",")));
for (int i=0; i<orderList.size(); i++){
if (restaurantMenu.findProduct(orderList.get(i)) != null){
addDish(orderList.get(i));
contAnadidos = contAnadidos + 1;
}
}
if (contAnadidos != orderList.size()){
info += " ** ERROR: Algunos productos no se encuentran en el menu. En su orden se anadieron: " + contAnadidos + " productos." + "\n";
info += " \n";
ventana.setTexto(info);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<Usuario> obtenerTodosLosClientes() {\n return this.usuarioFacade.obtenerTodosLosClientes();\n }",
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }",
"public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}",
"public List<Cliente> mostrarClientesPos()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tif(p.tienePost())\n\t\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\tCollections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public List<Cliente> consultarClientes();",
"public RepositorioClientesArray() {\n\t\tclientes = new Cliente[TAMANHO_CACHE];\n\t\tindice = 0;\n\t}",
"public ArrayList<Cliente> getClientes() {\r\n return clientes;\r\n }",
"@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }",
"private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }",
"public List<Clients> getallClients();",
"public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}",
"public Clientes() {\n\t\tclientes = new Cliente[MAX_CLIENTES];\n\t}",
"public List<Client> getAllClient();",
"public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }",
"@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}",
"public static ArrayList<Cliente> getClientes()\n {\n return SimulaDB.getInstance().getClientes();\n }",
"public List<ClienteEmpresa> obtenerTodosLosClientes() {\n return this.clienteEmpresaFacade.findAll();\n }",
"private void llenarControles(Cliente pCliente) {\n try {\n clienteActual = ClienteDAL.obtenerPorId(pCliente); // Obtener el Rol por Id \n this.txtNombre.setText(clienteActual.getNombre()); // Llenar la caja de texto txtNombre con el nombre del rol \n this.txtApellido.setText(clienteActual.getApellido());\n this.txtDui.setText(clienteActual.getDui());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n this.txtNumero.setText(Integer.toString(clienteActual.getNumero()));\n } catch (Exception ex) {\n // Enviar el mensaje al usuario de la pantalla en el caso que suceda un error al obtener los datos de la base de datos\n JOptionPane.showMessageDialog(frmPadre, \"Sucedio el siguiente error: \" + ex.getMessage());\n }\n }",
"public ArrayList<DataCliente> listarClientes();",
"List<User> getAllClients();",
"public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }",
"@Override\n\tpublic List<Cliente> getByIdCliente(long id) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> clients =getCurrentSession().createQuery(\"from Cliente c join fetch c.grupos grupos join fetch grupos.clientes where c.id='\"+id+\"' and c.activo=1\" ).list();\n return clients;\n\t}",
"public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }",
"public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}",
"public ArrayList<Cliente> obtClientes(){\n return (ArrayList<Cliente>) clienteRepositori.findAll();\n }",
"private Cliente obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Entrada\");\n \n StringBuffer nombreCli = new StringBuffer();\n\n // crear cliente\n Cliente cliente = new Cliente();\n cliente.setOidCliente(oidCliente);\n\n // completar oidEstatus\n BigDecimal oidEstatus = null;\n\n {\n BelcorpService bs1;\n RecordSet respuesta1;\n String codigoError1;\n StringBuffer query1 = new StringBuffer();\n\n try {\n bs1 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n try {\n query1.append(\" SELECT CLIE_OID_CLIE, \");\n query1.append(\" ESTA_OID_ESTA_CLIE \");\n query1.append(\" FROM MAE_CLIEN_DATOS_ADICI \");\n query1.append(\" WHERE CLIE_OID_CLIE = \" + oidCliente);\n respuesta1 = bs1.dbService.executeStaticQuery(query1.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta1 \" + respuesta1);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n if (respuesta1.esVacio()) {\n cliente.setOidEstatus(null);\n } else {\n oidEstatus = (BigDecimal) respuesta1\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatus((oidEstatus != null) ? new Long(\n oidEstatus.longValue()) : null);\n }\n }\n // completar oidEstatusFuturo\n {\n BelcorpService bs2;\n RecordSet respuesta2;\n String codigoError2;\n StringBuffer query2 = new StringBuffer();\n\n try {\n bs2 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n try {\n query2.append(\" SELECT OID_ESTA_CLIE, \");\n query2.append(\" ESTA_OID_ESTA_CLIE \");\n query2.append(\" FROM MAE_ESTAT_CLIEN \");\n query2.append(\" WHERE OID_ESTA_CLIE = \" + oidEstatus);\n respuesta2 = bs2.dbService.executeStaticQuery(query2.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta2 \" + respuesta2); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n if (respuesta2.esVacio()) {\n cliente.setOidEstatusFuturo(null);\n } else {\n {\n BigDecimal oidEstatusFuturo = (BigDecimal) respuesta2\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatusFuturo((oidEstatusFuturo != null) \n ? new Long(oidEstatusFuturo.longValue()) : null);\n }\n }\n }\n // completar periodoPrimerContacto \n {\n BelcorpService bs3;\n RecordSet respuesta3;\n String codigoError3;\n StringBuffer query3 = new StringBuffer();\n\n try {\n bs3 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n try {\n query3.append(\" SELECT A.CLIE_OID_CLIE, \");\n query3.append(\" A.PERD_OID_PERI, \");\n query3.append(\" B.PAIS_OID_PAIS, \");\n query3.append(\" B.CANA_OID_CANA, \");\n query3.append(\" B.MARC_OID_MARC, \");\n query3.append(\" B.FEC_INIC, \");\n query3.append(\" B.FEC_FINA, \");\n query3.append(\" C.COD_PERI \");\n query3.append(\" FROM MAE_CLIEN_PRIME_CONTA A, \");\n query3.append(\" CRA_PERIO B, \");\n query3.append(\" SEG_PERIO_CORPO C \");\n query3.append(\" WHERE A.CLIE_OID_CLIE = \" + oidCliente);\n query3.append(\" AND A.PERD_OID_PERI = B.OID_PERI \");\n query3.append(\" AND B.PERI_OID_PERI = C.OID_PERI \");\n respuesta3 = bs3.dbService.executeStaticQuery(query3.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta3 \" + respuesta3); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n if (respuesta3.esVacio()) {\n cliente.setPeriodoPrimerContacto(null);\n } else {\n Periodo periodo = new Periodo();\n\n {\n BigDecimal oidPeriodo = (BigDecimal) respuesta3\n .getValueAt(0, \"PERD_OID_PERI\");\n periodo.setOidPeriodo((oidPeriodo != null) \n ? new Long(oidPeriodo.longValue()) : null);\n }\n\n periodo.setCodperiodo((String) respuesta3\n .getValueAt(0, \"COD_PERI\"));\n periodo.setFechaDesde((Date) respuesta3\n .getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuesta3\n .getValueAt(0, \"FEC_FINA\"));\n periodo.setOidPais(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"PAIS_OID_PAIS\")).longValue()));\n periodo.setOidCanal(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"CANA_OID_CANA\")).longValue()));\n periodo.setOidMarca(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"MARC_OID_MARC\")).longValue()));\n cliente.setPeriodoPrimerContacto(periodo);\n }\n }\n // completar AmbitoGeografico\n {\n BelcorpService bs4;\n RecordSet respuesta4;\n String codigoError4;\n StringBuffer query4 = new StringBuffer();\n\n try {\n bs4 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n try {\n //jrivas 29/6/2005\n //Modificado INC. 19479\n SimpleDateFormat sdfFormato = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaDesde = sdfFormato.format(peri.getFechaDesde());\n String fechaHasta = sdfFormato.format(peri.getFechaHasta());\n\n query4.append(\" SELECT sub.oid_subg_vent, reg.oid_regi, \");\n query4.append(\" zon.oid_zona, sec.oid_secc, \");\n query4.append(\" terr.terr_oid_terr, \");\n query4.append(\" sec.clie_oid_clie oid_lider, \");\n query4.append(\" zon.clie_oid_clie oid_gerente_zona, \");\n query4.append(\" reg.clie_oid_clie oid_gerente_region, \");\n query4.append(\" sub.clie_oid_clie oid_subgerente \");\n query4.append(\" FROM mae_clien_unida_admin una, \");\n query4.append(\" zon_terri_admin terr, \");\n query4.append(\" zon_secci sec, \");\n query4.append(\" zon_zona zon, \");\n query4.append(\" zon_regio reg, \");\n query4.append(\" zon_sub_geren_venta sub \");\n //jrivas 27/04/2006 INC DBLG50000361\n //query4.append(\" , cra_perio per1, \");\n //query4.append(\" cra_perio per2 \");\n query4.append(\" WHERE una.clie_oid_clie = \" + oidCliente);\n query4.append(\" AND una.ztad_oid_terr_admi = \");\n query4.append(\" terr.oid_terr_admi \");\n query4.append(\" AND terr.zscc_oid_secc = sec.oid_secc \");\n query4.append(\" AND sec.zzon_oid_zona = zon.oid_zona \");\n query4.append(\" AND zon.zorg_oid_regi = reg.oid_regi \");\n query4.append(\" AND reg.zsgv_oid_subg_vent = \");\n query4.append(\" sub.oid_subg_vent \");\n //jrivas 27/04/2006 INC DBLG50000361\n query4.append(\" AND una.perd_oid_peri_fin IS NULL \");\n \n // sapaza -- PER-SiCC-2013-0960 -- 03/09/2013\n //query4.append(\" AND una.ind_acti = 1 \");\n \n /*query4.append(\" AND una.perd_oid_peri_fin = \");\n query4.append(\" AND una.perd_oid_peri_ini = per1.oid_peri \");\n query4.append(\" per2.oid_peri(+) \");\n query4.append(\" AND per1.fec_inic <= TO_DATE ('\" + \n fechaDesde + \"', 'dd/MM/yyyy') \");\n query4.append(\" AND ( per2.fec_fina IS NULL OR \");\n query4.append(\" per2.fec_fina >= TO_DATE ('\" + fechaHasta \n + \"', 'dd/MM/yyyy') ) \");*/\n\n respuesta4 = bs4.dbService.executeStaticQuery(query4.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"respuesta4: \" + respuesta4);\n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n Gerente lider = new Gerente();\n Gerente gerenteZona = new Gerente();\n Gerente gerenteRegion = new Gerente();\n Gerente subGerente = new Gerente();\n\n if (respuesta4.esVacio()) {\n cliente.setAmbitoGeografico(null);\n } else {\n AmbitoGeografico ambito = new AmbitoGeografico();\n ambito.setOidSubgerencia(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBG_VENT\")).longValue()));\n ambito.setOidRegion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_REGI\")).longValue()));\n ambito.setOidZona(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_ZONA\")).longValue()));\n ambito.setOidSeccion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SECC\")).longValue()));\n\n //jrivas 29/6/2005\n //Modificado INC. 19479\n ambito.setOidTerritorio(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"TERR_OID_TERR\")).longValue()));\n\n if (respuesta4.getValueAt(0, \"OID_LIDER\") != null) {\n lider.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_LIDER\")).longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_ZONA\") != null) {\n gerenteZona.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_GERENTE_ZONA\")).longValue()));\n ;\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_REGION\") != null) {\n gerenteRegion.setOidCliente(new Long(((BigDecimal) \n respuesta4.getValueAt(0, \"OID_GERENTE_REGION\"))\n .longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_SUBGERENTE\") != null) {\n subGerente.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBGERENTE\")).longValue()));\n }\n\n ambito.setLider(lider);\n ambito.setGerenteZona(gerenteZona);\n ambito.setGerenteRegion(gerenteRegion);\n ambito.setSubgerente(subGerente);\n\n cliente.setAmbitoGeografico(ambito);\n }\n }\n // completar nombre\n {\n BelcorpService bs5;\n RecordSet respuesta5;\n String codigoError5;\n StringBuffer query5 = new StringBuffer();\n\n try {\n bs5 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n try {\n query5.append(\" SELECT OID_CLIE, \");\n query5.append(\" VAL_APE1, \");\n query5.append(\" VAL_APE2, \");\n query5.append(\" VAL_NOM1, \");\n query5.append(\" VAL_NOM2 \");\n query5.append(\" FROM MAE_CLIEN \");\n query5.append(\" WHERE OID_CLIE = \" + oidCliente.longValue());\n respuesta5 = bs5.dbService.executeStaticQuery(query5.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta5 \" + respuesta5);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n if (respuesta5.esVacio()) {\n cliente.setNombre(null);\n } else {\n \n if(respuesta5.getValueAt(0, \"VAL_NOM1\")!=null) {\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_NOM2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM2\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE1\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE2\"));\n }\n \n cliente.setNombre(nombreCli.toString());\n }\n }\n\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Salida\");\n return cliente;\n }",
"@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}",
"public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }",
"public void cadastrar(Cliente cliente){\n\t\tSystem.out.println(cliente.toString());\r\n\t\tint tamanho = this.clientes.length;\r\n\t\tthis.clientes = Arrays.copyOf(this.clientes, this.clientes.length + 1);\r\n\t\tthis.clientes[tamanho - 1] = cliente;\r\n\t}",
"public static List<ClientesVO> listarClientes() throws Exception {\r\n\r\n List<ClientesVO> vetorClientes = new ArrayList<ClientesVO>();\r\n\r\n try {\r\n ConexaoDAO.abreConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Construçao do objeto Statement e ligaçao com a variavel de conexao\r\n stClientes = ConexaoDAO.connSistema.createStatement();\r\n\r\n //SELECT NO BANCO\r\n String sqlLista = \"Select * from clientes\";\r\n\r\n //Executando select e armazenando dados no ResultSet\r\n rsClientes = stClientes.executeQuery(sqlLista);\r\n\r\n while (rsClientes.next()) {//enquanto houver clientes\r\n ClientesVO tmpCliente = new ClientesVO();\r\n\r\n tmpCliente.setIdCliente(rsClientes.getInt(\"id_cliente\"));\r\n tmpCliente.setCodigo(rsClientes.getInt(\"cod_cliente\"));\r\n tmpCliente.setNome(rsClientes.getString(\"nome_cliente\"));\r\n tmpCliente.setCidade(rsClientes.getString(\"cid_cliente\"));\r\n tmpCliente.setTelefone(rsClientes.getString(\"tel_cliente\"));\r\n\r\n vetorClientes.add(tmpCliente);\r\n\r\n }\r\n\r\n } catch (Exception erro) {\r\n throw new Exception(\"Falha na listagem de dados. Verifique a sintaxe da instruçao SQL\\nErro Original:\" + erro.getMessage());\r\n }\r\n\r\n try {\r\n ConexaoDAO.fechaConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n return vetorClientes;\r\n }",
"public List<Cliente> getClientes() {\n List<Cliente> cli = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/archivo.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String nombreCliente = st.nextToken();\n String nombreEmpresa = st.nextToken();\n String ciudad = st.nextToken();\n String deuda = st.nextToken();\n String precioVentaSaco = st.nextToken();\n\n Cliente cliente = new Cliente(\n Integer.parseInt(id),\n nombreCliente,\n nombreEmpresa,\n ciudad,\n Float.parseFloat(deuda),\n Float.parseFloat(precioVentaSaco)\n );\n\n cli.add(cliente);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return cli;\n }",
"public List<Client> getAllClient() {\n \tTypedQuery<Client> query = em.createQuery(\n \"SELECT g FROM Client g ORDER BY g.id\", Client.class);\n \treturn query.getResultList();\n }",
"private Cliente obtenerCliente(Long oidCliente, Solicitud solicitud)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente,\"\n +\"Solicitud solicitud):Entrada\");\n\n /*Descripcion: este metodo retorna un objeto de la clase Cliente\n con todos sus datos recuperados.\n\n Implementacion:\n\n 1- Invocar al metodo obtenerDatosGeneralesCliente pasandole por\n parametro el oidCliente. Este metodo retornara un objeto de la clase\n Cliente el cual debe ser asignado a la propiedad cliente de la \n Solicitud.\n 2- Invocar al metodo obtenerTipificacionesCliente pasandole por\n parametro el objeto cliente. Este metodo creara un array de objetos\n de la clase TipificacionCliente el cual asignara al atributo\n tipificacionCliente del cliente pasado por parametro.\n 3- Invocar al metodo obtenerHistoricoEstatusCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase HistoricoEstatusCliente al atributo \n historicoEstatusCliente\n del cliente pasado por parametro.\n 4- Invocar al metodo obtenerPeriodosConPedidosCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase Periodo al atributo periodosConPedidos del cliente pasado\n por parametro.\n 5- Invocar al metodo obtenerClienteRecomendante pasandole por\n parametro el objeto cliente. Este metodo asignara un objeto de la\n calse ClienteRecomendante al atributo clienteRecomendante del cliente\n recibido por parametro.\n 6- Invocar al metodo obtenerDatosGerentes pasandole por parametro el\n objeto cliente.\n */\n\n //1\n Cliente cliente = this.obtenerDatosGeneralesCliente(oidCliente, \n solicitud.getPeriodo());\n solicitud.setCliente(cliente);\n\n //2\n UtilidadesLog.debug(\"****obtenerCliente 1****\");\n this.obtenerTipificacionesCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 2****\");\n\n //3\n this.obtenerHistoricoEstatusCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 3****\");\n\n //4\n this.obtenerPeriodosConPedidosCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 4****\");\n\n //5\n //jrivas 4/7/2005\n //Inc 16978 \n this.obtenerClienteRecomendante(cliente, solicitud.getOidPais());\n\n // 5.1\n // JVM - sicc 20070237, calling obtenerClienteRecomendado\n this.obtenerClienteRecomendado(cliente, solicitud.getOidPais());\n\n //6\n this.obtenerDatosGerentes(cliente, solicitud.getPeriodo());\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Salio de obtenerCliente - DAOSolicitudes\");\n \n // vbongiov 22/9/2005 inc 20940\n cliente.setIndRecomendante(this.esClienteRecomendante(cliente.getOidCliente(), solicitud.getPeriodo()));\n\n // jrivas 30/8//2006 inc DBLG5000839\n cliente.setIndRecomendado(this.esClienteRecomendado(cliente.getOidCliente(), solicitud.getPeriodo()));\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente, \"\n +\"Solicitud solicitud):Salida\");\n return cliente;\n }",
"public List<Cliente> getClientes() {\n\t\ttry {\n\t\t\t\n\t\t\tList<Cliente> clientes = (List<Cliente>) db.findAll();\n\t\t\t\t\t\n\t\t\treturn clientes;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ArrayList<Cliente>();\n\n\t\t}\n\t}",
"public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}",
"@Override\n\tpublic List<Clientes> findAllClientes() throws Exception {\n\t\treturn clienteLogic.findAll();\n\t}",
"public AreaClientes() {\n initComponents();\n cargarTabla();\n editarCliente(false);\n \n }",
"private List<OrarioIngressoUscita> getOrariIngressoUscita(Cliente cliente) throws IOException {\r\n\t\tString userID = cliente.getId();\r\n\t\tBufferedReader reader = Utilities.apriFile(\"orariIngressoUscita.txt\");\r\n\t\t\r\n\t\tString currentLine;\r\n\t\tString[] user = new String[200];\r\n\t\t\r\n\t\tList<OrarioIngressoUscita> result = new ArrayList<>();\r\n\t\t\r\n\t\twhile ((currentLine = reader.readLine()) != null) {\r\n\t\t\tuser = currentLine.split(Pattern.quote(\"|\"));\r\n\t\t\t\r\n\t\t\tif (user[0].equals(userID) && \r\n\t\t\t\t\tcliente.getTes().getUltimoAggiornamento().isAfter(LocalDateTime.parse(user[1], Utilities.formatterDataOra)))\r\n\t\t\t\tif (!user[2].equals(\"null\"))\r\n\t\t\t\t\tresult.add(new OrarioIngressoUscita(LocalDateTime.parse(user[1], Utilities.formatterDataOra), \r\n\t\t\t\t\t\t\tLocalDateTime.parse(user[2], Utilities.formatterDataOra)));\r\n\t\t}\r\n\t\t\r\n\t\treader.close();\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"Set<Client> getAllClients();",
"void realizarSolicitud(Cliente cliente);",
"public List<Persona> getAllClientes() throws Exception {\n\t\tDAOPersona dao = new DAOPersona();\n\t\tList<Persona> clientes;\n\t\ttry \n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tclientes = dao.getClientes();\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\treturn clientes;\n\t}",
"private static Cliente llenarDatosCliente() {\r\n\t\tCliente cliente1 = new Cliente();\r\n\t\tcliente1.setApellido(\"De Assis\");\r\n\t\tcliente1.setDni(368638373);\r\n\t\tcliente1.setNombre(\"alexia\");\r\n\t\tcliente1.setId(100001);\r\n\r\n\t\treturn cliente1;\r\n\t}",
"public AgregarClientes(Directorio directorio) {\n initComponents();\n this.directorio=directorio;\n \n \n }",
"@GetMapping(\"/clientes\")\r\n\tpublic List<Cliente> listar(){\r\n\t\treturn iClienteServicio.findAll();\r\n\t\t\r\n\t}",
"@Override\n\tpublic List<Cliente> getAll() throws ExceptionUtil {\n\t\treturn null;\n\t}",
"public Lista obtenerListaClientesAdicionales(int codigoCuenta)throws SQLException{\r\n\t\tLista listadoCliente=null;\r\n\t\tICuenta daoCliente = new DCuenta();\r\n\t\t\r\n\t\tlistadoCliente = daoCliente.obtenerListadoCuentaAdicional(codigoCuenta);\r\n\t\t\r\n\t\treturn listadoCliente;\r\n\t}",
"@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}",
"@Override\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}",
"@Override\n\tpublic ArrayList<ClienteBean> listarClientes() throws Exception {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void buscarCliente(String dato) {\n\t\tList<Cliente> listaEncontrados = clienteDao.buscarContrato(dato);\r\n\t\tvistaCliente.mostrarClientes(listaEncontrados);\r\n\t}",
"@Override\n\tpublic List<Cliente> getAll() {\n\t\treturn null;\n\t}",
"@Override\n\t@Transactional\n\tpublic List<Cliente> getAll(Long idCliente) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> client =getCurrentSession().createQuery(\"from Cliente where activo=true and id='\"+idCliente+\"'\").list();\n \treturn client;\n\t}",
"@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}",
"@Override\n\tpublic List<EntidadeDominio> PegarCartoesCliente(EntidadeDominio entidade) throws SQLException {\n\t\treturn null;\n\t}",
"public List<ClienteDto> recuperaTodos(){\n\t\tList<ClienteDto> clientes = new ArrayList<ClienteDto>();\n\t\tclienteRepository.findAll().forEach(cliente -> clientes.add(ClienteDto.creaDto(cliente)));\n\t\treturn clientes;\n\t}",
"public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}",
"public List<Client> listerTousClients() throws DaoException {\n\t\ttry {\n\t\t\treturn daoClient.findAll();\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.listerTousClients\" + e);\n\t\t}\n\t}",
"@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}",
"public List<PedidoIndividual> obtenerCuentaCliente(Long idCliente,String claveMesa) throws QRocksException;",
"public List<Client> displayClient ()\r\n {\r\n List<Client> clientListe = new ArrayList<Client>();\r\n String sqlrequest = \"SELECT idCLient,nom,prenom,email,nbrSignalisation FROM pi_dev.client ;\";\r\n try {\r\n PreparedStatement ps = MySQLConnection.getInstance().prepareStatement(sqlrequest);\r\n ResultSet resultat = ps.executeQuery(sqlrequest);\r\n while (resultat.next()){\r\n Client client = new Client();\r\n \r\n \r\n client.setEmail(resultat.getString(\"email\"));\r\n client.setIdClient(resultat.getInt(\"idClient\"));\r\n client.setNom(resultat.getString(\"nom\"));\r\n client.setPrenom(resultat.getString(\"prenom\"));\r\n client.setNbrSignalisation(resultat.getInt(\"nbrSignalisation\"));\r\n \r\n clientListe.add(client);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ClientDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return clientListe;\r\n }",
"public List<Order> getOrderByClient(Client client) throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id where client_id=? ;\";\n\n\t\tDB db = new DB();\n\n\t\tList<Order> orders = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\tstmt.setString(1,client.getId() );\n\t\t\trs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\torders.add( new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_paymentmethod\"), client, vendor ) );\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn orders;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"public void obtenerTipificacionesCliente(Participante cliente)\n throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n if (cliente.getOidCliente() == null) {\n cliente.setTipificacionCliente(null);\n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- NULO : \");\n UtilidadesLog.debug(\"---- cliente : \" + cliente.getOidCliente());\n } \n } else {\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT CLIE_OID_CLIE, \");\n query.append(\" CLAS_OID_CLAS, \");\n query.append(\" SBTI_OID_SUBT_CLIE, \");\n query.append(\" TCCL_OID_TIPO_CLASI, \");\n query.append(\" TICL_OID_TIPO_CLIE \");\n query.append(\" FROM V_MAE_TIPIF_CLIEN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- TIPIF : \" + respuesta);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setTipificacionCliente(null);\n } else {\n TipificacionCliente[] tipificaciones = new TipificacionCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n tipificaciones[i] = new TipificacionCliente();\n\n {\n BigDecimal oidClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"CLAS_OID_CLAS\");\n tipificaciones[i].setOidClasificacionCliente((\n oidClasificacionCliente != null) ? new Long(\n oidClasificacionCliente.longValue()) : null);\n }\n\n tipificaciones[i].setOidSubTipoCliente(new Long((\n (BigDecimal) respuesta\n .getValueAt(i, \"SBTI_OID_SUBT_CLIE\")).longValue()));\n\n {\n BigDecimal oidTipoClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"TCCL_OID_TIPO_CLASI\");\n tipificaciones[i].setOidTipoClasificacionCliente(\n (oidTipoClasificacionCliente != null)? new Long(\n oidTipoClasificacionCliente.longValue()) \n : null);\n }\n\n tipificaciones[i].setOidTipoCliente(new Long(((BigDecimal)\n respuesta.getValueAt(i, \"TICL_OID_TIPO_CLIE\"))\n .longValue()));\n }\n\n cliente.setTipificacionCliente(tipificaciones);\n }\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Salida\");\n }",
"public DTOCliente obtenerCliente(DTOOID oid) throws MareException {\n UtilidadesLog.info(\" DAOMAEMaestroClientes.obtenerCliente(DTOOID): Entrada\");\n\n Boolean bUsaGEOREFERENCIADOR = Boolean.FALSE;\n MONMantenimientoSEG mms;\n DTOCliente dtosalida = new DTOCliente();\n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n RecordSet resultado = new RecordSet();\n RecordSet rTipoSubtipo = null;\n RecordSet rIdentificacion = null;\n RecordSet rClienteMarca = null;\n RecordSet rClasificacion = null;\n RecordSet rVinculo = null;\n RecordSet rPreferencias = null;\n RecordSet rObservacion = null;\n RecordSet rComunicaciones = null;\n RecordSet rTarjetas = null;\n RecordSet rProblemaSolucion = null;\n RecordSet rPsicografia = null;\n StringBuffer query = new StringBuffer();\n \n\n try {\n\n DTOCrearClienteBasico dto = new DTOCrearClienteBasico();\n \n query.append(\" SELECT oid_clie_tipo_subt, vtipo.val_i18n, vsubtipo.val_i18n, \");\n query.append(\" ticl_oid_tipo_clie, sbti_oid_subt_clie, ind_ppal \");\n query.append(\" FROM mae_clien_tipo_subti t, \");\n query.append(\" v_gen_i18n_sicc vtipo, \");\n query.append(\" v_gen_i18n_sicc vsubtipo \");\n query.append(\" WHERE t.clie_oid_clie = \" + oid.getOid());\n query.append(\" AND vtipo.attr_enti = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND vtipo.idio_oid_idio = \" + oid.getOidIdioma());\n query.append(\" AND vtipo.attr_num_atri = 1 \");\n query.append(\" AND vtipo.val_oid = t.ticl_oid_tipo_clie \");\n query.append(\" AND vsubtipo.attr_enti = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND vsubtipo.idio_oid_idio = \" + oid.getOidIdioma());\n query.append(\" AND vsubtipo.attr_num_atri = 1 \");\n query.append(\" AND vsubtipo.val_oid = t.sbti_oid_subt_clie \");\n query.append(\" ORDER BY t.ind_ppal DESC \");\n rTipoSubtipo = bs.dbService.executeStaticQuery(query.toString());\n\n dto.setRTipoSubtipoCliente(rTipoSubtipo);\n\n //DTOIdentificacion[]\n query = new StringBuffer();\n\n query.append(\" SELECT oid_clie_iden, tdoc_oid_tipo_docu, \");\n query.append(\" num_docu_iden, num_docu_iden, \");\n query.append(\" decode (val_iden_docu_prin, 1, 'S', 'N'), val_iden_pers_empr \");\n query.append(\" FROM mae_clien_ident i \");\n query.append(\" WHERE i.clie_oid_clie = \" + oid.getOid()); \n\n rIdentificacion = bs.dbService.executeStaticQuery(query.toString());\n\n dto.setRIdentificacionCliente(rIdentificacion);\n\n query = new StringBuffer();\n query.append(\" select COD_CLIE, COD_DIGI_CTRL, VAL_APE1, VAL_APE2, VAL_APEL_CASA, VAL_NOM1, \");\n query.append(\" VAL_NOM2, VAL_TRAT, COD_SEXO, FEC_INGR, FOPA_OID_FORM_PAGO \");\n query.append(\" from MAE_CLIEN \");\n query.append(\" where OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n dto.setCodigoCliente((String) resultado.getValueAt(0, 0));\n dto.setDigitoControl((String) resultado.getValueAt(0, 1));\n dto.setApellido1((String) resultado.getValueAt(0, 2));\n dto.setApellido2((String) resultado.getValueAt(0, 3));\n dto.setApellidoCasada((String) resultado.getValueAt(0, 4));\n dto.setNombre1((String) resultado.getValueAt(0, 5));\n dto.setNombre2((String) resultado.getValueAt(0, 6));\n dto.setTratamiento((String) resultado.getValueAt(0, 7));\n dto.setSexo((String) resultado.getValueAt(0, 8));\n dto.setFechaIngreso((Date) resultado.getValueAt(0, 9));\n\n BigDecimal formPago = (BigDecimal) resultado.getValueAt(0, 10);\n\n if (formPago != null) {\n dto.setFormaPago(new Long(formPago.longValue()));\n }\n }\n\n //DTOClienteMarca[]\n query = new StringBuffer();\n query.append(\" select OID_CLIE_MARC, MARC_OID_MARC, IND_PPAL \");\n query.append(\" from MAE_CLIEN_MARCA \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n /* rClienteMarca = bs.dbService.executeStaticQuery(query.toString()); */\n resultado = bs.dbService.executeStaticQuery(query.toString()); \n\n DTOClienteMarca[] dtots2 = new DTOClienteMarca[resultado.getRowCount()];\n DTOClienteMarca dtos2;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos2 = new DTOClienteMarca();\n dtos2.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos2.setMarca(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n dtos2.setPrincipal((((BigDecimal) resultado.getValueAt(i, 2)).toString()).equals(\"1\") ? Boolean.TRUE : Boolean.FALSE);\n dtots2[i] = dtos2;\n }\n\n dto.setMarcas(dtots2);\n /* dto.setRClienteMarca(rClienteMarca); */\n \n\n //DTOClasificacionCliente[]\n query = new StringBuffer();\n\n query.append(\" SELECT c.oid_clie_clas, marca.des_marc, v3.val_i18n, v1.val_i18n, \");\n query.append(\" v2.val_i18n, v4.val_i18n, v5.val_i18n, p.marc_oid_marc, \");\n query.append(\" p.cana_oid_cana, ticl_oid_tipo_clie, t.sbti_oid_subt_clie, \");\n query.append(\" c.tccl_oid_tipo_clasi, c.clas_oid_clas, c.ind_ppal \");\n query.append(\" FROM mae_clien_clasi c, \");\n query.append(\" cra_perio p, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" v_gen_i18n_sicc v1, \");\n query.append(\" v_gen_i18n_sicc v2, \");\n query.append(\" seg_marca marca, \");\n query.append(\" v_gen_i18n_sicc v3, \");\n query.append(\" v_gen_i18n_sicc v4, \");\n query.append(\" v_gen_i18n_sicc v5 \");\n query.append(\" WHERE c.perd_oid_peri = p.oid_peri \");\n query.append(\" AND t.oid_clie_tipo_subt = c.ctsu_oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND t.ticl_oid_tipo_clie = v1.val_oid \");\n query.append(\" AND p.marc_oid_marc = marca.oid_marc \");\n query.append(\" AND p.cana_oid_cana = v3.val_oid \");\n query.append(\" AND v3.attr_num_atri = 1 \");\n query.append(\" AND v3.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v3.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND t.ticl_oid_tipo_clie = v1.val_oid \");\n query.append(\" AND v1.attr_num_atri = 1 \");\n query.append(\" AND v1.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v1.attr_enti = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND t.sbti_oid_subt_clie = v2.val_oid \");\n query.append(\" AND v2.attr_num_atri = 1 \");\n query.append(\" AND v2.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v2.attr_enti = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND c.tccl_oid_tipo_clasi = v4.val_oid \");\n query.append(\" AND v4.attr_num_atri = 1 \");\n query.append(\" AND v4.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v4.attr_enti = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" AND c.clas_oid_clas = v5.val_oid \");\n query.append(\" AND v5.attr_num_atri = 1 \");\n query.append(\" AND v5.idio_oid_idio = \" + oid.getOidIdioma().toString());\n query.append(\" AND v5.attr_enti = 'MAE_CLASI' \");\n query.append(\" ORDER BY c.ind_ppal DESC \");\n\n /* rClasificacion = bs.dbService.executeStaticQuery(query.toString());*/\n resultado = bs.dbService.executeStaticQuery(query.toString());\n int cantClasi = resultado.getRowCount();\n UtilidadesLog.debug(\"cantidad de Clasificaciones_\" + cantClasi);\n DTOClasificacionCliente[] dtots3 = new DTOClasificacionCliente[0];\n DTOClasificacionCliente dtos3;\n \n if (!resultado.esVacio()) {\n dtots3 = new DTOClasificacionCliente[cantClasi];\n for (int i = 0; i < cantClasi; i++) {\n dtos3 = new DTOClasificacionCliente();\n dtos3.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos3.setMarcaDesc((String) resultado.getValueAt(i, 1));\n dtos3.setCanalDesc((String) resultado.getValueAt(i, 2));\n dtos3.setTipoDesc((String) resultado.getValueAt(i, 3));\n dtos3.setSubtipoDesc((String) resultado.getValueAt(i, 4));\n dtos3.setTipoClasificacionDesc((String) resultado.getValueAt(i, 5));\n dtos3.setClasificacionDesc((String) resultado.getValueAt(i, 6));\n\n dtos3.setMarca(new Long(((BigDecimal) resultado.getValueAt(i, 7)).longValue()));\n dtos3.setCanal(new Long(((BigDecimal) resultado.getValueAt(i, 8)).longValue()));\n dtos3.setTipo(new Long(((BigDecimal) resultado.getValueAt(i, 9)).longValue()));\n dtos3.setSubtipo(new Long(((BigDecimal) resultado.getValueAt(i, 10)).longValue()));\n dtos3.setTipoClasificacion(new Long(((BigDecimal) resultado.getValueAt(i, 11)).longValue()));\n dtos3.setClasificacion(new Long(((BigDecimal) resultado.getValueAt(i, 12)).longValue()));\n dtos3.setPrincipal((((BigDecimal) resultado.getValueAt(i, 13)).toString()).equals(\"1\") ? Boolean.TRUE : Boolean.FALSE);\n dtots3[i] = dtos3;\n }\n } else {\n UtilidadesLog.debug(\"sin clasificaciones\");\n // BELC300023061 - 04/07/2006\n // Si no se obtuvo ninguna clasificacion para el cliente en la consulta anterior, \n // insertar una fila en el atributo clasificaciones, con el indicador principal activo, \n // sólo con la marca y el canal\n query = new StringBuffer();\n \n query.append(\" SELECT null OID_CLIE_CLAS, mar.DES_MARC, iCa.VAL_I18N, \");\n query.append(\" null VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N,\t\");\n query.append(\" per.MARC_OID_MARC, per.CANA_OID_CANA, \");\n query.append(\" null TICL_OID_TIPO_CLIE, null SBTI_OID_SUBT_CLIE, null TCCL_OID_TIPO_CLASI, null CLAS_OID_CLAS, null IND_PPAL \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN uA, \");\n query.append(\" CRA_PERIO per, \t\");\n query.append(\" SEG_MARCA mar, \");\n query.append(\" V_GEN_I18N_SICC iCa \");\n query.append(\" WHERE uA.CLIE_OID_CLIE = \" + oid.getOid().toString());\n query.append(\" AND uA.IND_ACTI = 1 \");\n query.append(\" AND uA.PERD_OID_PERI_INI = per.OID_PERI \");\n query.append(\" AND per.MARC_OID_MARC = mar.OID_MARC \");\n query.append(\" AND per.CANA_OID_CANA = iCa.VAL_OID \");\n query.append(\" AND iCa.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND iCa.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND iCa.IDIO_OID_IDIO = \" + oid.getOidIdioma().toString());\n query.append(\" ORDER BY uA.OID_CLIE_UNID_ADMI ASC \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n \n if (!resultado.esVacio()) {\n dtos3 = new DTOClasificacionCliente();\n dtos3.setMarcaDesc((String) resultado.getValueAt(0, 1));\n dtos3.setCanalDesc((String) resultado.getValueAt(0, 2));\n dtos3.setMarca(new Long(((BigDecimal) resultado.getValueAt(0, 7)).longValue()));\n dtos3.setCanal(new Long(((BigDecimal) resultado.getValueAt(0, 8)).longValue()));\n dtos3.setPrincipal(Boolean.TRUE);\n \n dtots3 = new DTOClasificacionCliente[1];\n dtots3[0] = dtos3; \n }\n }\n \n dto.setClasificaciones(dtots3);\n \n /*dto.setRClasificacionCliente(rClasificacion);*/\n\n MONMantenimientoSEGHome mmsHome = SEGEjbLocators.getMONMantenimientoSEGHome();\n mms = mmsHome.create();\n bUsaGEOREFERENCIADOR = mms.usaGeoreferenciador(oid.getOidPais());\n dto.setUsaGeoreferenciador(bUsaGEOREFERENCIADOR);\n\n dtosalida.setBase(dto);\n\n //criterioBusqueda 1 y 2 queda a null\n dtosalida.setCriterioBusqueda1(null);\n dtosalida.setCriterioBusqueda2(null);\n\n //oid: dto.oid \n dtosalida.setOid(oid.getOid());\n\n //-fechaNacimiento, codigoEmpleado, nacionalidad, estadoCivil, \n //ocupacion, profesion, centroTrabajo, cargo, nivelEstudios, centroEstudios, \n //numeroHijos, personasDependientes, NSEP, cicloVida, deseaCorrespondencia, \n //cicloVida, deseaCorrespondencia, importeIngresos \n query = new StringBuffer();\n query.append(\" select FEC_NACI, COD_EMPL, IND_ACTI,SNON_OID_NACI, ESCV_OID_ESTA_CIVI, VAL_OCUP, VAL_PROF, \");\n query.append(\" VAL_CENT_TRAB, VAL_CARG_DESE, NIED_OID_NIVE_ESTU, VAL_CENT_ESTU, \");\n query.append(\" NUM_HIJO, NUM_PERS_DEPE, NSEP_OID_NSEP, TCLV_OID_CICL_VIDA, IND_CORR, IMP_INGR_FAMI \");\n query.append(\" from MAE_CLIEN_DATOS_ADICI \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n dtosalida.setFechaNacimiento((Date) resultado.getValueAt(0, 0));\n dtosalida.setCodigoEmpleado((String) resultado.getValueAt(0, 1));\n //SICC-DMCO-MAE-GCC-006 - Cleal\n dtosalida.setIndicadorActivo((resultado.getValueAt(0, 2) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 2)).longValue()) : null);\n \n \n dtosalida.setNacionalidad((resultado.getValueAt(0, 3) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 3)).longValue()) : null);\n dtosalida.setEstadoCivil((resultado.getValueAt(0, 4) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 4)).longValue()) : null);\n \n dtosalida.setOcupacion((String) resultado.getValueAt(0, 5));\n\n dtosalida.setProfesion((String) resultado.getValueAt(0, 6));\n dtosalida.setCentroTrabajo((String) resultado.getValueAt(0, 7));\n dtosalida.setCargo((String) resultado.getValueAt(0, 8));\n dtosalida.setNivelEstudios((resultado.getValueAt(0, 9) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 9)).longValue()) : null);\n dtosalida.setCentroEstudios((String) resultado.getValueAt(0, 10));\n dtosalida.setNumeroHijos((resultado.getValueAt(0, 11) != null) ? new Byte(((BigDecimal) resultado.getValueAt(0, 11)).byteValue()) : null);\n dtosalida.setPersonasDependientes((resultado.getValueAt(0, 12) != null) ? new Byte(((BigDecimal) resultado.getValueAt(0, 12)).byteValue()) : null);\n dtosalida.setNSEP((resultado.getValueAt(0, 13) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 13)).longValue()) : null);\n dtosalida.setCicloVida((resultado.getValueAt(0, 14) != null) ? new Long(((BigDecimal) resultado.getValueAt(0, 14)).longValue()) : null);\n\n BigDecimal corres = (BigDecimal) resultado.getValueAt(0, 15);\n Boolean correspondencia = null;\n\n if (corres != null) {\n if (corres.toString().equals(\"1\")) {\n correspondencia = Boolean.TRUE;\n } else {\n correspondencia = Boolean.FALSE;\n }\n }\n\n dtosalida.setDeseaCorrespondencia(correspondencia);\n dtosalida.setImporteIngresos((resultado.getValueAt(0, 16) != null) ? new Double(((BigDecimal) resultado.getValueAt(0, 16)).doubleValue()) : null);\n \n }\n\n //DTOVinculo[]\n query = new StringBuffer();\n\n\n /* \n * Cambios a restriccion por xxx_vnte y vndo hechas por ssantana, \n * 07/04/2006, porque no tenian mucho sentido como estaban antes \n */ \n query.append(\" SELECT oid_clie_vinc, c.cod_clie, \");\n query.append(\" tivc_oid_tipo_vinc, fec_desd, fec_hast, \");\n query.append(\" ind_vinc_ppal \");\n query.append(\" FROM mae_clien_vincu, mae_tipo_vincu tv, seg_pais p, mae_clien c \");\n /*inicio modificado ciglesias 17/11/2006 incidencia 24377*/\n query.append(\" WHERE clie_oid_clie_vndo = \" + oid.getOid());\n query.append(\" AND mae_clien_vincu.tivc_oid_tipo_vinc = tv.oid_tipo_vinc \");\n query.append(\" AND mae_clien_vincu.clie_oid_clie_vnte = c.oid_clie \");\n /*fin modificado ciglesias 17/11/2006 incidencia 24377*/\n query.append(\" AND tv.pais_oid_pais = p.oid_pais \");\n query.append(\" ORDER BY ind_vinc_ppal DESC \");\n\n rVinculo = bs.dbService.executeStaticQuery(query.toString());\n\n\n \n dtosalida.setRVinculo(rVinculo);\n\n //DTOPreferencia[]\t\t\t\n query = new StringBuffer();\n query.append(\" select OID_CLIE_PREF, TIPF_OID_TIPO_PREF, DES_CLIE_PREF \");\n query.append(\" from MAE_CLIEN_PREFE \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n rPreferencias = bs.dbService.executeStaticQuery(query.toString());\n\n dtosalida.setRPreferencia(rPreferencias);\n\n //DTOObservacion[]\t\t\t\n query = new StringBuffer();\n query.append(\" select OID_OBSE, MARC_OID_MARC, NUM_OBSE, VAL_TEXT \");\n query.append(\" from MAE_CLIEN_OBSER \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n rObservacion = bs.dbService.executeStaticQuery(query.toString());\n\n dtosalida.setRObservaciones(rObservacion);\n\n //paisContactado, clienteContactado, oidClienteContactado, tipoClienteContactado, \n //tipoContacto, fechaPrimerContacto, fechaSiguienteContacto, fechaPrimerPedidoContacto\n query = new StringBuffer();\n\n // Nueva query by ssantana\n query.append(\" SELECT c.pais_oid_pais, c.cod_clie, t.clie_oid_clie, t.ticl_oid_tipo_clie, \");\n query.append(\" p.cod_tipo_cont, p.fec_cont, p.fec_sigu_cont, canal.oid_cana, \");\n query.append(\" marca.oid_marc, perio.oid_peri \");\n query.append(\" FROM mae_clien c, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" mae_clien_prime_conta p, \");\n query.append(\" seg_canal canal, \");\n query.append(\" seg_marca marca, \");\n query.append(\" cra_perio perio \");\n query.append(\" WHERE p.ctsu_clie_cont = t.oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = c.oid_clie \");\n query.append(\" AND p.clie_oid_clie = \" + oid.getOid().toString());\n \n // modif. - splatas - 25/10/2006 - DBLG700000168\n // query.append(\" AND t.ind_ppal = 1 \");\n \n query.append(\" AND p.cana_oid_cana = canal.oid_cana(+) \");\n query.append(\" AND p.marc_oid_marc = marca.oid_marc(+) \");\n query.append(\" AND p.perd_oid_peri = perio.oid_peri(+) \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n BigDecimal buffer = null;\n dtosalida.setPaisContactado(new Long(((BigDecimal) resultado.getValueAt(0, 0)).longValue()));\n dtosalida.setClienteContactado((String) resultado.getValueAt(0, 1));\n dtosalida.setOidClienteContactado(new Long(((BigDecimal) resultado.getValueAt(0, 2)).longValue()));\n dtosalida.setTipoClienteContactado(new Long(((BigDecimal) resultado.getValueAt(0, 3)).longValue()));\n dtosalida.setTipoContacto((String) (resultado.getValueAt(0, 4)));\n dtosalida.setFechaPrimerContacto((Date) resultado.getValueAt(0, 5));\n dtosalida.setFechaSiguienteContacto((Date) resultado.getValueAt(0, 6));\n\n buffer = (BigDecimal) resultado.getValueAt(0, 7); // Canal Contacto\n\n if (buffer != null) {\n dtosalida.setCanalContacto(Long.valueOf(buffer.toString()));\n } else {\n dtosalida.setCanalContacto(null);\n }\n\n buffer = (BigDecimal) resultado.getValueAt(0, 8); // Marca Contacto\n\n if (buffer != null) {\n dtosalida.setMarcaContacto(new Long(buffer.longValue()));\n } else {\n dtosalida.setMarcaContacto(null);\n }\n\n buffer = (BigDecimal) resultado.getValueAt(0, 9); // Periodo Contacto\n\n if (buffer != null) {\n dtosalida.setPeriodoContacto(new Long(buffer.longValue()));\n } else {\n dtosalida.setPais(null);\n }\n }\n\n //tipoClienteContacto\n query = new StringBuffer();\n query.append(\" SELECT TICL_OID_TIPO_CLIE \");\n query.append(\" FROM MAE_CLIEN_TIPO_SUBTI \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND IND_PPAL = 1 \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (resultado.getRowCount() > 0) {\n dtosalida.setTipoClienteContacto(new Long(((BigDecimal) resultado.getValueAt(0, 0)).longValue()));\n }\n\n // DTODirecciones\n resultado = new RecordSet();\n UtilidadesLog.debug(\" Direcciones \");\n /*\n query = new StringBuffer();\n query.append(\" SELECT dir.OID_CLIE_DIRE, dir.TIDC_OID_TIPO_DIRE, dir.TIVI_OID_TIPO_VIA, \");\n query.append(\" val.OID_VALO_ESTR_GEOP, dir.ZVIA_OID_VIA, dir.NUM_PPAL, dir.VAL_COD_POST, \");\n query.append(\" dir.VAL_OBSE, dir.IND_DIRE_PPAL, dir.VAL_NOMB_VIA, val.DES_GEOG \");\n query.append(\" FROM MAE_CLIEN_DIREC dir, ZON_VALOR_ESTRU_GEOPO val, ZON_TERRI terr \");\n query.append(\" WHERE dir.CLIE_OID_CLIE = \" + oid.getOid() + \" AND \");\n query.append(\" dir.TERR_OID_TERR = terr.OID_TERR AND \");\n query.append(\" terr.VEPO_OID_VALO_ESTR_GEOP = val.OID_VALO_ESTR_GEOP \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n UtilidadesLog.info(\"resulado Dir: \" + resultado.toString());\n */\n if(Boolean.FALSE.equals(bUsaGEOREFERENCIADOR)){\n UtilidadesLog.debug(\"*** No usa GEO\");\n resultado = obtieneDireccionSinGEOModificar(oid);\n } else{\n UtilidadesLog.debug(\"*** Usa GEO\");\n resultado = obtieneDireccionConGEOModificar(oid);\n }\n if (resultado.getRowCount() == 0) {\n dto.setDirecciones(null);\n } else {\n int cantFilas = resultado.getRowCount();\n DTODireccion[] arrayDirecciones = new DTODireccion[cantFilas];\n DTODireccion dir = null;\n\n for (int i = 0; i < cantFilas; i++) {\n dir = new DTODireccion();\n\n if (resultado.getValueAt(i, 0) == null) {\n dir.setOid(null);\n } else {\n dir.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n }\n\n if (resultado.getValueAt(i, 1) == null) {\n dir.setTipoDireccion(null);\n } else {\n dir.setTipoDireccion(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n }\n\n if (resultado.getValueAt(i, 2) == null) {\n dir.setTipoVia(null);\n } else {\n dir.setTipoVia(new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue()));\n }\n\n if (resultado.getValueAt(i, 3) == null) {\n dir.setUnidadGeografica(null);\n } else {\n dir.setUnidadGeografica(new Long(((BigDecimal) resultado.getValueAt(i, 3)).longValue()));\n }\n\n if (resultado.getValueAt(i, 4) == null) {\n dir.setVia(null);\n } else {\n dir.setVia(new Long(((BigDecimal) resultado.getValueAt(i, 4)).longValue()));\n }\n\n if (resultado.getValueAt(i, 5) == null) {\n dir.setNumeroPrincipal(null);\n } else {\n /*\n * V-PED001 - dmorello, 06/10/2006\n * Cambio el tipo de numeroPrincipal de Integer a String\n */\n //dir.setNumeroPrincipal(new Integer(resultado.getValueAt(i, 5).toString()));\n dir.setNumeroPrincipal(resultado.getValueAt(i, 5).toString());\n }\n\n if (resultado.getValueAt(i, 6) == null) {\n dir.setCodigoPostal(null);\n } else {\n dir.setCodigoPostal(resultado.getValueAt(i, 6).toString());\n }\n\n if (resultado.getValueAt(i, 7) == null) {\n dir.setObservaciones(null);\n } else {\n dir.setObservaciones(resultado.getValueAt(i, 7).toString());\n }\n\n if (resultado.getValueAt(i, 8) == null) {\n dir.setEsDireccionPrincipal(null);\n } else {\n if (((BigDecimal) resultado.getValueAt(i, 8)).longValue() == 1) {\n dir.setEsDireccionPrincipal(new Boolean(true));\n } else {\n dir.setEsDireccionPrincipal(new Boolean(false));\n }\n }\n\n if (resultado.getValueAt(i, 9) == null) {\n dir.setNombreVia(null);\n } else {\n dir.setNombreVia(resultado.getValueAt(i, 9).toString());\n }\n\n if (resultado.getValueAt(i, 10) == null) {\n dir.setNombreUnidadGeografica(null);\n } else {\n dir.setNombreUnidadGeografica(resultado.getValueAt(i, 10).toString());\n }\n\n //UtilidadesLog.debug(\"bucle \" + i + \": \" + dir.toString());\n arrayDirecciones[i] = dir;\n }\n\n dto.setDirecciones(arrayDirecciones);\n }\n\n //DTOCliente\n //base: metemos el DTOCrearClienteBasico creado anteriormente \n dtosalida.setBase(dto);\n\n //DTOComunicacion[]\t\t\t\n query = new StringBuffer();\n /*query.append(\" SELECT OID_CLIE_COMU, TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, \");\n query.append(\" to_char(FEC_HORA_DESD, 'HH24:MI'), to_char(FEC_HORA_HAST, 'HH24:MI'), VAL_INTE_COMU, IND_COMU_PPAL \");\n query.append(\" FROM MAE_CLIEN_COMUN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n \n query.append(\" SELECT oid_clie_comu, ticm_oid_tipo_comu, val_dia_comu, val_text_comu, \");\n query.append(\" ind_comu_ppal, TO_CHAR (fec_hora_desd, 'HH24:MI'), \");\n query.append(\" TO_CHAR (fec_hora_hast, 'HH24:MI'), val_inte_comu \");\n query.append(\" FROM mae_clien_comun \");\n query.append(\" WHERE clie_oid_clie = \" + oid.getOid()); \n query.append(\" order by ind_comu_ppal desc \");\n rComunicaciones = bs.dbService.executeStaticQuery(query.toString());\n /*resultado = bs.dbService.executeStaticQuery(query.toString());\n\n DTOComunicacion[] dtots7 = new DTOComunicacion[resultado.getRowCount()];\n DTOComunicacion dtos7;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos7 = new DTOComunicacion();\n dtos7.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos7.setTipoComunicacion(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n\n String diaComu = (String) resultado.getValueAt(i, 2);\n\n if ((diaComu != null) && !(diaComu.equals(\"\"))) {\n dtos7.setDiaComunicacion(new Character(diaComu.toCharArray()[0]));\n }\n\n dtos7.setTextoComunicacion((String) resultado.getValueAt(i, 3));\n\n String sHoraDesde = (String) resultado.getValueAt(i, 4);\n String sHoraHasta = (String) resultado.getValueAt(i, 5);\n\n UtilidadesLog.debug(\"HoraDesde: \" + sHoraDesde);\n UtilidadesLog.debug(\"HoraHasta: \" + sHoraHasta);\n\n SimpleDateFormat simpleDateHora = new SimpleDateFormat(\"HH:mm\");\n\n if ((sHoraDesde != null) && !sHoraDesde.equals(\"\")) {\n java.util.Date dateHoraDesde = simpleDateHora.parse(sHoraDesde);\n UtilidadesLog.debug(\"dateHoraDesde: \" + dateHoraDesde.toString());\n UtilidadesLog.debug(\"dateHoraDesde Long: \" + dateHoraDesde.getTime());\n\n Long longHoraDesde = new Long(dateHoraDesde.getTime());\n dtos7.setHoraDesde(longHoraDesde);\n }\n\n if ((sHoraHasta != null) && !sHoraHasta.equals(\"\")) {\n java.util.Date dateHoraHasta = simpleDateHora.parse(sHoraHasta);\n UtilidadesLog.debug(\"dateHoraHasta: \" + dateHoraHasta.toString());\n UtilidadesLog.debug(\"dateHoraHasta Long: \" + dateHoraHasta.getTime());\n\n Long longHoraHasta = new Long(dateHoraHasta.getTime());\n dtos7.setHoraHasta(longHoraHasta);\n }\n\n BigDecimal interva = (BigDecimal) resultado.getValueAt(i, 6);\n Boolean intervaloComuni = null;\n\n if (interva != null) {\n if (interva.toString().equals(\"1\")) {\n intervaloComuni = Boolean.TRUE;\n } else {\n intervaloComuni = Boolean.FALSE;\n }\n }\n\n dtos7.setIntervaloComunicacion(intervaloComuni);\n\n BigDecimal pric = (BigDecimal) resultado.getValueAt(i, 7);\n Boolean principal = null;\n\n if (pric != null) {\n if (pric.toString().equals(\"1\")) {\n principal = Boolean.TRUE;\n } else {\n principal = Boolean.FALSE;\n }\n }\n\n dtos7.setPrincipal(principal);\n dtots7[i] = dtos7;\n }\n \n dtosalida.setComunicaciones(dtots7); */\n dtosalida.setRComunicaciones(rComunicaciones);\n\n //DTOTarjeta[]\t\t\t\n query = new StringBuffer();\n query.append(\" SELECT OID_CLIE_TARJ, TITR_OID_TIPO_TARJ, CLTA_OID_CLAS_TARJ, CBAN_OID_BANC \");\n query.append(\" FROM MAE_CLIEN_TARJE \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n /* rTarjetas = bs.dbService.executeStaticQuery(query.toString()); */\n\n resultado= bs.dbService.executeStaticQuery(query.toString());\n DTOTarjeta[] dtots8 = new DTOTarjeta[resultado.getRowCount()];\n DTOTarjeta dtos8;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos8 = new DTOTarjeta();\n dtos8.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos8.setTipo(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n dtos8.setClase((resultado.getValueAt(i, 2) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue()) : null);\n dtos8.setBanco((resultado.getValueAt(i, 3) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 3)).longValue()) : null);\n dtots8[i] = dtos8;\n }\n\n dtosalida.setTarjetas(dtots8);\n /*dtosalida.setRTarjeta(rTarjetas);*/\n\n //DTOProblemaSolucion\n query = new StringBuffer();\n query.append(\" SELECT OID_CLIE_PROB, DES_PROB, IND_SOLU, \");\n query.append(\" VAL_NEGO_PROD, TIPB_OID_TIPO_PROB, DES_SOLU, TSOC_OID_TIPO_SOLU \");\n query.append(\" FROM MAE_CLIEN_PROBL \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n\n /* rProblemaSolucion = bs.dbService.executeStaticQuery(query.toString()); */\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n DTOProblemaSolucion[] dtots9 = new DTOProblemaSolucion[resultado.getRowCount()];\n DTOProblemaSolucion dtos9;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos9 = new DTOProblemaSolucion();\n dtos9.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos9.setDescripcionProblema((String) resultado.getValueAt(i, 1));\n\n // dtos9.setSolucion(new Boolean((String) (resultado.getValueAt(i, 2))));\n if (resultado.getValueAt(i, 2) != null) {\n \n Long ind = null;\n ind = new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue());\n\n if (ind.intValue() == 1) {\n dtos9.setSolucion(new Boolean(true));\n } else {\n dtos9.setSolucion(new Boolean(false));\n }\n\n //Boolean valor = new Boolean( ((String)resultado.getValueAt(i, 2)).equals(\"1\") );\n }\n\n \n dtos9.setNegocio((String) resultado.getValueAt(i, 3));\n dtos9.setTipoProblema((resultado.getValueAt(i, 4) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 4)).longValue()) : null);\n dtos9.setDescripcionSolucion((String) resultado.getValueAt(i, 5));\n dtos9.setTipoSolucion((resultado.getValueAt(i, 6) != null) ? new Long(((BigDecimal) resultado.getValueAt(i, 6)).longValue()) : null);\n\n dtots9[i] = dtos9;\n }\n\n dtosalida.setProblemasSoluciones(dtots9);\n /* dtosalida.setRProblemaSolucion(rProblemaSolucion);*/\n\n //DTOPsicografia\n query = new StringBuffer();\n query.append(\" SELECT OID_PSIC, MARC_OID_MARC, TPOID_TIPO_PERF_PSIC, COD_TEST, FEC_PSIC \");\n query.append(\" FROM MAE_PSICO \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n /* rPsicografia = bs.dbService.executeStaticQuery(query.toString());*/\n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n DTOPsicografia[] dtots10 = new DTOPsicografia[resultado.getRowCount()];\n DTOPsicografia dtos10;\n\n for (int i = 0; i < resultado.getRowCount(); i++) {\n dtos10 = new DTOPsicografia();\n dtos10.setOid(new Long(((BigDecimal) resultado.getValueAt(i, 0)).longValue()));\n dtos10.setMarca(new Long(((BigDecimal) resultado.getValueAt(i, 1)).longValue()));\n dtos10.setTipoPerfil(new Long(((BigDecimal) resultado.getValueAt(i, 2)).longValue()));\n dtos10.setCodigoTest((String) (resultado.getValueAt(i, 3)));\n dtos10.setFecha((Date) (resultado.getValueAt(i, 4)));\n dtots10[i] = dtos10;\n }\n\n dtosalida.setPsicografias(dtots10);\n /* dtosalida.setRPsicografia(rPsicografia);*/\n } catch (CreateException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (RemoteException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (Exception e) {\n e.printStackTrace();\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n UtilidadesLog.debug(\"dtoSalida ObtenerCliente: \" + dtosalida);\n UtilidadesLog.info(\" DAOMAEMaestroClientes.obtenerCliente(DTOOID): Salida\");\n\n return dtosalida;\n }",
"public List<Cliente> mostrarClientesPre()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tif(p.tienePre())\n\t\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\tCollections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public ClientList getClients() {\r\n return this.clients;\r\n }",
"public ClientesCadastrados() {\n initComponents();\n tabelaClientes();\n Tabela.setRowSelectionAllowed(false);\n Tabela.getTableHeader().setReorderingAllowed(false);\n setIcone();\n }",
"public List<String> retornaDatasComprasDeClientes () {\n return this.contasClientes\n .values()\n .stream()\n .flatMap((Conta conta) -> conta.retornaDatasDasCompras().stream())\n .collect(Collectors.toList());\n }",
"List<GroupUser> getConnectedClients();",
"@Generated\n public List<Clientes> getClientes() {\n if (clientes == null) {\n __throwIfDetached();\n ClientesDao targetDao = daoSession.getClientesDao();\n List<Clientes> clientesNew = targetDao._queryUsuarios_Clientes(id);\n synchronized (this) {\n if(clientes == null) {\n clientes = clientesNew;\n }\n }\n }\n return clientes;\n }",
"public List<Compte> getComptesClient(int numeroClient);",
"public ArrayList<Cliente> getClientes() throws SQLException, Exception {\n\t\tArrayList<Cliente> clientes = new ArrayList<Cliente>();\n\n\t\tString sql = String.format(\"SELECT * FROM %1$s.CLIENTE\", USUARIO);\n\n\t\tPreparedStatement prepStmt = conn.prepareStatement(sql);\n\t\trecursos.add(prepStmt);\n\t\tResultSet rs = prepStmt.executeQuery();\n\n\t\twhile (rs.next()) {\n\t\t\tclientes.add(convertResultSetToCliente(rs));\n\t\t}\n\t\treturn clientes;\n\t}",
"private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}",
"private void obtenerClienteRecomendado(Cliente clienteParametro, Long oidPais) throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Entrada\");\n\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n ArrayList lstRecomendados;\n\n if ( clienteParametro.getClienteRecomendante() != null){\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"oidClienteRecomendante=\"+clienteParametro.getClienteRecomendante().getRecomendante());\n }\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n queryInc.append(\" SELECT \");\n queryInc.append(\" CLIE_OID_CLIE_VNDO CLIE_OID_CLIE, \");\n queryInc.append(\" FEC_DESD FEC_INIC, \");\n queryInc.append(\" FEC_HAST FEC_FINA \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n queryInc.append(\" AND CLIE_OID_CLIE_VNDO NOT IN ( \");\n \n // queryInc.append(\" SELECT RDO.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" SELECT DISTINCT RDO.CLIE_OID_CLIE \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RECT.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n \n queryInc.append(\" ) \");\n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n //BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n //StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n \n boolean hayRecomendado = false;\n Cliente clienteLocal = new Cliente();\n lstRecomendados = clienteParametro.getClienteRecomendado();\n\n if (!respuestaInc.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnINC(true);\n \n /* vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n * no lleno lstRecomendados con estos valores solo mantengo el indicador IndRecomendadosEnINC \n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaInc.getRowCount();i++){ \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente()); \n \n BigDecimal recomendado = (BigDecimal) respuestaInc.getValueAt(i, \"CLIE_OID_CLIE\");\n clienteRecomendado.setRecomendado((recomendado != null) ? new Long(recomendado.longValue()) : null);\n \n clienteRecomendado.setFechaInicio((Date) respuestaInc.getValueAt(i, \"FEC_INIC\"));\n Date fechaFin = (Date) respuestaInc.getValueAt(i, \"FEC_FINA\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n\n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n }*/\n } \n \n // vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n // \n \n try {\n queryInc = new StringBuffer(); \n queryInc.append(\" SELECT CLIE_OID_CLIE_VNDO, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n\n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnMAE(true);\n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaMae.getRowCount();i++){ \n \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente());\n\n clienteRecomendado.setRecomendado(new Long(((BigDecimal) \n respuestaMae.getValueAt(i, \"CLIE_OID_CLIE_VNDO\")).longValue()));\n {\n Date fechaInicio = (Date) respuestaMae.getValueAt(i, \"FEC_DESD\");\n clienteRecomendado.setFechaInicio((fechaInicio != null) ? fechaInicio : null);\n }\n\n {\n Date fechaFin = (Date) respuestaMae.getValueAt(i, \"FEC_HAST\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n }\n \n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n \n }\n \n clienteParametro.setClienteRecomendado(lstRecomendados);\n \n } else {\n hayRecomendado = false;\n }\n\n if (!hayRecomendado) {\n clienteParametro.setClienteRecomendado(null);\n }\n \n // JVM, sicc 20070381, if, manejo del Recomendador, bloque de recuparacion de periodo\n if (lstRecomendados.size() > 0)\n { \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n RecordSet respuestaMaeRdr = null;\n\n try { \n queryInc = new StringBuffer();\n queryInc.append(\" SELECT DISTINCT CLIE_OID_CLIE_VNTE , FEC_DESD , FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n respuestaMaeRdr = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMaeRdr \" + respuestaMaeRdr); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n ClienteRecomendante clienteRecomendador = new ClienteRecomendante();\n \n if (!respuestaMaeRdr.esVacio()) {\n \n {\n BigDecimal recomendador = (BigDecimal) respuestaMaeRdr.getValueAt(0, \"CLIE_OID_CLIE_VNTE\");\n clienteRecomendador.setRecomendante((recomendador != null) ? new Long(recomendador.longValue()) : null);\n }\n \n clienteRecomendador.setFechaInicio((Date) respuestaMaeRdr.getValueAt(0, \"FEC_DESD\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaMaeRdr.getValueAt(0, \"FEC_HAST\");\n clienteRecomendador.setFechaFin((fechaFin != null)? fechaFin : null);\n }\n \n clienteParametro.setClienteRecomendador(clienteRecomendador);\n }\n \n for (int i=0; i<lstRecomendados.size(); i++){\n\n ClienteRecomendado clienteRecomendados = new ClienteRecomendado(); \n \n clienteRecomendados = (ClienteRecomendado) lstRecomendados.get(i);\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n\n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendados.getRecomendado()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n BigDecimal bd;\n \n if (!respuestaInc.esVacio()) {\n\n Periodo periodo = new Periodo();\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n \n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n \n clienteRecomendados.setPeriodo(periodo);\n } \n }\n }\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"lstRecomendados(\"+lstRecomendados.size() + \n \") getIndRecomendadosEnMAE(\"+clienteParametro.getIndRecomendadosEnMAE() +\n \") getIndRecomendadosEnINC(\"+clienteParametro.getIndRecomendadosEnINC() +\")\"); \n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Salida\"); \n \n }",
"public DAOCliente() {\n\t\trecursos = new ArrayList<Object>();\n\t}",
"public Cliente getCliente() {\n return objCliente;\n }",
"public List<Cliente> getClienteList () {\n\t\t\n\t\tCriteria crit = HibernateUtil.getSession().createCriteria(Cliente.class);\n\t\tList<Cliente> clienteList = crit.list();\n\t\t\n\t\treturn clienteList;\n\t}",
"public void UserClientAcceptor(ArrayList<User> cleints) {\r\n \tuserClient = (ArrayList<User>)cleints.clone();\r\n \t//System.out.println(userClient);\r\n\t\tList.addAll(cleints);\r\n\t\t}",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET)\n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\tList<Cliente> list = servico.findAll();\n\t\t//Converter essa lista de categorias, para ClienteDTO.\n\t\t//A melhor forma é ir no DTO e criar um construtor que receba o objeto correspondete\n\t\t//Lá das entidades de domínio.\n\t\t//Utilizar o Strem para pecorrer a lista de categorias\n\t\t//O map efetuar uma operação para cada elemento da lista\n\t\t//Vou chamar ela de obj e para cada elemento da minha lista\n\t\t// -> aeroFunction = FUNÇÃO anonima\n\t\t//instaciar a minha categoriaDTO passando o obj como parametro\n\t\t//E depois converter para lista de novo com o collect.\n\t\t\n\t\tList<ClienteDTO> listDto = list.stream().map(obj -> new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\treturn ResponseEntity.ok().body(listDto);\n\t}",
"public synchronized HashMap nextClient() throws SQLException \n\t{\n\t\tif (selClientes.next()) \n\t\t{\n\t\t\tHashMap result = new HashMap();\n\t\t\tresult.put(\"IDT_MSISDN\", selClientes.getString(\"IDT_MSISDN\"));\n\t\t\tresult.put(\"IDT_PROMOCAO\", new Integer(selClientes.getInt(\"IDT_PROMOCAO\")));\n\t\t\tresult.put(\"DAT_EXECUCAO\", selClientes.getDate(\"DAT_EXECUCAO\"));\n\t\t\tresult.put(\"DAT_ENTRADA_PROMOCAO\", selClientes.getDate(\"DAT_ENTRADA_PROMOCAO\"));\n\t\t\t//Para o campo IND_SUSPENSO, verificar se o campo lido foi NULL porque nao pode ser assumido o valor\n\t\t\t//0 como default\n\t\t\tresult.put(\"IND_SUSPENSO\", new Integer(selClientes.getInt(\"IND_SUSPENSO\")));\n\t\t\tif(selClientes.wasNull())\n\t\t\t{\n\t\t\t\tresult.put(\"IND_SUSPENSO\", null);\n\t\t\t}\n\t\t\tresult.put(\"IND_ISENTO_LIMITE\", new Integer(selClientes.getInt(\"IND_ISENTO_LIMITE\")));\n\t\t\tresult.put(\"IDT_STATUS\", new Integer(selClientes.getInt(\"IDT_STATUS\")));\n\t\t\tresult.put(\"DAT_EXPIRACAO_PRINCIPAL\", selClientes.getDate(\"DAT_EXPIRACAO_PRINCIPAL\"));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_BONUS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_BONUS\")));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_SMS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_SMS\")));\n\t\t\tresult.put(\"IND_ZERAR_SALDO_GPRS\", new Integer(selClientes.getInt(\"IND_ZERAR_SALDO_GPRS\")));\n\t\t\t//Verifica se os minutos totais sao menores que os minutos com tarifacao diferenciada Friends&Family. Caso \n\t\t\t//seja verdadeiro (o que indica inconsistencia na base ou perda de CDRs), os minutos FF devem ser ajustados \n\t\t\t//de forma a ficarem iguais aos minutos totais, conforme alinhamento entre Albervan, Luciano e Daniel\n\t\t\t//Ferreira. Esta decisao foi tomada de modo a diminuir o numero de reclamacoes por nao recebimento de \n\t\t\t//bonus, ao mesmo tempo em que os registros de ligacoes recebidas no extrato permanecerao consistentes \n\t\t\t//(o numero total de minutos nas ligacoes detalhadas correspondem ao numero consolidado, sendo estes todos \n\t\t\t//considerados como tendo tarifacao diferenciada).\n\t\t\tdouble minCredito = selClientes.getDouble(\"MIN_CREDITO\");\n\t\t\tdouble minFF = selClientes.getDouble(\"MIN_FF\");\n\t\t\tif(minCredito < minFF)\n\t\t\t{\n\t\t\t\tminFF = minCredito;\n\t\t\t}\n\t\t\tresult.put(\"MIN_CREDITO\", new Double(minCredito));\n\t\t\tresult.put(\"MIN_FF\", new Double(minFF));\n\t\t\t\n\t\t\treturn result;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic void altaCliente(Cliente cliente) {\n\t}",
"public void clienteSalio(String name, String cuarto) throws IOException {\n if (cuarto.equals(\"Reunion de clientes\")) {\n IntercambioDeUsuarios(name);\n } else {\n for (int c = 0; c < clientesEsperando.length; c++) { // Transforma cualquier usuario que escribio salir en la lista de espera a null\n if (clientesEsperando[c] != null) {\n if (name.equals(clientesEsperando[c].clientName)) {\n\n \n clientesEsperando[c] = null;\n try {\n clientesEsperando[c] = clientesEsperando[c + 1]; \n clientesEsperando[c + 1] = null;\n } catch (Exception e) {\n }\n clientesEsperando[c].actualizarCuartosReunion(clientesConectados);\n clientesEsperando[c].actualizarCuartosEspera(clientesEsperando);\n break;\n }\n }\n }\n }\n\n }",
"public TelaCliente() {\n\n try {\n Handler console = new ConsoleHandler();\n Handler file = new FileHandler(\"/tmp/roquerou.log\");\n console.setLevel(Level.ALL);\n file.setLevel(Level.ALL);\n file.setFormatter(new SimpleFormatter());\n LOG.addHandler(file);\n LOG.addHandler(console);\n LOG.setUseParentHandlers(false);\n } catch (IOException io) {\n LOG.warning(\"O ficheiro hellologgin.xml não pode ser criado\");\n }\n\n initComponents();\n NivelDAO nd = new NivelDAO();\n if (nd.buscar() == 3) {\n botaoNovoCliente.setEnabled(false);\n buscarcli.setEnabled(false);\n tabelaCliente.setEnabled(false);\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n } else {\n popularCombo();\n setarLabels();\n\n LOG.info(\"Abertura da Tela de Clientes\");\n }\n }",
"@Override\n public List<Client> getAllClients(){\n log.trace(\"getAllClients --- method entered\");\n List<Client> result = clientRepository.findAll();\n log.trace(\"getAllClients: result={}\", result);\n return result;\n }",
"public Map<String, Cliente> getClientes() {\n\t\treturn clientes;\n\t}",
"public Lista obtenerListadoClientes(boolean soloActivos, int filtro,String valorAux,String valorAux2,String valorAux3)throws SQLException{\r\n\t\tLista listadoCliente=null;\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\t\r\n\t\tlistadoCliente = daoCliente.obtenerListadoClientes(soloActivos, filtro, valorAux, valorAux2, valorAux3);\r\n\t\t\r\n\t\treturn listadoCliente;\r\n\t}",
"public ArrayList<Client> clientList() {\n\t\tint counter = 1; // 일딴 보류\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString query = \"select * from client\";\n\t\tArrayList<Client> client = new ArrayList<Client>();\n\t\tClient object = null;\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobject = new Client();\n\t\t\t\tString cId = rs.getString(\"cId\");\n\t\t\t\tString cPhone = rs.getString(\"cPhone\");\n\t\t\t\tString cName = rs.getString(\"cName\");\n\t\t\t\tint point = rs.getInt(\"cPoint\");\n\t\t\t\tint totalPoint = rs.getInt(\"totalPoint\");\n\n\t\t\t\tobject.setcId(cId);\n\t\t\t\tobject.setcPhone(cPhone);\n\t\t\t\tobject.setcName(cName);\n\t\t\t\tobject.setcPoint(point);\n\t\t\t\tobject.setTotalPoint(totalPoint);\n\n\t\t\t\tclient.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t\tif (pstmt != null) {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn client;\n\t}",
"public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }",
"@Override\n\tpublic void asignarClienteAcobrador() {\n\t\tSet<ClienteProxy> lista=grid.getMultiSelectionModel().getSelectedSet();\t\t\n\t\tif(!lista.isEmpty()){\n\t\t\tFACTORY.initialize(EVENTBUS);\n\t\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\t\t\t\n\t\t\tRequest<Boolean> request=context.asignarClientesAlCobrador(lista, beanGestorCobranza.getIdUsuarioOwner(), beanGestorCobranza.getIdUsuarioCobrador() , beanGestorCobranza.getIdGestorCobranza());\n\t\t\trequest.fire(new Receiver<Boolean>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean response) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgoToBack();\n\t\t\t\t}});\n\t\t}else{\n\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\tnot.showPopup();\n\t\t}\n\t}",
"public List<Client> getClientsByConseillerId(long idConseiller) throws SQLException {\r\n\t\tPreparedStatement st = null;\r\n\t\tResultSet rs =null;\r\n\t\tClient client = new Client();\r\n\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = getConnection();\r\n\t\t\tString selectSQL = \"select surname, name, email , adress from client where idConseiller = ?\";\r\n\t\t\tst = connection.prepareStatement(selectSQL);\r\n\t\t\tst.setLong(1, idConseiller);\r\n\t\t\t\r\n\t\t\trs = st.executeQuery();\r\n\t\t\t\r\n\t\t\t\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tclient = new Client();\r\n\t\t\tclient.setSurname(rs.getString(\"surname\"));\r\n\t\t\tclient.setName(rs.getString(\"name\"));\r\n\t\t\tclient.setEmail(rs.getString(\"email\"));\r\n\t\t\tclient.setAdress(rs.getString(\"adress\"));\r\n\t\t\t\r\n\t\t\tclients.add(client);\r\n\t\t }\r\n\t\t\treturn clients;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (st != null)\r\n\t\t\t\t\tst.close();\r\n\t\t\t\tif (connection != null)\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=0; i<clients.size();i++) {\r\n\t\t\t\tSystem.out.println(\"la donnée associée à l'indice \"+ i + \" est \" + clients.get(i));\r\n\t\t\t}\r\n\t\t\treturn clients;\t\t\r\n\t\t\r\n\t}",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET) \n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\t\n\t\tList<Cliente> list = service.findAll();\n\t\t\n\t\t//veja que o stream eh para percorrer a lista, o map eh para dizer uma funcao q vai manipular cada elemento da lista\n\t\t//nesse caso, para elemento na lista ele sera passado para a categoriadto \n\t\t//e no fim eh convertida novamente para uma lista\n\t\tList<ClienteDTO> listDTO = list.stream().map(obj->new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\t//o ok eh p/ operacao feita com sucesso e o corpo vai ser o obj\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"public List<UserModel> getListOfClient() {\n\t\treturn userDao.getListOfClients();\n\t}",
"public List<Location> listarPorCliente() throws SQLException {\r\n \r\n //OBJETO LISTA DE COMODOS\r\n List<Location> enderecos = new ArrayList<>(); \r\n \r\n //OBJETO DE CONEXÃO COM O BANCO\r\n Connection conn = ConnectionMVC.getConnection();\r\n \r\n //OBJETO DE INSTRUÇÃO SQL\r\n PreparedStatement pStatement = null;\r\n \r\n //OBJETO CONJUNTO DE RESULTADOS DA TABELA IMOVEL\r\n ResultSet rs = null;\r\n \r\n try {\r\n \r\n //INSTRUÇÃO SQL DE LISTAR ENDEREÇO ATRAVES DE VIEW CRIADA NO JDBC\r\n pStatement = conn.prepareStatement(\"select * from dados_imovel_cliente;\");\r\n \r\n //OBJETO DE RESULTADO DA INSTRUÇÃO\r\n rs = pStatement.executeQuery();\r\n \r\n //PERCORRER OS DADOS DA INSTRUÇÃO\r\n while(rs.next()) {\r\n \r\n //OBJETO UTILIZADO PARA BUSCA\r\n Location endereco = new Location();\r\n \r\n //PARAMETROS DE LISTAGEM\r\n endereco.setCep(rs.getString(\"cep\"));\r\n endereco.setRua(rs.getString(\"rua\"));\r\n endereco.setNumero(rs.getInt(\"numero\"));\r\n endereco.setBairro(rs.getString(\"bairro\"));\r\n endereco.setCidade(rs.getString(\"cidade\"));\r\n endereco.setUf(rs.getString(\"uf\"));\r\n endereco.setAndar(rs.getInt(\"andar\"));\r\n endereco.setComplemento(rs.getString(\"complemento\"));\r\n \r\n //OBJETO ADICIONADO A LISTA\r\n enderecos.add(endereco); \r\n }\r\n \r\n //MENSAGEM DE ERRO\r\n } catch (SQLException ErrorSql) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao listar do banco: \" +ErrorSql,\"erro\", JOptionPane.ERROR_MESSAGE);\r\n\r\n //FINALIZAR/FECHAR CONEXÃO\r\n }finally {\r\n ConnectionMVC.closeConnection(conn, pStatement, rs);\r\n } \r\n return enderecos;\r\n }",
"public TelaListaCliente(ListadePessoas list) {\n initComponents();\n cli = new ArrayList<>();\n \n for(Cliente c: list.getClientes()){\n cli.add(c);\n }\n \n DefaultTableModel dtm = (DefaultTableModel) jclient.getModel();\n for(Cliente c: cli){ \n Object[] dados = {c.getNome(),c.getCpf(),c.getEndereco(),c.getTelefone()};\n dtm.addRow(dados);\n }\n }",
"@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}",
"public static void main(String [ ] args){\n\t\t Fecha Hoy = new Fecha(12,12,2020);\r\n\t\t ArrayList<Cuenta> cuentas = new ArrayList<Cuenta>();\r\n\t\t \r\n\t\t Cuenta c0 = new CtaAhorros(10000,10);\r\n\t\t Cuenta c1 = new CtaCheques(256070,0);\r\n\t\t Cuenta c2 = new CtaCredito(13245,100);\r\n\t\t Cuenta c3 = new CtaCheques(765,20);\r\n\t\t Cuenta c4 = new CtaAhorros(9000,20);\r\n\t\t Cuenta c5 = new CtaAhorros(2300,10);\r\n\t\t Cuenta c6 = new CtaCredito(25000,12);\r\n\t\t \r\n\t\t cuentas.add(c0);\r\n\t\t cuentas.add(c1);\r\n\t\t cuentas.add(c2);\r\n\t\t cuentas.add(c3);\r\n\t\t cuentas.add(c4);\r\n\t\t cuentas.add(c5);\r\n\t\t \r\n\t\t Cliente C1=new Cliente(\"QUIJOTE\",cuentas,\"QX400\");\r\n\t\t Hoy.AvanzarTiempo(11,1,0);\r\n\t\t \r\n\t\t C1.depositar(1,1200, Hoy);\r\n\t\t C1.retirar(2,1100, Hoy);\r\n\t\t System.out.println(\"saldo cuenta 3:\"+C1.consultar(3,Hoy));\r\n\t\t C1.depositar(4,600, Hoy);\r\n\t\t \r\n\t\t //C1.reportarEdosCtas();\r\n\t\t \r\n\t\t }",
"@Generated\n public synchronized void resetClientes() {\n clientes = null;\n }",
"public DTOConsultaCliente consultarCliente(DTOOID oid) throws MareException {\n UtilidadesLog.info(\" DAOMAEMaestroClientes.consultarCliente(DTOOID): Entrada\");\n\n Boolean bUsaGEOREFERENCIADOR = Boolean.FALSE;\n MONMantenimientoSEG mms;\n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n RecordSet resultado = new RecordSet();\n StringBuffer query = new StringBuffer();\n DTOConsultaCliente dtos = new DTOConsultaCliente();\n\n try {\n query.append(\" select TICL_OID_TIPO_CLIE, SBTI_OID_SUBT_CLIE, I1.VAL_I18N DESC_TIPO_CLIENTE, \");\n query.append(\" I2.VAL_I18N DESC_SUB_TIPO_CLIENTE\");\n query.append(\" from MAE_CLIEN_TIPO_SUBTI T, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICL_OID_TIPO_CLIE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_SUBTI_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = SBTI_OID_SUBT_CLIE \");\n query.append(\" and T.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" ORDER BY DESC_TIPO_CLIENTE ASC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setTiposSubtipos(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" select TDOC_OID_TIPO_DOCU, NUM_DOCU_IDEN, VAL_IDEN_DOCU_PRIN, VAL_IDEN_PERS_EMPR, \");\n query.append(\" I1.VAL_I18N DESC_TIPO_DOCUM from MAE_CLIEN_IDENT I, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_DOCUM' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TDOC_OID_TIPO_DOCU \");\n query.append(\" and I.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setIdentificaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n // Se agrega campo \"cod_clie\" a la query.\n query.append(\" SELECT val_ape1, val_ape2, val_apel_casa, val_nom1, val_nom2, val_trat, \");\n query.append(\" cod_sexo, fec_ingr, fopa_oid_form_pago, i1.val_i18n desc_forma_pago, \");\n query.append(\" cod_clie \");\n query.append(\" FROM mae_clien m, v_gen_i18n_sicc i1 \");\n query.append(\" WHERE i1.val_oid(+) = fopa_oid_form_pago \");\n query.append(\" AND i1.attr_enti(+) = 'BEL_FORMA_PAGO' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma());\n query.append(\" AND m.oid_clie = \" + oid.getOid()); \n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n dtos.setApellido1((String) resultado.getValueAt(0, 0));\n dtos.setApellido2((String) resultado.getValueAt(0, 1));\n dtos.setApellidoCasada((String) resultado.getValueAt(0, 2));\n dtos.setNombre1((String) resultado.getValueAt(0, 3));\n dtos.setNombre2((String) resultado.getValueAt(0, 4));\n\n String tratamiento = (String) resultado.getValueAt(0, 5);\n\n if ((tratamiento != null) && !(tratamiento.equals(\"\"))) {\n dtos.setTratamiento(new Byte(tratamiento));\n }\n\n String sexo = (String) resultado.getValueAt(0, 6);\n\n if ((sexo != null) && !(sexo.equals(\"\"))) {\n dtos.setSexo(new Character(sexo.toCharArray()[0]));\n }\n\n dtos.setFechaIngreso((Date) resultado.getValueAt(0, 7));\n dtos.setFormaPago((String) resultado.getValueAt(0, 9));\n \n // Agregado by ssantana, inc. BELC300021214\n // Se agrega asignacion de parametro CodigoCliente\n dtos.setCodigoCliente((String) resultado.getValueAt(0, 10) );\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT FEC_NACI, COD_EMPL, SNON_OID_NACI, VAL_EDAD, ESCV_OID_ESTA_CIVI, VAL_OCUP, \");\n query.append(\" VAL_PROF, VAL_CENT_TRAB, VAL_CARG_DESE, VAL_CENT_ESTU, NUM_HIJO, NUM_PERS_DEPE, \");\n query.append(\" NSEP_OID_NSEP, TCLV_OID_CICL_VIDA, IND_CORR, IMP_INGR_FAMI, I1.VAL_I18N DESC_NACION, \");\n query.append(\" I2.VAL_I18N DESC_EDO_CIVIL, I3.VAL_I18N DESC_NESP, I4.VAL_I18N DESC_CICLO_VIDA, \");\n query.append(\" NIED_OID_NIVE_ESTU, i5.VAL_I18N desc_nivel_estu, IND_ACTI \");\n query.append(\" FROM MAE_CLIEN_DATOS_ADICI , V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2, V_GEN_I18N_SICC I3, V_GEN_I18N_SICC I4, v_gen_i18n_sicc i5 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'SEG_NACIO' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = SNON_OID_NACI \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_ESTAD_CIVIL' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = ESCV_OID_ESTA_CIVI \");\n query.append(\" and I3.ATTR_ENTI(+) = 'MAE_TIPO_NIVEL_SOCEC_PERSO' \");\n query.append(\" and I3.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I3.VAL_OID(+) = NSEP_OID_NSEP \");\n query.append(\" and I4.ATTR_ENTI(+) = 'MAE_CICLO_VIDA' \");\n query.append(\" and I4.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I4.VAL_OID(+) = TCLV_OID_CICL_VIDA \");\n query.append(\" and i5.ATTR_ENTI(+) = 'MAE_NIVEL_ESTUD' \");\n query.append(\" AND i5.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" AND i5.VAL_OID(+) = NIED_OID_NIVE_ESTU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n UtilidadesLog.debug(\"resultado: \" + resultado);\n\n dtos.setFechaNacimiento((Date) resultado.getValueAt(0, 0));\n dtos.setCodigoEmpleado((String) resultado.getValueAt(0, 1));\n /*cleal incidencia 21311 fecha 28/10/2005*/\n // Modificado por ssantana, 8/11/2005\n // dtos.setNacionalidad((resultado.getValueAt(0, 2))!=null ? new String(((BigDecimal) resultado.getValueAt(0, 2)).toString()) : \"\");\n dtos.setNacionalidad((resultado.getValueAt(0, 16)) != null ? (String) resultado.getValueAt(0, 16) : \"\"); \n //(resultado.getValueAt(0, 10) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 10)).toString()) : null\n\n // dtos.setEdad((String)resultado.getValueAt(0, 3));\n dtos.setEdad((resultado.getValueAt(0, 3) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 3)).toString()) : \"\");\n dtos.setEstadoCivil((String) resultado.getValueAt(0, 17));\n dtos.setOcupacion((String) resultado.getValueAt(0, 5));\n dtos.setProfesion((String) resultado.getValueAt(0, 6));\n dtos.setCentroTrabajo((String) resultado.getValueAt(0, 7));\n dtos.setCargo((String) resultado.getValueAt(0, 8));\n dtos.setCentro((String) resultado.getValueAt(0, 9));\n\n //dtos.setNumeroHijos((BigDecimal)resultado.getValueAt(0, 10));\n /* dtos.setNumeroHijos((resultado.getValueAt(0, 10) != null)\n ? new String(\n ((BigDecimal) resultado.getValueAt(0, 10)).toString())\n : \"0\");*/\n dtos.setNumeroHijos((resultado.getValueAt(0, 10) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 10)).toString()) : null);\n\n //dtos.setPersonasDependientes((String)resultado.getValueAt(0, 11));\n /* dtos.setPersonasDependientes((resultado.getValueAt(0, 11) != null)\n ? new String(\n ((BigDecimal) resultado.getValueAt(0, 11)).toString())\n : \"0\");*/\n dtos.setPersonasDependientes((resultado.getValueAt(0, 11) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 11)).toString()) : null);\n\n dtos.setNSEP((String) resultado.getValueAt(0, 18));\n dtos.setCicloVidaFamiliar((String) resultado.getValueAt(0, 19));\n dtos.setNivelEstudios((String) resultado.getValueAt(0, 21));\n\n //String corres = (String)resultado.getValueAt(0, 14);\n String corres = (resultado.getValueAt(0, 14) != null) ? new String(((BigDecimal) resultado.getValueAt(0, 14)).toString()) : null;\n\n //String corres = ((BigDecimal) resultado.getValueAt(0,14)).toString();\n Boolean correspondencia = null;\n\n if ((corres != null) && !(corres.equals(\"\"))) {\n if (corres.equals(\"1\")) {\n correspondencia = Boolean.TRUE;\n } else {\n correspondencia = Boolean.FALSE;\n }\n }\n\n dtos.setDeseaCorrespondencia(correspondencia);\n\n BigDecimal big = (BigDecimal) resultado.getValueAt(0, 15);\n\n if (big == null) {\n dtos.setImporteIngreso(\"\");\n } else {\n dtos.setImporteIngreso(big.toString());\n }\n \n //SICC-DMCO-MAE-GCC-006 - Cleal\n Boolean indActi = null;\n if(((BigDecimal) resultado.getValueAt(0, 22))!=null){\n\n if(((BigDecimal) resultado.getValueAt(0, 22)).longValue()==1){\n indActi = new Boolean(true);\n } else if(((BigDecimal) resultado.getValueAt(0, 22)).longValue()==0){\n indActi = new Boolean(false); \n }\n }\n dtos.setIndicadorActivo(indActi);\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT I2.VAL_I18N, C.COD_CLIE, FEC_DESD, FEC_HAST, TIVC_OID_TIPO_VINC, IND_VINC_PPAL, I1.VAL_I18N DESC_TIPO_VINCU \");\n query.append(\" FROM MAE_CLIEN_VINCU, V_GEN_I18N_SICC I1, mae_tipo_vincu tv, seg_pais p, v_gen_i18n_sicc i2, mae_clien c \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_VINCU' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIVC_OID_TIPO_VINC \");\n \n /* inicio deshace modif ciglesias incidencia 24377 17/11/2006\n // SPLATAS - 26/10/2006 - Error al obtener clientes vinculados \n // query.append(\" and CLIE_OID_CLIE_VNDO = \" + oid.getOid() + \" \");\n query.append(\" and CLIE_OID_CLIE_VNTE = \" + oid.getOid() + \" \");\n */\n query.append(\" and CLIE_OID_CLIE_VNDO = \" + oid.getOid() + \" \");\n /*fin deshace ciglesias 24377*/\n \n query.append(\" AND mae_clien_vincu.TIVC_OID_TIPO_VINC = tv.OID_TIPO_VINC \");\n \n // SPLATAS - 26/10/2006 - Error al obtener clientes vinculados \n query.append(\" AND mae_clien_vincu.CLIE_OID_CLIE_VNTE = c.OID_CLIE \"); //eiraola 30/11/2006 Incidencia DBLG7...165\n \n //query.append(\" AND mae_clien_vincu.CLIE_OID_CLIE_VNDO = c.OID_CLIE \");\n \n query.append(\" AND tv.PAIS_OID_PAIS = p.OID_PAIS \");\n query.append(\" AND i2.VAL_OID = p.OID_PAIS \");\n query.append(\" AND i2.ATTR_ENTI = 'SEG_PAIS' \");\n query.append(\" AND i2.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n //UtilidadesLog.info(\"resultado Vinculo: \" + resultado.toString() );\n dtos.setVinculos(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /*query.append(\" SELECT DES_CLIE_PREF, TIPF_OID_TIPO_PREF, DES_CLIE_PREF \");\n query.append(\" FROM MAE_CLIEN_PREFE \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n query.append(\" SELECT i1.VAL_I18N descripcionTipo , a.TIPF_OID_TIPO_PREF, a.DES_CLIE_PREF \");\n query.append(\" FROM MAE_CLIEN_PREFE a , v_gen_i18n_sicc i1 \");\n query.append(\" where a.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and i1.ATTR_ENTI = 'MAE_TIPO_PREFE' \");\n query.append(\" and i1.VAL_OID = a.TIPF_OID_TIPO_PREF \");\n query.append(\" and i1.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" and i1.ATTR_NUM_ATRI = 1 \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setPreferencias(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT MARC_OID_MARC, NUM_OBSE, VAL_TEXT, DES_MARC \");\n query.append(\" FROM MAE_CLIEN_OBSER M, SEG_MARCA S \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and M.MARC_OID_MARC = S.OID_MARC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setObservaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT c.PAIS_OID_PAIS , c.COD_CLIE, t. TICL_OID_TIPO_CLIE, p.COD_TIPO_CONT, \");\n query.append(\" p.FEC_CONT, p.FEC_SIGU_CONT, I1.VAL_I18N DESC_PAIS, I2.VAL_I18N DESC_TIPO_CLIENTE \");\n query.append(\" FROM MAE_CLIEN_PRIME_CONTA p, MAE_CLIEN c, MAE_CLIEN_TIPO_SUBTI t, V_GEN_I18N_SICC I1, \");\n query.append(\" V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'SEG_PAIS' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = c.PAIS_OID_PAIS \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = TICL_OID_TIPO_CLIE \");\n query.append(\" AND p.CTSU_CLIE_CONT = t.OID_CLIE_TIPO_SUBT \");\n query.append(\" AND t.CLIE_OID_CLIE = c.OID_CLIE \");\n query.append(\" and p.CLIE_OID_CLIE = \" + oid.getOid() + \" \"); */\n query.append(\" SELECT c.pais_oid_pais, c.cod_clie, t.ticl_oid_tipo_clie, p.cod_tipo_cont, \");\n query.append(\" p.fec_cont, p.fec_sigu_cont, i1.val_i18n desc_pais, \");\n query.append(\" i2.val_i18n desc_tipo_cliente, i3.val_i18n, perio.val_nomb_peri, marca.DES_MARC \");\n query.append(\" FROM mae_clien_prime_conta p, \");\n query.append(\" mae_clien c, \");\n query.append(\" mae_clien_tipo_subti t, \");\n query.append(\" seg_canal canal, \");\n query.append(\" cra_perio perio, \");\n query.append(\" seg_marca marca, \");\n query.append(\" v_gen_i18n_sicc i1, \");\n query.append(\" v_gen_i18n_sicc i2, \");\n query.append(\" v_gen_i18n_sicc i3 \");\n query.append(\" WHERE i1.attr_enti(+) = 'SEG_PAIS' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = c.pais_oid_pais \");\n query.append(\" AND i2.attr_enti(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND i2.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i2.val_oid(+) = ticl_oid_tipo_clie \");\n query.append(\" AND p.ctsu_clie_cont = t.oid_clie_tipo_subt \");\n query.append(\" AND t.clie_oid_clie = c.oid_clie \");\n query.append(\" AND p.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND p.perd_oid_peri = perio.oid_peri(+) \");\n query.append(\" AND p.cana_oid_cana = canal.oid_cana(+) \");\n query.append(\" AND canal.oid_cana = i3.val_oid(+) \");\n query.append(\" AND i3.attr_enti(+) = 'SEG_CANAL' \");\n query.append(\" AND i3.attr_num_atri(+) = 1 \");\n query.append(\" AND i3.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" and p.MARC_OID_MARC = marca.OID_MARC(+) \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n if (!resultado.esVacio()) {\n // by Ssantana, 29/7/04 - Se corren algunos indices en -1 al quitar\n // campo Primer Pedido Contacto. \n // 5/8//2004 - Se agregan descripciones de Marca, Canal y Periodo\n dtos.setPaisContactado((String) resultado.getValueAt(0, 6));\n dtos.setCodigoClienteContactado((String) resultado.getValueAt(0, 1));\n dtos.setTipoClienteContactado((String) resultado.getValueAt(0, 7));\n dtos.setTipoContacto((String) resultado.getValueAt(0, 3));\n dtos.setFechaContacto((Date) resultado.getValueAt(0, 4));\n dtos.setFechaSiguienteContacto((Date) resultado.getValueAt(0, 5));\n dtos.setMarcaContactoDesc((String) resultado.getValueAt(0, 10));\n dtos.setCanalContactoDesc((String) resultado.getValueAt(0, 8));\n dtos.setPeriodoContactoDesc((String) resultado.getValueAt(0, 9));\n\n /* dtos.setPaisContactado((String)resultado.getValueAt(0, 7));\n dtos.setCodigoClienteContactado((String)resultado.getValueAt(0, 1));\n dtos.setTipoClienteContactado((String)resultado.getValueAt(0, 8));\n dtos.setTipoContacto((String)resultado.getValueAt(0, 3));\n dtos.setFechaContacto((Date)resultado.getValueAt(0, 4));\n //dtos.setFechaPrimerPedido((Date)resultado.getValueAt(0, 5));\n dtos.setFechaSiguienteContacto((Date)resultado.getValueAt(0, 6));*/\n }\n //Cleal Mae-03\n MONMantenimientoSEGHome mmsHome = SEGEjbLocators.getMONMantenimientoSEGHome();\n mms = mmsHome.create();\n bUsaGEOREFERENCIADOR = mms.usaGeoreferenciador(oid.getOidPais());\n \n resultado = new RecordSet();\n if(Boolean.FALSE.equals(bUsaGEOREFERENCIADOR)){\n UtilidadesLog.debug(\"*** No usa GEO\");\n resultado = obtieneDireccionSinGEO(oid);\n } else{\n UtilidadesLog.debug(\"*** Usa GEO\");\n resultado = obtieneDireccionConGEO(oid);\n }//\n \n //\n /*\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT dir.TIDC_OID_TIPO_DIRE, dir.TIVI_OID_TIPO_VIA, \");\n //SICC-GCC-MAE-005 - Cleal\n query.append(\" NVL(dir.VAL_NOMB_VIA,vi.NOM_VIA) AS VIA, \");\n \n query.append(\" dir.NUM_PPAL, dir.VAL_COD_POST, \");\n query.append(\" dir.VAL_OBSE, I1.VAL_I18N DESC_TIPO_DIREC, I2.VAL_I18N DESC_TIPO_VIA, ind_dire_ppal, VAL.DES_GEOG \");\n query.append(\" FROM MAE_CLIEN_DIREC dir, ZON_VIA vi, ZON_VALOR_ESTRU_GEOPO val, \");\n //Cleal MAE-03\n if(bUsaGEOREFERENCIADOR.equals(Boolean.FALSE)){\n query.append(\" ZON_TERRI terr, \");\n }\n //\n query.append(\" V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" WHERE I1.ATTR_ENTI(+) = 'MAE_TIPO_DIREC' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIDC_OID_TIPO_DIRE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'SEG_TIPO_VIA' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n\n //query.append(\" and I2.VAL_OID(+) = vi.TIVI_OID_TIPO_VIA \");\n query.append(\" and I2.VAL_OID(+) = dir.tivi_oid_tipo_via \");\n query.append(\" and dir.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND dir.ZVIA_OID_VIA = vi.OID_VIA(+) \");\n //Cleal MAE-03\n if(bUsaGEOREFERENCIADOR.equals(Boolean.FALSE)){\n query.append(\" AND dir.TERR_OID_TERR = terr.OID_TERR \");\n query.append(\" AND terr.VEPO_OID_VALO_ESTR_GEOP = val.OID_VALO_ESTR_GEOP \");\n //SICC-GCC-MAE-005 - Cleal\n query.append(\" AND vi.PAIS_OID_PAIS = \"+oid.getOidPais());\n } else{\n \n query.append(\" \");\n \n }\n resultado = bs.dbService.executeStaticQuery(query.toString());\n */\n dtos.setDirecciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, FEC_HORA_DESD, \");\n query.append(\" FEC_HORA_HAST, VAL_INTE_COMU, IND_COMU_PPAL, I1.VAL_I18N DESC_TIPO_COMUN \");\n query.append(\" FROM MAE_CLIEN_COMUN, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICM_OID_TIPO_COMU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");*/\n query.append(\" SELECT i1.val_i18n desc_tipo_comun, val_dia_comu, val_text_comu, ind_comu_ppal, \");\n\n /* query.append(\" DECODE(to_char(FEC_HORA_DESD, 'HH24:MI'), NULL, ' ', to_char(FEC_HORA_DESD, 'HH24:MI')), \");\n query.append(\" DECODE(to_char(FEC_HORA_HAST, 'HH24:MI'), NULL, ' ', to_char(FEC_HORA_HAST, 'HH24:MI')), \");*/\n query.append(\" to_char(FEC_HORA_DESD, 'HH24:MI'), \");\n query.append(\" to_char(FEC_HORA_HAST, 'HH24:MI'), \");\n query.append(\" val_inte_comu \");\n query.append(\" FROM mae_clien_comun, v_gen_i18n_sicc i1 \");\n query.append(\" WHERE i1.attr_enti(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = ticm_oid_tipo_comu \");\n query.append(\" AND clie_oid_clie = \" + oid.getOid().toString());\n\n /* query.append(\" SELECT TICM_OID_TIPO_COMU, VAL_DIA_COMU, VAL_TEXT_COMU, FEC_HORA_DESD, \");\n query.append(\" FEC_HORA_HAST, VAL_INTE_COMU, IND_COMU_PPAL, I1.VAL_I18N DESC_TIPO_COMUN \");\n query.append(\" FROM MAE_CLIEN_COMUN, V_GEN_I18N_SICC I1 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_COMUN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TICM_OID_TIPO_COMU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \"); */\n resultado = bs.dbService.executeStaticQuery(query.toString());\n UtilidadesLog.debug(\"----- resultado Comunicaciones: \" + resultado);\n dtos.setComunicaciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT MARC_OID_MARC, S.DES_MARC \");\n query.append(\" FROM MAE_CLIEN_MARCA M, SEG_MARCA S \");\n query.append(\" where CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and M.MARC_OID_MARC = S.OID_MARC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n\n String[] marcas = new String[resultado.getRowCount()];\n\n for (int i = 0; i < resultado.getRowCount(); i++)\n marcas[i] = (String) resultado.getValueAt(i, 1);\n\n dtos.setMarcas(marcas);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n query.append(\" SELECT TITR_OID_TIPO_TARJ, CLTA_OID_CLAS_TARJ, CBAN_OID_BANC, I1.VAL_I18N DESC_TIPO_TARJ, \");\n query.append(\" DES_CLAS_TARJ, DES_BANC \");\n query.append(\" FROM MAE_CLIEN_TARJE, V_GEN_I18N_SICC I1, MAE_CLASE_TARJE, CCC_BANCO \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_TARJE' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TITR_OID_TIPO_TARJ \");\n query.append(\" and CLTA_OID_CLAS_TARJ = OID_CLAS_TARJ \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and CBAN_OID_BANC = OID_BANC \");\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setTarjetas(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /* query.append(\" SELECT t.TICL_OID_TIPO_CLIE, t.SBTI_OID_SUBT_CLIE, c.CLAS_OID_CLAS, c.TCCL_OID_TIPO_CLASI, \");\n query.append(\n \" c.FEC_CLAS, PERD_OID_PERI, I1.VAL_I18N DESC_TIPO_CLIENTE, I2.VAL_I18N DESC_SUB_TIPO_CLIENTE, I3.VAL_I18N DESC_CLASI, I4.VAL_I18N DESC_TIPO_CLASI_CLIENTE, I5.VAL_I18N DESC_PERIODO, \");\n query.append(\" i6.VAL_I18N desc_canal, m.DES_MARC desc_marca \");\n query.append(\" FROM MAE_CLIEN_TIPO_SUBTI t, MAE_CLIEN_CLASI c, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2, \");\n query.append(\" V_GEN_I18N_SICC I3, V_GEN_I18N_SICC I4, V_GEN_I18N_SICC I5, \");\n query.append(\" cra_perio p, seg_marca m, v_gen_i18n_sicc i6 \");\n query.append(\" WHERE I1.ATTR_ENTI(+) = 'MAE_TIPO_CLIEN' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = t.TICL_OID_TIPO_CLIE \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_SUBTI_CLIEN' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = t.SBTI_OID_SUBT_CLIE \");\n query.append(\" and I3.ATTR_ENTI(+) = 'MAE_CLASI' \");\n query.append(\" and I3.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I3.VAL_OID(+) = c.CLAS_OID_CLAS \");\n query.append(\" and I4.ATTR_ENTI(+) = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" and I4.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I4.VAL_OID(+) = c.TCCL_OID_TIPO_CLASI \");\n query.append(\" and I5.ATTR_ENTI(+) = 'CRA_PERIO' \");\n query.append(\" and I5.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I5.VAL_OID(+) = PERD_OID_PERI \");\n query.append(\" and t.OID_CLIE_TIPO_SUBT = c.CTSU_OID_CLIE_TIPO_SUBT \");\n query.append(\" AND t.CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" AND perd_oid_peri = p.OID_PERI \");\n query.append(\" AND i6.VAL_OID(+) = p.CANA_OID_CANA \");\n query.append(\" AND i6.ATTR_ENTI(+) = 'SEG_CANAL' \");\n query.append(\" AND i6.IDIO_OID_IDIO = \" + oid.getOidIdioma() + \" \");\n query.append(\" AND i6.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND p.MARC_OID_MARC = m.OID_MARC \"); */\n query.append(\" SELECT m.DES_MARC, v1.VAL_I18N, v2.VAL_I18N, \");\n query.append(\" v3.VAL_I18N, v4.VAL_I18N, v5.VAL_I18N \");\n query.append(\" FROM mae_clien_tipo_subti t, mae_clien_clasi c, cra_perio p, seg_marca m, v_gen_i18n_sicc v1, \");\n query.append(\" v_gen_i18n_sicc v2, v_gen_i18n_sicc v3, v_gen_i18n_sicc v4, v_gen_i18n_sicc v5 \");\n query.append(\" WHERE t.oid_clie_tipo_subt = c.ctsu_oid_clie_tipo_subt \");\n query.append(\" AND c.perd_oid_peri = p.oid_peri \");\n query.append(\" AND t.clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND p.MARC_OID_MARC = m.OID_MARC \"); // MARCA\n query.append(\" AND p.CANA_OID_CANA = v1.VAL_OID \"); // CANAL\n query.append(\" AND v1.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v1.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND v1.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND t.TICL_OID_TIPO_CLIE = v2.VAL_OID \"); // TIPO CLIENTE\n query.append(\" AND v2.ATTR_ENTI = 'MAE_TIPO_CLIEN' \");\n query.append(\" AND v2.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v2.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND t.SBTI_OID_SUBT_CLIE = v3.VAL_OID \"); // SUBTIPO CLIENTE\n query.append(\" AND v3.ATTR_ENTI = 'MAE_SUBTI_CLIEN' \");\n query.append(\" AND v3.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v3.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND c.TCCL_OID_TIPO_CLASI = v4.VAL_OID \"); // TIPO CLASIFICACION\n query.append(\" AND v4.ATTR_ENTI = 'MAE_TIPO_CLASI_CLIEN' \");\n query.append(\" AND v4.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v4.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" AND c.CLAS_OID_CLAS = v5.VAL_OID \"); // CLASIFICACION\n query.append(\" AND v5.ATTR_ENTI = 'MAE_CLASI' \");\n query.append(\" AND v5.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND v5.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n \n // BELC300023061 - 04/07/2006\n // Si no se obtuvo ninguna clasificacion para el cliente en la consulta anterior, \n // insertar una fila en el atributo clasificaciones, con el indicador principal activo, \n // sólo con la marca y el canal\n if (!resultado.esVacio()) {\n dtos.setClasificaciones(resultado);\n } else {\n query = new StringBuffer();\n resultado = new RecordSet();\n \n query.append(\" SELECT mar.DES_MARC, \");\n query.append(\" \t\t iCa.VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N, null VAL_I18N \");\n query.append(\" FROM MAE_CLIEN_UNIDA_ADMIN uA, \");\n query.append(\" \t CRA_PERIO per, \");\n query.append(\" \t\t SEG_MARCA mar, \");\n query.append(\" \t V_GEN_I18N_SICC iCa \");\n query.append(\" WHERE uA.CLIE_OID_CLIE = \" + oid.getOid().toString());\n query.append(\" AND uA.IND_ACTI = 1 \");\n query.append(\" \t AND uA.PERD_OID_PERI_INI = per.OID_PERI \");\n query.append(\" \t AND per.MARC_OID_MARC = mar.OID_MARC \");\n query.append(\" AND per.CANA_OID_CANA = iCa.VAL_OID \");\n query.append(\" AND iCa.ATTR_NUM_ATRI = 1 \");\n query.append(\" AND iCa.ATTR_ENTI = 'SEG_CANAL' \");\n query.append(\" AND iCa.IDIO_OID_IDIO = \" + oid.getOidIdioma());\n query.append(\" ORDER BY uA.OID_CLIE_UNID_ADMI ASC \");\n \n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setClasificaciones(resultado);\n }\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n //el false se utiliza para indicar que estas filas son de problemas \n //el true indica que estas filas son de soluciones \n query.append(\" SELECT i1.VAL_I18N, DES_PROB, decode(IND_SOLU,0,'false',1,'true') IND_SOLU, I2.VAL_I18N TSOC_OID_TIPO_SOLU, DES_SOLU, VAL_NEGO_PROD \");\n query.append(\" FROM MAE_CLIEN_PROBL, V_GEN_I18N_SICC I1, V_GEN_I18N_SICC I2 \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_PROBL' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TIPB_OID_TIPO_PROB \");\n query.append(\" and I2.ATTR_ENTI(+) = 'MAE_TIPO_SOLUC' \");\n query.append(\" and I2.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I2.VAL_OID(+) = TSOC_OID_TIPO_SOLU \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setProblemasSoluciones(resultado);\n\n query = new StringBuffer();\n resultado = new RecordSet();\n\n /*SELECT s.des_marc, i1.val_i18n desc_tipo_perfil_psico, cod_test, fec_psic\n FROM mae_psico, v_gen_i18n_sicc i1, seg_marca s\n WHERE i1.attr_enti(+) = 'MAE_TIPO_PERFI_PSICO'\n AND i1.idio_oid_idio(+) = 1\n AND i1.val_oid(+) = tpoid_tipo_perf_psic\n AND clie_oid_clie = 152\n AND marc_oid_marc = s.oid_marc */\n query.append(\" SELECT s.des_marc, i1.val_i18n desc_tipo_perfil_psico, cod_test, fec_psic \");\n query.append(\" FROM mae_psico, v_gen_i18n_sicc i1, seg_marca s \");\n query.append(\" WHERE i1.attr_enti(+) = 'MAE_TIPO_PERFI_PSICO' \");\n query.append(\" AND i1.idio_oid_idio(+) = \" + oid.getOidIdioma().toString());\n query.append(\" AND i1.val_oid(+) = tpoid_tipo_perf_psic \");\n query.append(\" AND clie_oid_clie = \" + oid.getOid().toString());\n query.append(\" AND marc_oid_marc = s.oid_marc \");\n\n /* query.append(\" SELECT MARC_OID_MARC, TPOID_TIPO_PERF_PSIC, COD_TEST, FEC_PSIC, \");\n query.append(\" I1.VAL_I18N DESC_TIPO_PERFIL_PSICO, S.DES_MARC \");\n query.append(\" FROM MAE_PSICO, V_GEN_I18N_SICC I1, SEG_MARCA S \");\n query.append(\" where I1.ATTR_ENTI(+) = 'MAE_TIPO_PERFI_PSICO' \");\n query.append(\" and I1.IDIO_OID_IDIO(+) = \" + oid.getOidIdioma() + \" \");\n query.append(\" and I1.VAL_OID(+) = TPOID_TIPO_PERF_PSIC \");\n query.append(\" and CLIE_OID_CLIE = \" + oid.getOid() + \" \");\n query.append(\" and MARC_OID_MARC = S.OID_MARC \");*/\n resultado = bs.dbService.executeStaticQuery(query.toString());\n dtos.setPsicografias(resultado);\n } catch (CreateException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (RemoteException re) {\n throw new MareException(re, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_LOCALIZAR_UN_COMPONENTE_EJB));\n } catch (Exception e) {\n e.printStackTrace();\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n UtilidadesLog.debug(\"DTO a retornar: \" + dtos.toString());\n UtilidadesLog.info(\" DAOMAEMaestroClientes.consultarCliente(DTOOID): Salida\");\n\n return dtos;\n }",
"public static void main(String[] args) {\n Client clientIP = new IndividualEntrepreneur(100000);\n System.out.println(clientIP);\n// client.deposit(555);\n// System.out.println(client);\n// client.deposit(1234);\n// System.out.println(client);\n// client.withdraw(1498);\n// System.out.println(client);\n\n Client clientOOO= new legalEntity(200000);\n System.out.println(clientOOO);\n// client1.deposit(1234);\n// System.out.println(client1);\n// client1.withdraw(10000);\n// System.out.println(client1);\n clientOOO.send(clientIP,2000);\n System.out.println(clientIP);\n System.out.println(clientOOO);\n clientIP.getInformation();\n clientOOO.getInformation();\n\n System.out.println(\"Hah Set \" + clientIP.getClientSet());\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().clear();\n System.out.println(clientIP.getClientSet());\n Client clientInd = new Individual(50000);\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().add(clientInd);\n clientIP.getClientSet().add(clientInd);\n System.out.println(clientIP.getClientSet());\n\n }",
"public static void menuClientes() throws ClienteException, PersistenciaException, DniException, DireccionException, PersonaException {\n boolean salir = false;\n int opcion;\n Cliente cliente;\n\n while (!salir) {\n System.out.println(\"\\n1. Insertar nuevo cliente\");\n System.out.println(\"2. Modificar cliente\");\n System.out.println(\"3. Eliminar cliente\");\n System.out.println(\"4. Listado de clientes\");\n System.out.println(\"5. Buscar cliente\");\n System.out.println(\"6. Salir\\n\");\n cliente = null;\n String dni = null;\n\n try {\n System.out.print(\"Intrduzca una de las opciones: \");\n opcion = teclado.nextInt();\n teclado.nextLine();\n System.out.println(\"\");\n\n switch (opcion) {\n case 1:\n cliente = generarDatosCliente(true);\n clienteController.insertar(cliente);\n System.out.println(\"\\nCliente insertado\");\n break;\n case 2:\n System.out.println(\"Proceda a introducir los datos, el DNI debe mantenerse igual\");\n cliente = generarDatosCliente(false);\n clienteController.modificar(cliente);\n System.out.println(\"\\nCliente modificado\");\n break;\n case 3:\n System.out.print(\"Introduzca el dni del cliente: \");\n dni = teclado.nextLine();\n validarDni(dni);\n clienteController.eliminar(clienteController.buscar(dni));\n System.out.println(\"\\nCliente eliminado\");\n break;\n case 4:\n System.out.println(\"Lista de clientes: \");\n ArrayList<Cliente> clientes = clienteController.listadoClientes();\n for (Cliente cliente2 : clientes) {\n System.out.println(cliente2.toString());\n }\n break;\n case 5:\n System.out.print(\"Introduzca el dni del cliente: \");\n dni = teclado.next();\n validarDni(dni);\n cliente = clienteController.buscar(dni);\n System.out.println(cliente.toString());\n break;\n case 6:\n salir = true;\n break;\n default:\n System.out.println(\"Solo numeros entre 1 y 6\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Debe insertar una opcion correcta\");\n teclado.next();\n }\n }\n }"
] |
[
"0.7234523",
"0.72253585",
"0.712727",
"0.68859464",
"0.6859142",
"0.6845065",
"0.684283",
"0.6797309",
"0.67851627",
"0.67693126",
"0.6768373",
"0.67533106",
"0.6721024",
"0.671872",
"0.6710516",
"0.66892153",
"0.6668658",
"0.6635663",
"0.6632685",
"0.66048807",
"0.65859675",
"0.6577735",
"0.6575242",
"0.65708417",
"0.6564073",
"0.6554315",
"0.65227526",
"0.6521214",
"0.65203094",
"0.65174246",
"0.6505795",
"0.649059",
"0.6487809",
"0.6448094",
"0.64425015",
"0.64263535",
"0.6423355",
"0.642325",
"0.6415172",
"0.6400173",
"0.6386169",
"0.63695604",
"0.6367822",
"0.635674",
"0.63370264",
"0.6335471",
"0.6331319",
"0.6330556",
"0.6329204",
"0.6305127",
"0.62974817",
"0.6289266",
"0.62850434",
"0.62784374",
"0.62766945",
"0.6271649",
"0.6241716",
"0.6223099",
"0.6216999",
"0.62104064",
"0.6200394",
"0.61909723",
"0.6183366",
"0.61825556",
"0.6175806",
"0.6166466",
"0.6142915",
"0.6131976",
"0.6127559",
"0.6127263",
"0.61184406",
"0.60982466",
"0.6095896",
"0.6087638",
"0.6085571",
"0.6080625",
"0.6077627",
"0.60688627",
"0.60619384",
"0.60618544",
"0.6054364",
"0.60528946",
"0.6042069",
"0.60380715",
"0.6033254",
"0.60317695",
"0.60291755",
"0.6026523",
"0.6010216",
"0.6004602",
"0.6003986",
"0.5988364",
"0.59853333",
"0.59775245",
"0.59742135",
"0.5969965",
"0.59698504",
"0.5966767",
"0.59656525",
"0.5953845",
"0.594616"
] |
0.0
|
-1
|
anade costo de plato ya producido a la factura
|
public void addToBill(int newBill){
Bill = Bill + newBill;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public double calcular_costo() {\n\t\t return 1.3*peso+30 ;\n\t}",
"@Override public double getCosto(){\n double d = 190.00;\n return d;\n }",
"double getCost();",
"double getCost();",
"@Override\n public double getCost() {\n\t return 13;\n }",
"public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }",
"private double calcuFcost() {\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('t');\n\t}",
"public static double calcularCosto(String tipoLicencia, int vigencia) {\n float monto = 0;\n switch(tipoLicencia){\n case \"Clase A\": \n switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase B\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase C\": switch(vigencia){\n case 1: monto = 23;\n break;\n case 3: monto = 30;\n break;\n case 4: monto = 35;\n break;\n case 5: monto = 47;\n break;\n }\n break;\n case \"Clase D\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase E\": switch(vigencia){\n case 1: monto = 29;\n break;\n case 3: monto = 39;\n break;\n case 4: monto = 44;\n break;\n case 5: monto = 59;\n break;\n }\n break;\n case \"Clase F\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n case \"Clase G\": switch(vigencia){\n case 1: monto = 20;\n break;\n case 3: monto = 25;\n break;\n case 4: monto = 30;\n break;\n case 5: monto = 40;\n break;\n }\n break;\n } \n return monto;\n }",
"public long getCosto() {\n return costo;\n }",
"@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}",
"int getCost();",
"int getCost();",
"int getCost();",
"public double calcCost(){\n double cost = 0;\n cost += pMap.get(size);\n cost += cMap.get(crust);\n //Toppings are priced at 3.00 for 3-4 topppings, and 4.0 for 5+ toppings\n \n if(toppings !=null)\n {\n if((toppings.length == 3) || (toppings.length == 4)){\n cost += 3.0;\n }\n if (toppings.length > 4){\n cost += 4.0;\n }\n }\n \n return cost;\n }",
"public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }",
"public double darCosto(){\n return costo;\n }",
"@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}",
"double getTotalCost();",
"public abstract double getCost();",
"public int getProteksi(){\n\t\treturn (getTotal() - getPromo()) * protectionCost / 100;\n\t}",
"double objetosc() {\n return dlugosc * wysokosc * szerokosc; //zwraca obliczenie poza metode\r\n }",
"public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}",
"public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }",
"public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}",
"@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo;\n\t}",
"@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}",
"public float carga(){\n return (this.capacidade/this.tamanho);\n }",
"private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}",
"public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}",
"public double getCost()\n\t{\n\t\treturn 0.9;\n\t}",
"public double getCost() {\n return quantity*ppu;\n\n }",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"private int calcularCosto(final Nodo origen, final Nodo fin) {\n\t\treturn (int) Math.sqrt((int) Math.pow((origen.getPosicionX() - fin.getPosicionX()), 2)\n\t\t\t\t+ (int) Math.pow((origen.getPosicionY() - fin.getPosicionY()), 2));\n\t}",
"@Override\n public int getCost() {\n\treturn 0;\n }",
"public double getParidadCosto() {\r\n return paridadCosto;\r\n }",
"public float getCost()\r\n/* 13: */ {\r\n/* 14:10 */ return this.costFromStart + this.estimatedCostToGoal;\r\n/* 15: */ }",
"public BigDecimal getCost() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"Cost\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"public double getCustoAluguel(){\n return 2 * cilindradas;\n }",
"public Integer calcularCosto() {\n return componente.getPrecio() + tipoDeEnvio.calcularCosto(this.componente.getPeso(), cliente.getUbicacion());\n }",
"public int getCosto() {\n\t\treturn producto.getCosto();\n\t}",
"public double calcCost() {\n // $2 per topping.\n double cost = 2 * (this.cheese + this.pepperoni + this.ham);\n // size cost\n switch (this.size) {\n case \"small\":\n cost += 10;\n break;\n case \"medium\":\n cost += 12;\n break;\n case \"large\":\n cost += 14;\n break;\n default:\n }\n return cost;\n }",
"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 getCost() {\n\t\treturn 1.25;\n\t}",
"@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}",
"public double getCost(StringBuffer detail, boolean ignoreAmmo) {\n double[] costs = new double[15];\n int i = 0;\n\n double cockpitCost = 0;\n if (getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) {\n cockpitCost = 750000;\n } else if (getCockpitType() == Mech.COCKPIT_DUAL) {\n // FIXME\n cockpitCost = 0;\n } else if (getCockpitType() == Mech.COCKPIT_COMMAND_CONSOLE) {\n // Command Consoles are listed as a cost of 500,000.\n // That appears to be in addition to the primary cockpit.\n cockpitCost = 700000;\n } else if (getCockpitType() == Mech.COCKPIT_SMALL) {\n cockpitCost = 175000;\n } else if (getCockpitType() == Mech.COCKPIT_INDUSTRIAL) {\n cockpitCost = 100000;\n } else {\n cockpitCost = 200000;\n }\n if (hasEiCockpit() && getCrew().getOptions().booleanOption(\"ei_implant\")) {\n cockpitCost = 400000;\n }\n costs[i++] = cockpitCost;\n costs[i++] = 50000;// life support\n costs[i++] = weight * 2000;// sensors\n int muscCost = hasTSM() ? 16000 : 2000;\n costs[i++] = muscCost * weight;// musculature\n costs[i++] = EquipmentType.getStructureCost(structureType) * weight;// IS\n costs[i++] = getActuatorCost();// arm and/or leg actuators\n Engine engine = getEngine();\n costs[i++] = engine.getBaseCost() * engine.getRating() * weight / 75.0;\n if (getGyroType() == Mech.GYRO_XL) {\n costs[i++] = 750000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 0.5;\n } else if (getGyroType() == Mech.GYRO_COMPACT) {\n costs[i++] = 400000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 1.5;\n } else if (getGyroType() == Mech.GYRO_HEAVY_DUTY) {\n costs[i++] = 500000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f) * 2;\n } else {\n costs[i++] = 300000 * (int) Math.ceil(getOriginalWalkMP() * weight / 100f);\n }\n double jumpBaseCost = 200;\n // You cannot have JJ's and UMU's on the same unit.\n if (hasUMU()) {\n costs[i++] = Math.pow(getAllUMUCount(), 2.0) * weight * jumpBaseCost;\n } else {\n if (getJumpType() == Mech.JUMP_BOOSTER) {\n jumpBaseCost = 150;\n } else if (getJumpType() == Mech.JUMP_IMPROVED) {\n jumpBaseCost = 500;\n }\n costs[i++] = Math.pow(getOriginalJumpMP(), 2.0) * weight * jumpBaseCost;\n }\n // num of sinks we don't pay for\n int freeSinks = hasDoubleHeatSinks() ? 0 : 10;\n int sinkCost = hasDoubleHeatSinks() ? 6000 : 2000;\n // cost of sinks\n costs[i++] = sinkCost * (heatSinks() - freeSinks);\n costs[i++] = hasFullHeadEject()?1725000:0;\n costs[i++] = getArmorWeight() * EquipmentType.getArmorCost(armorType);\n costs[i++] = getWeaponsAndEquipmentCost(ignoreAmmo);\n\n double cost = 0; // calculate the total\n for (int x = 0; x < i; x++) {\n cost += costs[x];\n }\n\n double omniMultiplier = 0;\n if (isOmni()) {\n omniMultiplier = 1.25f;\n cost *= omniMultiplier;\n }\n costs[i++] = -omniMultiplier; // negative just marks it as multiplier\n\n double weightMultiplier = 1 + (weight / 100f);\n costs[i++] = -weightMultiplier; // negative just marks it as multiplier\n cost = Math.round(cost * weightMultiplier);\n if (detail != null) {\n addCostDetails(cost, detail, costs);\n }\n return cost;\n }",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }",
"public abstract int getCost();",
"public abstract int getCost();",
"public abstract int getCost();",
"@Override\r\n\tprotected void processCost() {\n\r\n\t}",
"public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}",
"public double GetCost() {\n if( LotSize != CurLotSize ) {\n double CostPerShot = Cost / (double) LotSize;\n return CommonTools.RoundFractionalTons( CostPerShot * (double) CurLotSize );\n }\n return Cost;\n }",
"float getCostReduction();",
"int getResourceCost();",
"@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}",
"private double calcCost(Cloudlet cloudlet, FogDevice fogDevice) {\n double cost = 0;\n //cost includes the processing cost\n cost += fogDevice.getCharacteristics().getCostPerSecond() * cloudlet.getCloudletLength( ) / fogDevice.getHost().getTotalMips();\n // cost includes the memory cost\n cost += fogDevice.getCharacteristics().getCostPerMem() * cloudlet.getMemRequired();\n // cost includes the bandwidth cost\n cost += fogDevice.getCharacteristics().getCostPerBw() * (cloudlet.getCloudletFileSize() + cloudlet.getCloudletOutputSize());\n return cost;\n }",
"public void daiGioco() {\n System.out.println(\"Scrivere 1 per giocare al PC, al costo di 200 Tam\\nSeleziona 2 per a Calcio, al costo di 100 Tam\\nSeleziona 3 per Disegnare, al costo di 50 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiFelicita += 60;\n puntiVita -= 30;\n soldiTam -= 200;\n }\n case 2 -> {\n puntiFelicita += 40;\n puntiVita -= 20;\n soldiTam -= 100;\n }\n case 3 -> {\n puntiFelicita += 30;\n puntiVita -= 10;\n soldiTam -= 50;\n }\n }\n checkStato();\n }",
"public double getTcCosto() {\r\n return tcCosto;\r\n }",
"private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }",
"public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }",
"public CostInfo getCostInfo();",
"public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }",
"public double getCosts();",
"public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }",
"public int get_cost() {\n return (int)getUIntElement(offsetBits_cost(), 16);\n }",
"public double getCost() {\n\t\tif (this.accommodationType.equals(TYPEsingle)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 50.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\treturn 70.0;\n\t\t\t} else {\n\t\t\t\treturn 110.0;\n\t\t\t}\n\t\t} else if (this.accommodationType.equals(TYPEdouble)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 70.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\treturn 98.0;\n\t\t\t} else {\n\t\t\t\treturn 154.0;\n\t\t\t}\n\t\t} else if (this.accommodationType.equals(TYPEfamily)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 86.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 180.6;\n\t\t\t\t} else {\n\t\t\t\t\treturn 120.4;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 283.8;\n\t\t\t\t} else {\n\t\t\t\t\treturn 189.2;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.accommodationType.equals(TYPEpresidential)) {\n\t\t\tif (this.getRoomView().equals(\"street view\")) {\n\t\t\t\treturn 200.0;\n\t\t\t} else if (this.getRoomView().equals(\"garden view\")) {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 420.0;\n\t\t\t\t} else {\n\t\t\t\t\treturn 280.0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (getInfoJacuzzi() == true) {\n\t\t\t\t\treturn 660.0;\n\t\t\t\t} else {\n\t\t\t\t\treturn 440.0;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0.0;\n\t\t}\n\t}",
"@Override\r\n\tpublic double getCost() {\n\t\treturn 0;\r\n\t}",
"public Double calcularPrecio() {\n double adicion = 0.0;\n\n switch (tipoAlimento) {\n case 'N':\n // Producto Natural\n adicion += 40;\n break;\n\n case 'C':\n // Producto con Conservantes\n adicion += 20;\n break;\n\n default:\n break;\n }\n\n // El peso tambien afecta el precio final del producto\n if (peso >= 0 && peso <= 9) {\n adicion += 6;\n }\n if (peso > 9 && peso <= 16) {\n adicion += 8;\n }\n if (peso > 16) {\n adicion += 20;\n }\n\n return precioBase + adicion;\n }",
"public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }",
"@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}",
"public static Documento calcularExcento(Documento doc, List<DocumentoDetalleVo> productos) {\n\t\tDouble totalReal = 0.0, exectoReal = 0.0;\n\t\tDouble gravado = 0.0;\n\t\tDouble ivatotal = 0.0;\n\t\tDouble peso = 0.0;\n\t\tDouble iva5 = 0.0;\n\t\tDouble iva19 = 0.0;\n\t\tDouble base5 = 0.0;\n\t\tDouble base19 = 0.0;\n\t\tDouble costoTotal =0.0;\n\t\t//este campo es para retencion del hotel\n\t\tDouble retencion =0.0;\n\t\t// aqui voy toca poner a sumar las variables nuebas para que se reflejen\n\t\t// en el info diario\n\t\tfor (DocumentoDetalleVo dDV : productos) {\n\t\t\tLong productoId = dDV.getProductoId().getProductoId();\n\t\t\tDouble costoPublico = dDV.getParcial();\n\t\t\tDouble costo = (dDV.getProductoId().getCosto()==null?0.0:dDV.getProductoId().getCosto())*dDV.getCantidad();\n\t\t\tDouble iva1 = dDV.getProductoId().getIva().doubleValue() / 100;\n\t\t\tDouble peso1 = dDV.getProductoId().getPeso() == null ? 0.0 : dDV.getProductoId().getPeso();//\n\t\t\tpeso1 = peso1 * dDV.getCantidad();\n\t\t\ttotalReal += costoPublico;\n\t\t\tcostoTotal+=costo;\n\t\t\tdouble temp;\n\t\t\tivatotal = ivatotal + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\tpeso = peso + peso1;\n\t\t\t// si es iva del 19 se agrega al documento junto con la base\n\t\t\tif (iva1 == 0.19) {\n\t\t\t\tiva19 = iva19 + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\t\tbase19 = base19 + (costoPublico / (1 + iva1));\n\t\t\t}\n\t\t\t// si es iva del 5 se agrega al documento junto con la base\n\t\t\tif (iva1 == 0.05) {\n\t\t\t\tiva5 = iva5 + ((costoPublico / (1 + iva1)) * iva1);\n\t\t\t\tbase5 = base5 + (costoPublico / (1 + iva1));\n\t\t\t}\n\t\t\tif (iva1 > 0.0) {\n\t\t\t\ttemp = costoPublico / (1 + iva1);\n\t\t\t\tgravado += temp;\n\n\t\t\t} else {\n\t\t\t\ttemp = costoPublico;\n\t\t\t\t//no suma el excento si es producto retencion\n\t\t\t\tif( productoId!=6l && productoId!=7l) {\n\t\t\t\t\texectoReal += temp;\n\t\t\t\t}else {\n\t\t\t\t\tretencion+= temp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tdoc.setTotal(totalReal);\n\t\tdoc.setSaldo(totalReal);\n\t\tdoc.setExcento(exectoReal);\n\t\tdoc.setGravado(gravado);\n\t\tdoc.setIva(ivatotal);\n\t\tdoc.setPesoTotal(peso);\n\t\tdoc.setIva5(iva5);\n\t\tdoc.setIva19(iva19);\n\t\tdoc.setBase5(base5);\n\t\tdoc.setBase19(base19);\n\t\tdoc.setTotalCosto(costoTotal);\n\t\tdoc.setRetefuente(retencion);\n\t\treturn doc;\n\t}",
"@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}",
"private void calculateCosts() {\r\n lb_CubicSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Volume)) + \" €\");\r\n lb_MaterialCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Price)) + \" €\");\r\n lb_CuttingTimeSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingHours)) + \" €\");\r\n lb_CuttingCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice)) + \" €\");\r\n lb_TotalCosts.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice) + getColmunSum(tc_Price)) + \" €\");\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n }",
"public double getCost() {\t\t \n\t\treturn cost;\n\t}",
"private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }",
"public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}",
"public void setCosto(long pCosto) {\n this.costo = pCosto;\n }",
"@Override\n\tpublic double calculaDesconto() {\n\t\treturn this.gastosEmCongressos;\n\t}",
"public double calcularPortes() {\n\t\tif (this.pulgadas <= 40) {\n\t\t\tif (this.getPrecioBase() > 500)\n\t\t\t\treturn 0;\n\t\t\telse\n\t\t\t\treturn 35;\n\t\t} else\n\t\t\treturn 35 + (this.pulgadas - 40);\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}",
"@Override\n\tpublic Double calcular(Produto produto) {\n\t\treturn (produto.getValorUnitario()) - (produto.getValorUnitario() * 0.25);\n\t}",
"public double getCost(int miles, int time) {\n\t\treturn 1.00 + (time / 30 ); \n\t}",
"@Override\n\tpublic int calculateCost() \n\t{\n\t\treturn (this.modernCenterpieceCost*this.centerpieceCount);\n\t}",
"public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}",
"@Pure\n\tdouble getCost();",
"public double calculatingCostO(int quantity)\n { \n cost = 750 + (0.25 * quantity);\n return cost;\n \n }",
"private Map<String,Double> getPromedioHabilidades(Cuadrilla cuadrilla){\n\t\tSystem.out.println(\"#### getPromedioHabilidades ######\");\n\t\tdouble proprod= 0, protrae= 0, prodorm = 0, prodcaa = 0;\n\t\tint cantper = 0;\n\t\tfor (CuadrillasDetalle cd : cuadrilla.getCuadrillasDetalles()) {\n\t\t\t\n\t\t\tList<TecnicoCompetenciaDetalle> tcds = \tcd.getTecnico().getTecnicoCompetenciaDetalles();\n\t\t\tfor (TecnicoCompetenciaDetalle tcd : tcds) {\n\t\t\t\tInteger codigoComp = tcd.getCompetencia().getCodigoCompetencia();\n\t\t\t\tswitch(codigoComp){\n\t\t\t\t\tcase COMPETENCIA_PRODUCTIVIDAD:\n\t\t\t\t\t\tproprod = proprod+ tcd.getGradoCompetencia().doubleValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase COMPETENCIA_TRABAJO_EQUIPO:\n\t\t\t\t\t\tprotrae = protrae + tcd.getGradoCompetencia().doubleValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase COMPETENCIA_ORIENTACION_METAS:\n\t\t\t\t\t\tprodorm = prodorm + tcd.getGradoCompetencia().doubleValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase COMPETENCIA_CALIDAD_ATENCION:\n\t\t\t\t\t\tprodcaa = prodcaa +tcd.getGradoCompetencia().doubleValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcantper++;\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t// promedio de las competencias de los tenicos de cada cuadrilla\n\t\tproprod = proprod/cantper; \n\t\tprotrae = protrae/cantper;\n\t\tprodorm = prodorm/cantper;\n\t\tprodcaa = prodcaa/cantper;\n\n\t\tMap<String, Double> mpproms = new LinkedHashMap<String,Double>();\n\t\tmpproms.put(\"proprod\", proprod);\n\t\tmpproms.put(\"protrae\", protrae);\n\t\tmpproms.put(\"prodorm\", prodorm);\n\t\tmpproms.put(\"prodcaa\", prodcaa);\n\t\n\t\treturn mpproms;\n\t\t\n\t}",
"public double calculateCost(Purchase purchase);",
"private Long calcTiempoCompensado(Long tiempoReal, Barco barco, Manga manga) {\n //Tiempo compensado = Tiempo Real + GPH * Nº de millas manga.\n Float res = tiempoReal + barco.getGph() * manga.getMillas();\n return (long) Math.round(res);\n }",
"protected abstract double getDefaultCost();",
"public void getCosts() {\n\t}",
"public int getCost() { return hki.getBound(); }",
"public double getCost() \n { \n return super.getCost() +22;\n }",
"public double getCost() {\r\n\t\t\r\n\t\tif (super.getSize() == \"Small\") { totalCost = 2.00; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Medium\") { totalCost = 2.50; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Large\") { totalCost = 3.00; }\r\n\t\t\r\n\t\treturn totalCost;\r\n\t}",
"double ComputeCost(double order, double tipPercent, double serviceRating, double foodRating)\r\n {\r\n // kazda gwiazdka to 2 procent od sumy zamówienia\r\n return order + order * (tipPercent/100) + (serviceRating * 0.02) * order + (foodRating * 0.02) * order;\r\n }",
"float getCostScale();",
"double calculateDeliveryCost(Cart cart);",
"@Override\r\n public double getBaseCost() { return type.getCost(); }",
"@Override\n public double cost(){\n return 1 + super.sandwich.cost();\n }"
] |
[
"0.76100093",
"0.7190875",
"0.6698123",
"0.6698123",
"0.6626459",
"0.65602374",
"0.65551364",
"0.6542995",
"0.65350664",
"0.651182",
"0.65102786",
"0.65102786",
"0.65102786",
"0.6505751",
"0.6502803",
"0.6495642",
"0.6478217",
"0.646762",
"0.64331347",
"0.64316976",
"0.6422814",
"0.6386101",
"0.6361279",
"0.63507855",
"0.634585",
"0.6340541",
"0.63281906",
"0.6321759",
"0.6310855",
"0.6305654",
"0.62889355",
"0.6288148",
"0.628061",
"0.6261863",
"0.62602705",
"0.6260106",
"0.62592906",
"0.6246311",
"0.62409675",
"0.62371635",
"0.62347615",
"0.62303936",
"0.62253505",
"0.6204314",
"0.61868334",
"0.6179042",
"0.6175329",
"0.6174712",
"0.6174712",
"0.6174712",
"0.61737394",
"0.6165595",
"0.61626196",
"0.6139404",
"0.6135467",
"0.6128039",
"0.6123015",
"0.6122317",
"0.61112314",
"0.611042",
"0.6088537",
"0.60871583",
"0.6086729",
"0.60758376",
"0.6075591",
"0.60714656",
"0.60694623",
"0.60693496",
"0.606922",
"0.60685635",
"0.60676914",
"0.60638636",
"0.6061918",
"0.60606164",
"0.6058728",
"0.60583085",
"0.6055463",
"0.60388803",
"0.6031543",
"0.602929",
"0.6018984",
"0.60129315",
"0.6010239",
"0.6004589",
"0.60011965",
"0.6000192",
"0.59979314",
"0.59928745",
"0.599157",
"0.5990572",
"0.59840816",
"0.598382",
"0.5982401",
"0.59658766",
"0.5960672",
"0.5957188",
"0.595456",
"0.59539807",
"0.59538674",
"0.59525645",
"0.59461135"
] |
0.0
|
-1
|
disminuye en 1 a paciencia del cliente
|
public void updatePatience(){
Patience = Patience - 1;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic Cliente buscarUnCliente(Integer idcliente) {\n\t\treturn clienteDao.buscarUnCliente(idcliente);\n\t}",
"private void removeClient () {\n AutomatedClient c = clients.pollFirstEntry().getValue();\n Nnow--;\n\n c.signalToLeave();\n System.out.println(\"O cliente \" + c.getUsername() + \" foi sinalizado para sair\");\n }",
"@Override\n\tpublic Integer alta(Cliente cliente) {\n\t\treturn null;\n\t}",
"void realizarSolicitud(Cliente cliente);",
"@Override\n\tpublic int editarCliente(ClienteBean cliente) throws Exception {\n\t\treturn 0;\n\t}",
"public void removerClienteDoBanco(){\n\t\tdao.removerCliente(doCadastroController);\r\n\t}",
"public static void decreaseNumberOfClients()\n {\n --numberOfClients;\n }",
"public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}",
"@Override\n\tpublic int eliminarCliente(int id) throws Exception {\n\t\treturn 0;\n\t}",
"public void disociarMedidorDeCliente (Cliente c){\r\n\t\t//TODO Implementar metodo\r\n\t}",
"public void ExclusaoDeCadastroCliente(Cliente cliente, String cpf_cliente, String senha) throws SQLException {\r\n String query = \"DELETE * FROM CLIENTE WHERE COD_CLIENTE = \" + cpf_cliente + \" and SENHA = \" + senha;\r\n delete(query, cliente.getNome(), cliente.getCpf(), cliente.getData_nascimento(), cliente.getSexo(), cliente.getCep(), cliente.getRua(), cliente.getNumero(), cliente.getBairro(), cliente.getCidade(), cliente.getEstado(), cliente.getTelefone_residencial(), cliente.getCelular(), cliente.getEmail(), cliente.getSenha());\r\n }",
"public void setIdCliente(int value) {\n this.idCliente = value;\n }",
"public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }",
"static protected Cliente verificar(Cliente cliente) throws Exception {\n\t\tClienteRepositorio repositorio = new ClienteRepositorio();\n\t\tCliente procurado = null;\n\t\ttry {\n\t\t\tprocurado = repositorio.consultaPorId(cliente);\n\t\t\t\n\t\t\tif (procurado == null) {\n\t\t\t\tthrow new Exception(\"Cliente inexistente na base de dados.\");\n\t\t\t}\n\t\t} catch (ConexaoException e) {\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Estamos com dificuldades. Tente novamente mais tarde (daqui a 12horas)<br/>[ALTERAR] Erro: \" + e.getMessage());\n\t\t} catch (RepositorioException e) {\n\t\t\tthrow new Exception(\"O programador fez kk. Nem adianta tentar de novo.<br/>[ALTERAR] Erro: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn procurado;\n\t}",
"public void novo() {\n cliente = new Cliente();\n }",
"public void supprimerClient(String nom, String prenom) {\n\t\tIterator<Client> it = clients.iterator();\n\t\tboolean existant = true;\n\t\twhile (it.hasNext()) {\n\t\t\tClient client = it.next();\n\t\t\tif (nom == client.getNom() && prenom == client.getPrenom()) {\n\t\t\t\tit.remove();\n\t\t\t\tSystem.out.println(\"Le client \" + client.getNom() + \" \" + client.getPrenom() + \" a bien ´┐Żt´┐Ż supprim´┐Ż dans la base de donn´┐Żes\");\n\t\t\t\texistant = false;\n\t\t\t\tSystem.out.println(clients.size());\n\t\t\t}\n\t\t}\n\t\tif (existant == true) {\n\t\t\tSystem.out.println(\"Action impossible, ce client n'existe pas\");\n\t\t}\n\t}",
"Boolean deleteClient(Client client){\n return true;\n }",
"public synchronized void decrementClients()\r\n\t{\r\n\t\tnumberOfClients--;\r\n\t}",
"public void excluir() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Excluir(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente excluido com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"Não é possível excluir um cliente que tenha uma venda associado!\");\n e.printStackTrace();\n }\n }",
"private Client lireClientServ(int idClient) {\n\t\tClient client = daoclient.readClientDaoById(idClient);\n\t\treturn client;\n\t}",
"public boolean removerCliente(int i) {\n\t\tString clienteRemovido = d.getClientes()[i].getNome();\n//\t\tString aux;\n\t\t\t\t\n\t\tif(i == (d.getQtdclientes() - 1)) { // O Cliente a ser removido est� no final do array\n\t\t\td.setQtdclientes(d.getQtdclientes() - 1);\n\t\t\td.getClientes()[d.getQtdclientes()] = null;\n\t\t\treturn true;\n\t\t} else { // o Cliente a ser removido est� no meio do array\n\t\t\tint cont = 0;\n\t\t\twhile(d.getClientes()[cont].getNome().compareTo(clienteRemovido) != 0) {\n\t\t\t\tcont++;\n\t\t\t}\n\t\t\t//Rotina swap\n\t\t\tfor(int j = cont; j < d.getQtdclientes() - 1; j++) {\n\t\t\t\td.getClientes()[j] = null;\n\t\t\t\td.getClientes()[j] = d.getClientes()[j+1];\n\t\t\t}\n\t\t\td.getClientes()[d.getQtdclientes()] = null;\n\t\t\td.setQtdclientes(d.getQtdclientes() - 1);\n\t\t\treturn true;\n\t\t}\n\t}",
"protected void makeClientMissed() {\n\t\tArrayList<String> key = new ArrayList<String>();\r\n\r\n\t\tkey.add(\"id\");\r\n\r\n\t\tArrayList<String> value = new ArrayList<String>();\r\n\r\n\t\tvalue.add(GlobalVariable.TrainerSessionId);\r\n\r\n\t\tSystem.out.println(\"se\" + GlobalVariable.TrainerSessionId);\r\n\r\n\t\td.showCustomSpinProgress(TrainerHomeActivity.this);\r\n\r\n\t\tString url = Constants.WEBSERVICE_URL+\"/webservice/missed\";\r\n\r\n\t\tcallWebService = new AsyncTaskCall(\r\n\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\t1,\r\n\t\t\t\turl,\r\n\t\t\t\tkey, value);\r\n\t\tcallWebService.execute();\r\n\r\n\t\tDialogView.customSpinProgress\r\n\t\t\t\t.setOnCancelListener(new OnCancelListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tcallWebService.cancel(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}",
"public String elimiinaClienteId(Long id){\n\t\tOptional <Cliente> optCliente = clienteRepository.findById(id);\n\t\tif(optCliente.isEmpty()){\n\t\t\tthrow new IllegalArgumentException(\"No se encontró el id del usuario\");\n\t\t}\n\t\tCliente cliente = optCliente.get();\n\t\t// Elimina sus tickets\n\t\tticketRepository.deleteAll(ticketRepository.findByClienteId(cliente.getId()));\n\t\t// Elimina el cliente\n\t\tcliente.setNegocio(null);\n\t\tclienteRepository.save(cliente);\n\t\tclienteRepository.delete(cliente);\n\t\t\n\t\treturn \"Se elimino el cliente con el id : \" + id;\n\t}",
"public static void clientsDecrement() {\n if (clientsNumber > 0) {\n clientsNumber--;\n }\n System.out.println(clientsNumber);\n }",
"public boolean eliminarCliente(int codigo){\n\t\ttry{\n\t\t\tString insert = \"DELETE FROM clientes WHERE codigo = ? ;\";\n\t\t\tPreparedStatement ps = con.prepareStatement(insert);\n\t\t\tps.setInt(1, codigo);\n\t\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\t\t\t\n\t\t\tps.executeUpdate();\t\n\t\t\tcon.commit();\n\t\t\treturn true;\n\t\t}catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}",
"public int getAtencionAlCliente(){\n return atencion_al_cliente; \n }",
"private void startEliminateExpiredClient() {\n this.expiredExecutorService.scheduleAtFixedRate(() -> {\n long currentTime = System.currentTimeMillis();\n List<ClientInformation> clients = ClientManager.getAllClient();\n if (clients != null && clients.size() > 0) {\n clients.stream().forEach(client -> {\n String clientId = ClientManager.getClientId(client.getAddress(), client.getPort());\n long intervalSeconds = (currentTime - client.getLastReportTime()) / 1000;\n if (intervalSeconds > configuration.getExpiredExcludeThresholdSeconds()\n && ClientStatus.ON_LINE.equals(client.getStatus())) {\n client.setStatus(ClientStatus.OFF_LINE);\n ClientManager.updateClientInformation(client);\n log.info(\"MessagePipe Client:{},status updated to offline.\", clientId);\n } else if (intervalSeconds <= configuration.getExpiredExcludeThresholdSeconds()\n && ClientStatus.OFF_LINE.equals(client.getStatus())) {\n client.setStatus(ClientStatus.ON_LINE);\n ClientManager.updateClientInformation(client);\n log.info(\"MessagePipe Client:{},status updated to online.\", clientId);\n }\n });\n }\n }, 5, configuration.getCheckClientExpiredIntervalSeconds(), TimeUnit.SECONDS);\n }",
"public boolean deleteCliente(Cliente cliente) {\n\t\treturn false;\r\n\t}",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"@Override\n\tpublic void entrer(TC client) {\n\t\tint prio = client.getPrio();\n\t\tif (!estPleine()) {\n\t\t\tif(prio>maxPrio) {\t\t\t\t\t\t//Si la priorité donnée est sup\n\t\t\t\tsalle.get(maxPrio).add(client);\t\t//.get récupération clé .add rajout\n\t\t\t}\n\t\t\telse if (prio<0) {\t\t\t\t\t\t//Si priorité inf à 0\n\t\t\t\tsalle.get(0).add(client);\t\t\n\t\t\t}\n\t\t\telse {salle.get(client.getPrio()).add(client);\n\t\t\t// {salle.get(prio).entrer(client);}\n\t\t\t}\n\t\t}\n\t}",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"private void obtenerClienteRecomendado(Cliente clienteParametro, Long oidPais) throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Entrada\");\n\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n ArrayList lstRecomendados;\n\n if ( clienteParametro.getClienteRecomendante() != null){\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"oidClienteRecomendante=\"+clienteParametro.getClienteRecomendante().getRecomendante());\n }\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n queryInc.append(\" SELECT \");\n queryInc.append(\" CLIE_OID_CLIE_VNDO CLIE_OID_CLIE, \");\n queryInc.append(\" FEC_DESD FEC_INIC, \");\n queryInc.append(\" FEC_HAST FEC_FINA \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n queryInc.append(\" AND CLIE_OID_CLIE_VNDO NOT IN ( \");\n \n // queryInc.append(\" SELECT RDO.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" SELECT DISTINCT RDO.CLIE_OID_CLIE \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RECT.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n \n queryInc.append(\" ) \");\n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n //BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n //StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n \n boolean hayRecomendado = false;\n Cliente clienteLocal = new Cliente();\n lstRecomendados = clienteParametro.getClienteRecomendado();\n\n if (!respuestaInc.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnINC(true);\n \n /* vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n * no lleno lstRecomendados con estos valores solo mantengo el indicador IndRecomendadosEnINC \n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaInc.getRowCount();i++){ \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente()); \n \n BigDecimal recomendado = (BigDecimal) respuestaInc.getValueAt(i, \"CLIE_OID_CLIE\");\n clienteRecomendado.setRecomendado((recomendado != null) ? new Long(recomendado.longValue()) : null);\n \n clienteRecomendado.setFechaInicio((Date) respuestaInc.getValueAt(i, \"FEC_INIC\"));\n Date fechaFin = (Date) respuestaInc.getValueAt(i, \"FEC_FINA\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n\n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n }*/\n } \n \n // vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n // \n \n try {\n queryInc = new StringBuffer(); \n queryInc.append(\" SELECT CLIE_OID_CLIE_VNDO, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n\n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnMAE(true);\n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaMae.getRowCount();i++){ \n \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente());\n\n clienteRecomendado.setRecomendado(new Long(((BigDecimal) \n respuestaMae.getValueAt(i, \"CLIE_OID_CLIE_VNDO\")).longValue()));\n {\n Date fechaInicio = (Date) respuestaMae.getValueAt(i, \"FEC_DESD\");\n clienteRecomendado.setFechaInicio((fechaInicio != null) ? fechaInicio : null);\n }\n\n {\n Date fechaFin = (Date) respuestaMae.getValueAt(i, \"FEC_HAST\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n }\n \n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n \n }\n \n clienteParametro.setClienteRecomendado(lstRecomendados);\n \n } else {\n hayRecomendado = false;\n }\n\n if (!hayRecomendado) {\n clienteParametro.setClienteRecomendado(null);\n }\n \n // JVM, sicc 20070381, if, manejo del Recomendador, bloque de recuparacion de periodo\n if (lstRecomendados.size() > 0)\n { \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n RecordSet respuestaMaeRdr = null;\n\n try { \n queryInc = new StringBuffer();\n queryInc.append(\" SELECT DISTINCT CLIE_OID_CLIE_VNTE , FEC_DESD , FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n respuestaMaeRdr = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMaeRdr \" + respuestaMaeRdr); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n ClienteRecomendante clienteRecomendador = new ClienteRecomendante();\n \n if (!respuestaMaeRdr.esVacio()) {\n \n {\n BigDecimal recomendador = (BigDecimal) respuestaMaeRdr.getValueAt(0, \"CLIE_OID_CLIE_VNTE\");\n clienteRecomendador.setRecomendante((recomendador != null) ? new Long(recomendador.longValue()) : null);\n }\n \n clienteRecomendador.setFechaInicio((Date) respuestaMaeRdr.getValueAt(0, \"FEC_DESD\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaMaeRdr.getValueAt(0, \"FEC_HAST\");\n clienteRecomendador.setFechaFin((fechaFin != null)? fechaFin : null);\n }\n \n clienteParametro.setClienteRecomendador(clienteRecomendador);\n }\n \n for (int i=0; i<lstRecomendados.size(); i++){\n\n ClienteRecomendado clienteRecomendados = new ClienteRecomendado(); \n \n clienteRecomendados = (ClienteRecomendado) lstRecomendados.get(i);\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n\n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendados.getRecomendado()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n BigDecimal bd;\n \n if (!respuestaInc.esVacio()) {\n\n Periodo periodo = new Periodo();\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n \n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n \n clienteRecomendados.setPeriodo(periodo);\n } \n }\n }\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"lstRecomendados(\"+lstRecomendados.size() + \n \") getIndRecomendadosEnMAE(\"+clienteParametro.getIndRecomendadosEnMAE() +\n \") getIndRecomendadosEnINC(\"+clienteParametro.getIndRecomendadosEnINC() +\")\"); \n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Salida\"); \n \n }",
"@Override\n\tpublic void excluir(Cliente o) {\n\t\t\n\t}",
"@Override\n\tpublic int agregarCliente(ClienteBean cliente) throws Exception {\n\t\treturn 0;\n\t}",
"@Test\n public void testEliminarCliente() throws Exception {\n long sufijo = System.currentTimeMillis(); \n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(Long.valueOf(sufijo)); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n servicio.eliminarCliente(usuario.getLogin()); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin()); \n assertNull(usuarioRegistrado); \n }",
"public void cadastrar(Cliente cliente){\n\t\tSystem.out.println(cliente.toString());\r\n\t\tint tamanho = this.clientes.length;\r\n\t\tthis.clientes = Arrays.copyOf(this.clientes, this.clientes.length + 1);\r\n\t\tthis.clientes[tamanho - 1] = cliente;\r\n\t}",
"@Override\n\tpublic boolean estVide() {\n\t\treturn getNbClients()==0;\n\t}",
"@FXML\n\tpublic void disableClient(ActionEvent event) {\n\t\tif (!txtIdDisableClient.getText().equals(\"\")) {\n\t\t\tClient client = restaurant.returnClientId(txtIdDisableClient.getText());\n\n\t\t\tif (client != null) {\n\n\t\t\t\ttry {\n\t\t\t\t\tclient.setCondition(Condition.INACTIVE);\n\t\t\t\t\trestaurant.saveClientsData();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"El cliente ha sido deshabilitado\");\n\t\t\t\t\tdialog.setTitle(\"Cliente Deshabilitado\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t\ttxtIdDisableClient.setText(\"\");\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\tdialog.setContentText(\"No se ha podido guardar el nuevo estado del Cliente\");\n\t\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\t\tdialog.show();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Este cliente no existe\");\n\t\t\t\tdialog.setTitle(\"Error, objeto no existente\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}",
"@Override\n\tpublic Long eliminarCliente(Long idCliente) {\n\t\tclientes.remove(clientes.stream().\n\t\t\t\tfilter(it -> it.getId().equals(idCliente)).findFirst().get());\n\t\treturn idCliente;\n\t}",
"public int getIdCliente() {\n return idCliente;\n }",
"@Generated\n public synchronized void resetClientes() {\n clientes = null;\n }",
"private void deleteClient()\n {\n System.out.println(\"Delete client with the ID: \");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());\n ctrl.deleteClient(id);\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"public void atenderPedidoDelCliente(Long idPedido) throws QRocksException;",
"private static Cliente llenarDatosCliente() {\r\n\t\tCliente cliente1 = new Cliente();\r\n\t\tcliente1.setApellido(\"De Assis\");\r\n\t\tcliente1.setDni(368638373);\r\n\t\tcliente1.setNombre(\"alexia\");\r\n\t\tcliente1.setId(100001);\r\n\r\n\t\treturn cliente1;\r\n\t}",
"public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }",
"@Override\n\tpublic void deleteClient() {\n\t\t\n\t}",
"public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"public Double deuda(Cliente c);",
"private boolean verificarCliente(int cedulaCliente) {\n for (int i = 0; i < posicionActual; i++) { //Recorre hasta la posicon actual en la que se estan agregando datos, osea en la ultima en que se registro.\n if (getCedulaCliente(i) == cedulaCliente) { //Pregunta si la cedula pasada por parametro exite en la posicon que va recorriendo el for actualmente\n return true; //Si la condicion se da, retorna verdadero para informar que si el cliente si se encuentra\n }\n }\n return false; //si al final no encontro ninguna coincidencia retorna falso para avisar que el cliente no se encuentra registrado\n }",
"public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }",
"private void peticionDeCliente() throws IOException, InterruptedException {\n\t\tString mensaje = null;\n\t\tboolean salir = false;\n\t\twhile(!salir) {\n\t\t\tmensaje = in.readLine();\n\t\t\tif(mensaje!=null && !mensaje.split(\";\")[0].equals(\"Comprobacion\")) {\n\t\t\t\tthis.tcpServidor.colaPeticion.put(mensaje); //ALMACENA SOLICITUD EN COLA_PETICIONES\n\t\t\t\tSystem.out.println(\"Peticion del cliente \"+this.idCliente+\": \"+ mensaje);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public boolean eliminar(ModelCliente cliente) {\n strSql = \"DELETE CLIENTE WHERE ID_CLIENTE = \" + cliente.getIdCliente();\n \n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }",
"public void eliminarCliente(Connection conn, int cliente, BUsuario usuario)throws SQLException{\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\tdaoCliente.eliminarCliente(conn, cliente, usuario);\r\n\t}",
"public int rekisteroi() {\r\n alId = seuraavaNro;\r\n seuraavaNro++;\r\n\r\n return seuraavaNro;\r\n }",
"public BCliente obtenerCliente(int codigo)throws SQLException{\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\treturn daoCliente.obtenerCliente(codigo);\r\n\t}",
"public void decrementClients() {\n\t\tconnectedClients.decrementAndGet();\n\t}",
"public void ingresarCliente() {\n\tint cambio=0;\n\t\t\t\n\tsetNombre(JOptionPane.showInputDialog(\"Introduce el nombre\"));\n\tdo {\n\t\t\n\t\tsetDni(JOptionPane.showInputDialog(\"Introduce el DNI de \" + getNombre()+\".\"));\n\t\tif(getDni().length()<7||getDni().length()>7) {\n\t\t\tJOptionPane.showMessageDialog(null, \"El DNI debe contener 7 numeros!\");\n\t\t}else {\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}while(getDni().length()<7||getDni().length()>7);\n\t\n\t\n\tdo {\n\t\ttry {\n\t\t\tsetSalario(Double.parseDouble(JOptionPane.showInputDialog(\"Introduce el salario en � correspondiente a \" + getNombre()+\".\")));\n\t\t\tcambio=1;\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ingrese unicamente numeros\");\n\t\t\tcambio=0;\n\t\t}\n\t} while (cambio==0);\n\t\n}",
"public Cliente nuevoCliente (String nombre){\r\n\t\t//TODO Implementar metodo\r\n\t\treturn null;\r\n\t}",
"public int getIdClient() {\r\n return idClient;\r\n }",
"private Cliente obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Entrada\");\n \n StringBuffer nombreCli = new StringBuffer();\n\n // crear cliente\n Cliente cliente = new Cliente();\n cliente.setOidCliente(oidCliente);\n\n // completar oidEstatus\n BigDecimal oidEstatus = null;\n\n {\n BelcorpService bs1;\n RecordSet respuesta1;\n String codigoError1;\n StringBuffer query1 = new StringBuffer();\n\n try {\n bs1 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n try {\n query1.append(\" SELECT CLIE_OID_CLIE, \");\n query1.append(\" ESTA_OID_ESTA_CLIE \");\n query1.append(\" FROM MAE_CLIEN_DATOS_ADICI \");\n query1.append(\" WHERE CLIE_OID_CLIE = \" + oidCliente);\n respuesta1 = bs1.dbService.executeStaticQuery(query1.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta1 \" + respuesta1);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n if (respuesta1.esVacio()) {\n cliente.setOidEstatus(null);\n } else {\n oidEstatus = (BigDecimal) respuesta1\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatus((oidEstatus != null) ? new Long(\n oidEstatus.longValue()) : null);\n }\n }\n // completar oidEstatusFuturo\n {\n BelcorpService bs2;\n RecordSet respuesta2;\n String codigoError2;\n StringBuffer query2 = new StringBuffer();\n\n try {\n bs2 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n try {\n query2.append(\" SELECT OID_ESTA_CLIE, \");\n query2.append(\" ESTA_OID_ESTA_CLIE \");\n query2.append(\" FROM MAE_ESTAT_CLIEN \");\n query2.append(\" WHERE OID_ESTA_CLIE = \" + oidEstatus);\n respuesta2 = bs2.dbService.executeStaticQuery(query2.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta2 \" + respuesta2); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n if (respuesta2.esVacio()) {\n cliente.setOidEstatusFuturo(null);\n } else {\n {\n BigDecimal oidEstatusFuturo = (BigDecimal) respuesta2\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatusFuturo((oidEstatusFuturo != null) \n ? new Long(oidEstatusFuturo.longValue()) : null);\n }\n }\n }\n // completar periodoPrimerContacto \n {\n BelcorpService bs3;\n RecordSet respuesta3;\n String codigoError3;\n StringBuffer query3 = new StringBuffer();\n\n try {\n bs3 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n try {\n query3.append(\" SELECT A.CLIE_OID_CLIE, \");\n query3.append(\" A.PERD_OID_PERI, \");\n query3.append(\" B.PAIS_OID_PAIS, \");\n query3.append(\" B.CANA_OID_CANA, \");\n query3.append(\" B.MARC_OID_MARC, \");\n query3.append(\" B.FEC_INIC, \");\n query3.append(\" B.FEC_FINA, \");\n query3.append(\" C.COD_PERI \");\n query3.append(\" FROM MAE_CLIEN_PRIME_CONTA A, \");\n query3.append(\" CRA_PERIO B, \");\n query3.append(\" SEG_PERIO_CORPO C \");\n query3.append(\" WHERE A.CLIE_OID_CLIE = \" + oidCliente);\n query3.append(\" AND A.PERD_OID_PERI = B.OID_PERI \");\n query3.append(\" AND B.PERI_OID_PERI = C.OID_PERI \");\n respuesta3 = bs3.dbService.executeStaticQuery(query3.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta3 \" + respuesta3); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n if (respuesta3.esVacio()) {\n cliente.setPeriodoPrimerContacto(null);\n } else {\n Periodo periodo = new Periodo();\n\n {\n BigDecimal oidPeriodo = (BigDecimal) respuesta3\n .getValueAt(0, \"PERD_OID_PERI\");\n periodo.setOidPeriodo((oidPeriodo != null) \n ? new Long(oidPeriodo.longValue()) : null);\n }\n\n periodo.setCodperiodo((String) respuesta3\n .getValueAt(0, \"COD_PERI\"));\n periodo.setFechaDesde((Date) respuesta3\n .getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuesta3\n .getValueAt(0, \"FEC_FINA\"));\n periodo.setOidPais(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"PAIS_OID_PAIS\")).longValue()));\n periodo.setOidCanal(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"CANA_OID_CANA\")).longValue()));\n periodo.setOidMarca(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"MARC_OID_MARC\")).longValue()));\n cliente.setPeriodoPrimerContacto(periodo);\n }\n }\n // completar AmbitoGeografico\n {\n BelcorpService bs4;\n RecordSet respuesta4;\n String codigoError4;\n StringBuffer query4 = new StringBuffer();\n\n try {\n bs4 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n try {\n //jrivas 29/6/2005\n //Modificado INC. 19479\n SimpleDateFormat sdfFormato = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaDesde = sdfFormato.format(peri.getFechaDesde());\n String fechaHasta = sdfFormato.format(peri.getFechaHasta());\n\n query4.append(\" SELECT sub.oid_subg_vent, reg.oid_regi, \");\n query4.append(\" zon.oid_zona, sec.oid_secc, \");\n query4.append(\" terr.terr_oid_terr, \");\n query4.append(\" sec.clie_oid_clie oid_lider, \");\n query4.append(\" zon.clie_oid_clie oid_gerente_zona, \");\n query4.append(\" reg.clie_oid_clie oid_gerente_region, \");\n query4.append(\" sub.clie_oid_clie oid_subgerente \");\n query4.append(\" FROM mae_clien_unida_admin una, \");\n query4.append(\" zon_terri_admin terr, \");\n query4.append(\" zon_secci sec, \");\n query4.append(\" zon_zona zon, \");\n query4.append(\" zon_regio reg, \");\n query4.append(\" zon_sub_geren_venta sub \");\n //jrivas 27/04/2006 INC DBLG50000361\n //query4.append(\" , cra_perio per1, \");\n //query4.append(\" cra_perio per2 \");\n query4.append(\" WHERE una.clie_oid_clie = \" + oidCliente);\n query4.append(\" AND una.ztad_oid_terr_admi = \");\n query4.append(\" terr.oid_terr_admi \");\n query4.append(\" AND terr.zscc_oid_secc = sec.oid_secc \");\n query4.append(\" AND sec.zzon_oid_zona = zon.oid_zona \");\n query4.append(\" AND zon.zorg_oid_regi = reg.oid_regi \");\n query4.append(\" AND reg.zsgv_oid_subg_vent = \");\n query4.append(\" sub.oid_subg_vent \");\n //jrivas 27/04/2006 INC DBLG50000361\n query4.append(\" AND una.perd_oid_peri_fin IS NULL \");\n \n // sapaza -- PER-SiCC-2013-0960 -- 03/09/2013\n //query4.append(\" AND una.ind_acti = 1 \");\n \n /*query4.append(\" AND una.perd_oid_peri_fin = \");\n query4.append(\" AND una.perd_oid_peri_ini = per1.oid_peri \");\n query4.append(\" per2.oid_peri(+) \");\n query4.append(\" AND per1.fec_inic <= TO_DATE ('\" + \n fechaDesde + \"', 'dd/MM/yyyy') \");\n query4.append(\" AND ( per2.fec_fina IS NULL OR \");\n query4.append(\" per2.fec_fina >= TO_DATE ('\" + fechaHasta \n + \"', 'dd/MM/yyyy') ) \");*/\n\n respuesta4 = bs4.dbService.executeStaticQuery(query4.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"respuesta4: \" + respuesta4);\n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n Gerente lider = new Gerente();\n Gerente gerenteZona = new Gerente();\n Gerente gerenteRegion = new Gerente();\n Gerente subGerente = new Gerente();\n\n if (respuesta4.esVacio()) {\n cliente.setAmbitoGeografico(null);\n } else {\n AmbitoGeografico ambito = new AmbitoGeografico();\n ambito.setOidSubgerencia(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBG_VENT\")).longValue()));\n ambito.setOidRegion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_REGI\")).longValue()));\n ambito.setOidZona(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_ZONA\")).longValue()));\n ambito.setOidSeccion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SECC\")).longValue()));\n\n //jrivas 29/6/2005\n //Modificado INC. 19479\n ambito.setOidTerritorio(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"TERR_OID_TERR\")).longValue()));\n\n if (respuesta4.getValueAt(0, \"OID_LIDER\") != null) {\n lider.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_LIDER\")).longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_ZONA\") != null) {\n gerenteZona.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_GERENTE_ZONA\")).longValue()));\n ;\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_REGION\") != null) {\n gerenteRegion.setOidCliente(new Long(((BigDecimal) \n respuesta4.getValueAt(0, \"OID_GERENTE_REGION\"))\n .longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_SUBGERENTE\") != null) {\n subGerente.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBGERENTE\")).longValue()));\n }\n\n ambito.setLider(lider);\n ambito.setGerenteZona(gerenteZona);\n ambito.setGerenteRegion(gerenteRegion);\n ambito.setSubgerente(subGerente);\n\n cliente.setAmbitoGeografico(ambito);\n }\n }\n // completar nombre\n {\n BelcorpService bs5;\n RecordSet respuesta5;\n String codigoError5;\n StringBuffer query5 = new StringBuffer();\n\n try {\n bs5 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n try {\n query5.append(\" SELECT OID_CLIE, \");\n query5.append(\" VAL_APE1, \");\n query5.append(\" VAL_APE2, \");\n query5.append(\" VAL_NOM1, \");\n query5.append(\" VAL_NOM2 \");\n query5.append(\" FROM MAE_CLIEN \");\n query5.append(\" WHERE OID_CLIE = \" + oidCliente.longValue());\n respuesta5 = bs5.dbService.executeStaticQuery(query5.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta5 \" + respuesta5);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n if (respuesta5.esVacio()) {\n cliente.setNombre(null);\n } else {\n \n if(respuesta5.getValueAt(0, \"VAL_NOM1\")!=null) {\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_NOM2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM2\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE1\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE2\"));\n }\n \n cliente.setNombre(nombreCli.toString());\n }\n }\n\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Salida\");\n return cliente;\n }",
"public void removeClient(Client client) {\r\n\r\n\t\tfor (int i = 0; i < clients.length; i++) {\r\n\t\t\tif (clients[i] != null && clients[i].equals(client)) {\r\n\t\t\t\tfloat client_balance = clients[i].getFortune();\r\n\t\t\t\tthis.balance -= client_balance;\r\n\t\t\t\tclients[i] = null; // add the account\r\n\t\t\t\t// log the operation\r\n\t\t\t\tLog log = new Log(System.currentTimeMillis(), client.getId(), \"remove client\", client_balance);\r\n\t\t\t\tlogger.log(log);\r\n\t\t\t\t//\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic Cliente editarCliente(Integer idcliente) {\n\t\treturn clienteDao.editarCliente(idcliente);\n\t}",
"public static void main(String[] args) {\n Client clientIP = new IndividualEntrepreneur(100000);\n System.out.println(clientIP);\n// client.deposit(555);\n// System.out.println(client);\n// client.deposit(1234);\n// System.out.println(client);\n// client.withdraw(1498);\n// System.out.println(client);\n\n Client clientOOO= new legalEntity(200000);\n System.out.println(clientOOO);\n// client1.deposit(1234);\n// System.out.println(client1);\n// client1.withdraw(10000);\n// System.out.println(client1);\n clientOOO.send(clientIP,2000);\n System.out.println(clientIP);\n System.out.println(clientOOO);\n clientIP.getInformation();\n clientOOO.getInformation();\n\n System.out.println(\"Hah Set \" + clientIP.getClientSet());\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().clear();\n System.out.println(clientIP.getClientSet());\n Client clientInd = new Individual(50000);\n System.out.println(clientIP.getClientSet());\n clientIP.getClientSet().add(clientInd);\n clientIP.getClientSet().add(clientInd);\n System.out.println(clientIP.getClientSet());\n\n }",
"public int getClientePorHora() {\r\n return clientePorHora;\r\n }",
"public void resetClient() {\n map.clear();\n idField.setText( \"\" );\n turnLabel.setText( \"\" );\n }",
"private void obtenerClienteRecomendante(Cliente clienteParametro, Long \n oidPais) throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\"clienteParametro, Long oidPais):Entrada\");\n // query sobre INC\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n //jrivas 17/8/2005\n //Inc 20556 \n queryInc.append(\" SELECT RECT.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RDO.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n // query sobre MAE\n BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n ClienteRecomendante clienteRecomendante = new ClienteRecomendante();\n boolean hayRecomendante;\n\n if (!respuestaInc.esVacio()) {\n // tomo los datos de INC\n hayRecomendante = true;\n\n {\n BigDecimal recomendante = (BigDecimal) respuestaInc\n .getValueAt(0, \"CLIE_OID_CLIE\");\n clienteRecomendante.setRecomendante((recomendante != null) \n ? new Long(recomendante.longValue()) : null);\n }\n\n clienteRecomendante.setFechaInicio((Date) respuestaInc\n .getValueAt(0, \"FEC_INIC\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaInc.getValueAt(0, \"FEC_FINA\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n \n /* */\n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n Date fec_desd = (Date) respuestaInc.getValueAt(0, \"FEC_INIC\");\n\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n\n/* */\n } else {\n // BELC300022542 - gPineda - 24/08/06\n try {\n queryInc = new StringBuffer();\n \n //jrivas 4/7/2005\n //Inc 16978\n queryInc.append(\" SELECT CLIE_OID_CLIE_VNTE, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNDO = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n \n // BELC300022542 - gPineda - 24/08/06\n //queryInc.append(\" AND COD_TIPO_VINC = '\" + ConstantesMAE.TIPO_VINCULO_RECOMENDADA + \"'\");\n queryInc.append(\" AND IND_RECO = 1 \");\n \n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n if (!respuestaMae.esVacio()) { \n Date fec_desd = (Date) respuestaMae.getValueAt(0, \"FEC_DESD\");\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteParametro.getOidCliente()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(fec_desd) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(fec_desd) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n \n clienteParametro.setPeriodo(periodo);\n } \n // } \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n hayRecomendante = true;\n clienteRecomendante.setRecomendante(new Long(((BigDecimal) \n respuestaMae.getValueAt(0, \"CLIE_OID_CLIE_VNTE\"))\n .longValue()));\n\n {\n Date fechaInicio = (Date) respuestaMae\n .getValueAt(0, \"FEC_DESD\");\n clienteRecomendante.setFechaInicio((fechaInicio != null) \n ? fechaInicio : null);\n }\n // fecha fin de MAE\n {\n Date fechaFin = (Date) respuestaMae\n .getValueAt(0, \"FEC_HAST\");\n clienteRecomendante.setFechaFin((fechaFin != null) \n ? fechaFin : null);\n }\n } else {\n hayRecomendante = false;\n }\n }\n // tomo los datos de MAE\n if (hayRecomendante) {\n \n // JVM, sicc 20070381 , agrega bloque que recupera datos del periodo \n // {\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendante.getRecomendante()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendante.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n BigDecimal bd;\n Periodo periodo = new Periodo();\n \n if (!respuestaInc.esVacio()) {\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n } \n\n clienteRecomendante.setPeriodo(periodo);\n // } \n \n Cliente clienteLocal = new Cliente();\n clienteLocal.setOidCliente(clienteRecomendante.getRecomendante());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendante.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n clienteParametro.setClienteRecomendante(clienteRecomendante);\n \n } else {\n clienteParametro.setClienteRecomendante(null);\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendante(Cliente\"\n +\" clienteParametro, Long oidPais):Salida\");\n }",
"public void disconnetti() {\n\t\tconnesso = false;\n\t}",
"public void obtenerTipificacionesCliente(Participante cliente)\n throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n if (cliente.getOidCliente() == null) {\n cliente.setTipificacionCliente(null);\n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- NULO : \");\n UtilidadesLog.debug(\"---- cliente : \" + cliente.getOidCliente());\n } \n } else {\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT CLIE_OID_CLIE, \");\n query.append(\" CLAS_OID_CLAS, \");\n query.append(\" SBTI_OID_SUBT_CLIE, \");\n query.append(\" TCCL_OID_TIPO_CLASI, \");\n query.append(\" TICL_OID_TIPO_CLIE \");\n query.append(\" FROM V_MAE_TIPIF_CLIEN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- TIPIF : \" + respuesta);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setTipificacionCliente(null);\n } else {\n TipificacionCliente[] tipificaciones = new TipificacionCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n tipificaciones[i] = new TipificacionCliente();\n\n {\n BigDecimal oidClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"CLAS_OID_CLAS\");\n tipificaciones[i].setOidClasificacionCliente((\n oidClasificacionCliente != null) ? new Long(\n oidClasificacionCliente.longValue()) : null);\n }\n\n tipificaciones[i].setOidSubTipoCliente(new Long((\n (BigDecimal) respuesta\n .getValueAt(i, \"SBTI_OID_SUBT_CLIE\")).longValue()));\n\n {\n BigDecimal oidTipoClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"TCCL_OID_TIPO_CLASI\");\n tipificaciones[i].setOidTipoClasificacionCliente(\n (oidTipoClasificacionCliente != null)? new Long(\n oidTipoClasificacionCliente.longValue()) \n : null);\n }\n\n tipificaciones[i].setOidTipoCliente(new Long(((BigDecimal)\n respuesta.getValueAt(i, \"TICL_OID_TIPO_CLIE\"))\n .longValue()));\n }\n\n cliente.setTipificacionCliente(tipificaciones);\n }\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Salida\");\n }",
"public Cliente(String nombre,int comensales){\n\t\tthis.nombre = nombre;\n\t\tthis.comensales =comensales;\n\t}",
"public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }",
"public void simulerCreditConso(Client client, float emprunt, int nbMois) {\n\t\tSystem.out.println(\"Proposition de credit consommation : \");\n\t\tCredit creditconso = new Credit(emprunt, nbMois);\n\t\tcreditconso.CreditConso(emprunt, nbMois);\n\t\t\n\t\t\n\t}",
"public void disableClient(){\r\n try{\r\n oos.writeObject(new DataWrapper(DataWrapper.CTCODE, new ControlToken(ControlToken.DISABLECODE)));\r\n oos.flush();\r\n } catch(IOException ioe) {\r\n ioe.printStackTrace();\r\n }\r\n }",
"@Override\n\tpublic boolean estPleine() {\n\t\treturn getNbClients()==capacite;\n\t}",
"private void llenarControles(Cliente pCliente) {\n try {\n clienteActual = ClienteDAL.obtenerPorId(pCliente); // Obtener el Rol por Id \n this.txtNombre.setText(clienteActual.getNombre()); // Llenar la caja de texto txtNombre con el nombre del rol \n this.txtApellido.setText(clienteActual.getApellido());\n this.txtDui.setText(clienteActual.getDui());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n this.txtNumero.setText(Integer.toString(clienteActual.getNumero()));\n } catch (Exception ex) {\n // Enviar el mensaje al usuario de la pantalla en el caso que suceda un error al obtener los datos de la base de datos\n JOptionPane.showMessageDialog(frmPadre, \"Sucedio el siguiente error: \" + ex.getMessage());\n }\n }",
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"@Override\n\tpublic CLIENTE pesquisar(int id_cliente) {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE WHERE ID_CLIENTE = ?\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setInt(1, id_cliente);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente.setId_cliente(res.getInt(\"ID_CLIENTE\"));\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cliente;\n\t}",
"private Cliente obtenerCliente(Long oidCliente, Solicitud solicitud)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente,\"\n +\"Solicitud solicitud):Entrada\");\n\n /*Descripcion: este metodo retorna un objeto de la clase Cliente\n con todos sus datos recuperados.\n\n Implementacion:\n\n 1- Invocar al metodo obtenerDatosGeneralesCliente pasandole por\n parametro el oidCliente. Este metodo retornara un objeto de la clase\n Cliente el cual debe ser asignado a la propiedad cliente de la \n Solicitud.\n 2- Invocar al metodo obtenerTipificacionesCliente pasandole por\n parametro el objeto cliente. Este metodo creara un array de objetos\n de la clase TipificacionCliente el cual asignara al atributo\n tipificacionCliente del cliente pasado por parametro.\n 3- Invocar al metodo obtenerHistoricoEstatusCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase HistoricoEstatusCliente al atributo \n historicoEstatusCliente\n del cliente pasado por parametro.\n 4- Invocar al metodo obtenerPeriodosConPedidosCliente pasandole por\n parametro el objeto cliente. Este metodo asignara un array de objetos\n de la clase Periodo al atributo periodosConPedidos del cliente pasado\n por parametro.\n 5- Invocar al metodo obtenerClienteRecomendante pasandole por\n parametro el objeto cliente. Este metodo asignara un objeto de la\n calse ClienteRecomendante al atributo clienteRecomendante del cliente\n recibido por parametro.\n 6- Invocar al metodo obtenerDatosGerentes pasandole por parametro el\n objeto cliente.\n */\n\n //1\n Cliente cliente = this.obtenerDatosGeneralesCliente(oidCliente, \n solicitud.getPeriodo());\n solicitud.setCliente(cliente);\n\n //2\n UtilidadesLog.debug(\"****obtenerCliente 1****\");\n this.obtenerTipificacionesCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 2****\");\n\n //3\n this.obtenerHistoricoEstatusCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 3****\");\n\n //4\n this.obtenerPeriodosConPedidosCliente(cliente);\n UtilidadesLog.debug(\"****obtenerCliente 4****\");\n\n //5\n //jrivas 4/7/2005\n //Inc 16978 \n this.obtenerClienteRecomendante(cliente, solicitud.getOidPais());\n\n // 5.1\n // JVM - sicc 20070237, calling obtenerClienteRecomendado\n this.obtenerClienteRecomendado(cliente, solicitud.getOidPais());\n\n //6\n this.obtenerDatosGerentes(cliente, solicitud.getPeriodo());\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"Salio de obtenerCliente - DAOSolicitudes\");\n \n // vbongiov 22/9/2005 inc 20940\n cliente.setIndRecomendante(this.esClienteRecomendante(cliente.getOidCliente(), solicitud.getPeriodo()));\n\n // jrivas 30/8//2006 inc DBLG5000839\n cliente.setIndRecomendado(this.esClienteRecomendado(cliente.getOidCliente(), solicitud.getPeriodo()));\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerCliente(Long oidCliente, \"\n +\"Solicitud solicitud):Salida\");\n return cliente;\n }",
"@Test\n @Order(17)\n void delete_client_not_in_database() {\n int sumOfIds = 0;\n HashSet<Client> allClients = service.getAllClients();\n for(Client c : allClients) {\n sumOfIds+=c.getId();\n }\n boolean isDeleted = service.deleteClientById(sumOfIds);\n Assertions.assertFalse(isDeleted);\n }",
"private void onCadastrarCliente() {\n prepFieldsNovoCliente();\n mainCliente = null;\n }",
"private void eliminar(HttpServletRequest request, HttpServletResponse response) {\n\t\n\t\ttry {\n\t\t\tString numero =request.getParameter(\"idCliente\");//leo parametro numeroHabitacion de la vista\n\t\t\t\n\t\t\t//llamo a un metodo del modelo para que elimine el editorial de la bd y consulto si se pudo eliminar\n\t\t\tif(modelo.eliminarCliente(numero) > 0) {\n\t\t\t\t\n\t\t\t\t//paso un atributo de exito si se pudo eliminar\n\t\t\t\trequest.setAttribute(\"exito\", \"Cliente eliminado exitosamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//paso un atributo de fracaso. \n\t\t\t\trequest.setAttribute(\"fracaso\", \"No se puede eliminar Cliente\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//redirecciono sin importar si se pudo o no eliminar\n\t\t\trequest.getRequestDispatcher(\"/clientes.do?op=listar\").forward(request, response);\n\t\t} catch (SQLException | ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}",
"public void atenderPedidoDelCliente(PedidoIndividual pedido) throws QRocksException;",
"public alterarSenhaCliente() {\n }",
"public static void increaseNumberOfClients()\n {\n ++numberOfClients;\n }",
"public void resetUserSeat(SocketChannel client){\n\t\tint i = getUserNum(client);\n\t\tint deskNumber = -1;\n\t\tint chairNumber = -1;\n\t\tif(i >= 0){\n\t\t\tdeskNumber = Users[i].getDeskNumber();\n\t\t\tchairNumber = Users[i].getChairNumber();\n\t\t}\n\t\tif(deskNumber >= 0&&chairNumber >= 0){\t\n\t\t\tif(Tables[deskNumber].seat[chairNumber].userId.equals(Users[i].getId())){\n\t\t\t\tTables[deskNumber].seat[chairNumber].clear();\n\t\t\t}\n\t\t}\n\t}",
"public boolean restarUno(){\n\t\tif (numero>0){\n\t\t\tnumero--;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private static int nextClientId(){\n\n\t\tint id = random.nextInt(U16_MAX +1);\n\n\t\twhile(clients.containsKey(id))\n\t\t\tid = random.nextInt(U16_MAX +1);\n\n\t\treturn id;\n\t}",
"public void desactiveRegraJogadaDupla() {\n this.RegraJogadaDupla = true;\n }",
"@Override\n\tpublic void delete(Client obj) {\n\t\t\n\t}",
"@Override\r\n\tpublic int elimina(int id) throws Exception {\n\t\treturn 0;\r\n\t}",
"private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }",
"@Override\n\tpublic int vanish() {\n\t\treturn 1;\n\t}",
"private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }",
"@Override\n public DatosIntercambio subirFichero(String nombreFichero,int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\n\n \t//AQUI HACE FALTA CONOCER LA IP PUERTO DEL ALMACEN\n \t//Enviamos los datos para que el servicio Datos almacene los metadatos \n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \t\n \t//aqui deberiamos haber combropado un mensaje de error si idCliente < 0 podriamos saber que ha habido error\n int idCliente = datos.almacenarFichero(nombreFichero,idSesionCliente);\n int idSesionRepo = datos.dimeRepositorio(idCliente);//sesion del repositorio\n Interfaz.imprime(\"Se ha agregado el fichero \" + nombreFichero + \" en el almacen de Datos\"); \n \n //Devolvemos la URL del servicioClOperador con la carpeta donde se guardara el tema\n DatosIntercambio di = new DatosIntercambio(idCliente , \"rmi://\" + direccionServicioClOperador + \":\" + puertoServicioClOperador + \"/cloperador/\"+ idSesionRepo);\n return di;\n }",
"public void guarda(Cliente cliente) {\n\n clienteDAO.guarda(cliente);\n editRow=0;\n //force get data from DAO (see getClientes() )\n lc=null;\n }",
"@Override\n\t\tpublic Client getClient(int idClient) {\n\t\t\treturn null;\n\t\t}",
"public String RespuestaCliente()\n{\tString Muestra=\"\";\n\t\n\tMuestra+=\"DATOS DEL CLIENTE\\n\"\n\t\t\t+ \"Nombre: \"+getNombre()+\"\\n\"\n\t\t\t+ \"DNI: \"+getDni()+\"\\n\"\n\t\t\t+ \"Salario: �\"+String.format(\"%.1f\",getSalario())+\"\\n\\n\";\n\t\n\treturn Muestra;\n\t\n\t}",
"public String MuestraSoloDNI() {\nString Muestra=\"\";\n\nif(getTipoCliente().equals(\"Docente\")) {\nMuestra=clienteDo.getDni();\n}else if(getTipoCliente().equalsIgnoreCase(\"Administrativo\")) {\nMuestra=clienteAd.getDni();\n}\nreturn Muestra;\n}",
"public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }",
"private int contar(String nombre) {\n int c = 0;\n for (Nodo<Integer, Reservacion> th1 : this.th) {\n if (th1 != null && th1.value.Cliente().equals(nombre)) {\n c++;\n }\n }\n return c;\n }",
"public void videListeClient(){\n couleurs.clear();\n }"
] |
[
"0.6835864",
"0.6788351",
"0.6584136",
"0.6554183",
"0.6453891",
"0.6377863",
"0.6341335",
"0.6316181",
"0.63084924",
"0.62572783",
"0.6235043",
"0.62186956",
"0.6164436",
"0.6156577",
"0.6156423",
"0.61415225",
"0.61401576",
"0.6137572",
"0.61363596",
"0.61167955",
"0.6115171",
"0.6100515",
"0.60799396",
"0.6077905",
"0.6076755",
"0.60546196",
"0.6044259",
"0.603691",
"0.6016545",
"0.60103554",
"0.60068774",
"0.597394",
"0.5973661",
"0.5973632",
"0.595802",
"0.59521854",
"0.5948094",
"0.59245545",
"0.5916139",
"0.5910124",
"0.5907013",
"0.5903538",
"0.58974856",
"0.58972263",
"0.586115",
"0.58484447",
"0.5834099",
"0.58204144",
"0.58024305",
"0.57985425",
"0.5789023",
"0.5769846",
"0.5760703",
"0.57583094",
"0.57436466",
"0.5738146",
"0.5734396",
"0.5730124",
"0.57099956",
"0.5707142",
"0.57055557",
"0.57040834",
"0.5703194",
"0.57021415",
"0.57006264",
"0.56974524",
"0.56949925",
"0.5694617",
"0.56875336",
"0.56861275",
"0.56666464",
"0.5651359",
"0.5641712",
"0.5639708",
"0.56307507",
"0.5629863",
"0.56257",
"0.56254524",
"0.5620125",
"0.56184655",
"0.5615788",
"0.56104225",
"0.56079483",
"0.5604426",
"0.56038266",
"0.56021076",
"0.55988103",
"0.5592871",
"0.55900216",
"0.5582971",
"0.55804837",
"0.5577767",
"0.5569802",
"0.55677456",
"0.5560472",
"0.55586886",
"0.55576247",
"0.55535954",
"0.5548977",
"0.55487955",
"0.5538187"
] |
0.0
|
-1
|
disminuye en 1 el tiempo de espera del cliente
|
public void updateWaitingTime(){
waitingTime = waitingTime - 1;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void startEliminateExpiredClient() {\n this.expiredExecutorService.scheduleAtFixedRate(() -> {\n long currentTime = System.currentTimeMillis();\n List<ClientInformation> clients = ClientManager.getAllClient();\n if (clients != null && clients.size() > 0) {\n clients.stream().forEach(client -> {\n String clientId = ClientManager.getClientId(client.getAddress(), client.getPort());\n long intervalSeconds = (currentTime - client.getLastReportTime()) / 1000;\n if (intervalSeconds > configuration.getExpiredExcludeThresholdSeconds()\n && ClientStatus.ON_LINE.equals(client.getStatus())) {\n client.setStatus(ClientStatus.OFF_LINE);\n ClientManager.updateClientInformation(client);\n log.info(\"MessagePipe Client:{},status updated to offline.\", clientId);\n } else if (intervalSeconds <= configuration.getExpiredExcludeThresholdSeconds()\n && ClientStatus.OFF_LINE.equals(client.getStatus())) {\n client.setStatus(ClientStatus.ON_LINE);\n ClientManager.updateClientInformation(client);\n log.info(\"MessagePipe Client:{},status updated to online.\", clientId);\n }\n });\n }\n }, 5, configuration.getCheckClientExpiredIntervalSeconds(), TimeUnit.SECONDS);\n }",
"public void temporizadorTiempo() {\n Timer timer = new Timer();\n tareaRestar = new TimerTask() {\n @Override\n public void run() {\n tiempoRonda--;\n }\n };\n timer.schedule(tareaRestar, 1,1000);\n }",
"private void removeClient () {\n AutomatedClient c = clients.pollFirstEntry().getValue();\n Nnow--;\n\n c.signalToLeave();\n System.out.println(\"O cliente \" + c.getUsername() + \" foi sinalizado para sair\");\n }",
"protected void makeClientMissed() {\n\t\tArrayList<String> key = new ArrayList<String>();\r\n\r\n\t\tkey.add(\"id\");\r\n\r\n\t\tArrayList<String> value = new ArrayList<String>();\r\n\r\n\t\tvalue.add(GlobalVariable.TrainerSessionId);\r\n\r\n\t\tSystem.out.println(\"se\" + GlobalVariable.TrainerSessionId);\r\n\r\n\t\td.showCustomSpinProgress(TrainerHomeActivity.this);\r\n\r\n\t\tString url = Constants.WEBSERVICE_URL+\"/webservice/missed\";\r\n\r\n\t\tcallWebService = new AsyncTaskCall(\r\n\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\tTrainerHomeActivity.this,\r\n\t\t\t\t1,\r\n\t\t\t\turl,\r\n\t\t\t\tkey, value);\r\n\t\tcallWebService.execute();\r\n\r\n\t\tDialogView.customSpinProgress\r\n\t\t\t\t.setOnCancelListener(new OnCancelListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tcallWebService.cancel(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}",
"void realizarSolicitud(Cliente cliente);",
"@Override\n public void run() {\n long pocetak = 0;\n long kraj = 0;\n int pauza = Integer.parseInt(SlusacAplikacije.konfig.dajPostavku(\"sleep\"));\n while (!ServerSustava.isStop()) {\n pocetak = System.currentTimeMillis();\n if (!ServerSustava.isPauza()) {\n System.out.println(\"preuzimanje meteo podataka\");\n BazaPodataka bp = new BazaPodataka();\n List<Adresa> adrese = new ArrayList<Adresa>();\n adrese = bp.dohvatiAdrese();\n String apiKey = SlusacAplikacije.konfig.dajPostavku(\"apiKey\");\n OWMKlijent owmk = new OWMKlijent(apiKey);\n if (adrese != null) {\n for (Adresa a : adrese) {\n //System.out.println(\"adr: \" + a.getAdresa());\n MeteoPodaci mp = owmk.getRealTimeWeather(a.getGeoloc().getLatitude(), a.getGeoloc().getLongitude());\n bp.spremiMeteoPodatke(a.getAdresa(), mp);\n //System.out.println(\"Status: \" + a.getStatusPreuzimanja());\n if (a.getStatusPreuzimanja() == 0) {\n // System.out.println(\"update statusa!\");\n bp.statusPreuzimanjaPodataka(a.getAdresa());\n }\n }\n }\n }\n kraj = System.currentTimeMillis();\n long trajanjeObrade = kraj - pocetak;\n try {\n long spavanje = pauza * 1000;\n if (trajanjeObrade < spavanje) {\n sleep(spavanje - trajanjeObrade);\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(MeteoPodaciPreuzimanje.class.getName()).log(Level.SEVERE, null, ex);\n break;\n }\n }\n }",
"@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\t\tCliente c = criaCliente();\n\t\t\tArrayList<Integer> t = new ArrayList<Integer>();\t\t\t\n\t\t\tt = geraTempoServicos(c.getServicosSolicitados().size());\n\n\t\t\t// Atribui o tempo aos serviços da forma especificada na descrição do projeto\n\t\t\t// Obs: getServico() da classe serviço não gasta um serviço\n\t\t\tfor(Servico s: c.getServicosSolicitados()) {\n\t\t\t\tif(s.getTipo() == TipoServico.PENTEADO) {\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.CORTE) {\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.DEPILACAO) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.PEDICURE) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t} else if(s.getTipo() == TipoServico.MASSAGEM) {\t\n\t\t\t\t\ts.setTempo(t.get(0));\n\t\t\t\t\tt.remove(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfilas.insereEmFilaClientes(0, c);\n\t\t\t\n\t\t\ttry {\t\n\t\t\t\t// Tempo de geração de clientes: 1 ~ 5 segundos\n\t\t\t\tThread.sleep(500*(rand.nextInt(5)+1));\n\t\t\t} catch(InterruptedException ex) {\n\t\t\t\t Thread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t}",
"public void obtenerTipificacionesCliente(Participante cliente)\n throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Entrada\");\n BelcorpService bs;\n RecordSet respuesta;\n String codigoError;\n StringBuffer query = new StringBuffer();\n\n if (cliente.getOidCliente() == null) {\n cliente.setTipificacionCliente(null);\n if(log.isDebugEnabled()) {//sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- NULO : \");\n UtilidadesLog.debug(\"---- cliente : \" + cliente.getOidCliente());\n } \n } else {\n try {\n bs = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n try {\n query.append(\" SELECT CLIE_OID_CLIE, \");\n query.append(\" CLAS_OID_CLAS, \");\n query.append(\" SBTI_OID_SUBT_CLIE, \");\n query.append(\" TCCL_OID_TIPO_CLASI, \");\n query.append(\" TICL_OID_TIPO_CLIE \");\n query.append(\" FROM V_MAE_TIPIF_CLIEN \");\n query.append(\" WHERE CLIE_OID_CLIE = \" + cliente\n .getOidCliente());\n respuesta = bs.dbService.executeStaticQuery(query.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"---- TIPIF : \" + respuesta);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError));\n }\n\n if (respuesta.esVacio()) {\n cliente.setTipificacionCliente(null);\n } else {\n TipificacionCliente[] tipificaciones = new TipificacionCliente[\n respuesta.getRowCount()];\n\n for (int i = 0; i < respuesta.getRowCount(); i++) {\n tipificaciones[i] = new TipificacionCliente();\n\n {\n BigDecimal oidClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"CLAS_OID_CLAS\");\n tipificaciones[i].setOidClasificacionCliente((\n oidClasificacionCliente != null) ? new Long(\n oidClasificacionCliente.longValue()) : null);\n }\n\n tipificaciones[i].setOidSubTipoCliente(new Long((\n (BigDecimal) respuesta\n .getValueAt(i, \"SBTI_OID_SUBT_CLIE\")).longValue()));\n\n {\n BigDecimal oidTipoClasificacionCliente = (BigDecimal) \n respuesta.getValueAt(i, \"TCCL_OID_TIPO_CLASI\");\n tipificaciones[i].setOidTipoClasificacionCliente(\n (oidTipoClasificacionCliente != null)? new Long(\n oidTipoClasificacionCliente.longValue()) \n : null);\n }\n\n tipificaciones[i].setOidTipoCliente(new Long(((BigDecimal)\n respuesta.getValueAt(i, \"TICL_OID_TIPO_CLIE\"))\n .longValue()));\n }\n\n cliente.setTipificacionCliente(tipificaciones);\n }\n }\n UtilidadesLog.info(\" DAOSolicitudes.obtenerTipificacionesCliente(Par\"\n +\"ticipante cliente):Salida\");\n }",
"public void updateCoolD(DadosDoCliente dadosdoCliente) {\n \r\n if (CoolDown == true) {\r\n Log.i(\"coolDown\", \"Cooldown é true!!!!\");\r\n\r\n if (coolDownTime > 0) {\r\n counterIten--;\r\n if (counterIten == 0) {\r\n Log.i(\"coolDown\", \"aaa Cooldown diminuido\");\r\n coolDownTime--;\r\n dadosdoCliente.setItemEsp(-1);\r\n\r\n\r\n counterIten = 1000;\r\n }\r\n }\r\n }\r\n\r\n \r\n // Log.i(\"coolDown\", \"\" + coolDown);\r\n if (coolDownTime == 0 && CoolDown == true) {\r\n ok = true;\r\n }\r\n\r\n if (coolDownTime == -2 && ok == false) {\r\n Log.i(\"coolDown\", \"entrou na 1º condicao\");\r\n item_Selecionado = rnd.nextInt(3);\r\n coolDownTime = -1;\r\n }\r\n\r\n if (coolDownTime == 0 && ok == true) {\r\n Log.i(\"coolDown\", \"entrou na 2º condicao\");\r\n CoolDown = false;\r\n ok = false;\r\n coolDownTime = -2;\r\n\r\n } else {\r\n // item_Selecionado = -1;\r\n }\r\n }",
"public static void decreaseNumberOfClients()\n {\n --numberOfClients;\n }",
"public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}",
"protected void desbloquearTecla(String key, int tiempoEspera)\n {\n \tTimer timer;\n \ttimer = new Timer();\n \t\n \t// TimerTask para lanzar la tarea pasado un tiempo\n \tMyTimerTask timerTask = new MyTimerTask(key);\n \ttimer.schedule(timerTask, tiempoEspera);\n }",
"public synchronized void decrementClients()\r\n\t{\r\n\t\tnumberOfClients--;\r\n\t}",
"public long getTimeDisrepair()\n\t{\n\t\treturn timeDisrepair;\n\t}",
"private void getTiempo() {\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_TIME);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tSuperTiempo = sb.toString();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\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}",
"double clientTransferSeconds(final int index);",
"@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}",
"public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }",
"double getClientTime();",
"protected double NetworkServiceTime()\r\n\t{\r\n\t\treturn 25.0;\r\n\t}",
"@Override\n\tpublic void entrer(TC client) {\n\t\tint prio = client.getPrio();\n\t\tif (!estPleine()) {\n\t\t\tif(prio>maxPrio) {\t\t\t\t\t\t//Si la priorité donnée est sup\n\t\t\t\tsalle.get(maxPrio).add(client);\t\t//.get récupération clé .add rajout\n\t\t\t}\n\t\t\telse if (prio<0) {\t\t\t\t\t\t//Si priorité inf à 0\n\t\t\t\tsalle.get(0).add(client);\t\t\n\t\t\t}\n\t\t\telse {salle.get(client.getPrio()).add(client);\n\t\t\t// {salle.get(prio).entrer(client);}\n\t\t\t}\n\t\t}\n\t}",
"public void resetSerivceStatus() {\n totalWaitTime = BigInteger.ZERO;\n totalTravelTime = BigInteger.ZERO;\n totalTravelDistance = BigDecimal.ZERO;\n passengersServed = BigInteger.ZERO;\n }",
"private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }",
"public static void sycNewTraderClient() {\n\t\tString key = \"123\";\n\t\ttry {\n\t\t\tif(newTradeServiceLock.tryLock(5, TimeUnit.SECONDS)){\n\t\t\t\ttry{\n\t\t\t\t\tif(mapTradeService.containsKey(key)){\n\t\t\t\t\t\t//客户端发起重连,但是服务端没有断开\n\t\t\t\t\t}\n\t\t\t\t}finally{\n\t\t\t\t\tnewTradeServiceLock.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.err.println(\"线程已经超时返回! key : \"+key);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t}",
"public int getClientePorHora() {\r\n return clientePorHora;\r\n }",
"public void starteStartCountdown() {\r\n\r\n if (spielerSet.size() >= plugin.getConfig().getInt(\"Mindest-Spieler\")) {\r\n plugin.broadcastMessage(\"SnowSpleef startet jetzt\");\r\n final ItemStack[] items = new ItemStack[2];\r\n items[0] = new ItemStack(Material.IRON_SPADE, 1, (short) -32768);\r\n items[1] = new ItemStack(Material.SNOW_BALL, plugin.getConfig().getInt(\"Schneeball-Anzahl\"));\r\n\r\n startCountdown = true;\r\n BukkitRunnable startCountdownTask;\r\n startCountdownTask = new BukkitRunnable() {\r\n int counter = plugin.getConfig().getInt(\"StartCountdown-Zeit\") * 20;\r\n Iterator<String> it = spielerSet.iterator();\r\n Player spieler;\r\n\r\n @Override\r\n public void run() {\r\n counter--;\r\n if (counter == 0) {\r\n plugin.broadcastMessage(ChatColor.GOLD + \"GO!\");\r\n startCountdown = false;\r\n plugin.getSpiel().starteSpiel();\r\n this.cancel();\r\n } else {\r\n if (counter % 20 == 0) {\r\n for (String spieler : spielerSet) {\r\n plugin.sendMessage(plugin.getServer().getPlayer(spieler), ChatColor.GOLD + \"\" + (counter / 20) + \"...\");\r\n }\r\n }\r\n }\r\n if (it.hasNext()) {\r\n spieler = plugin.getServer().getPlayer(it.next());\r\n spieler.setGameMode(GameMode.SURVIVAL);\r\n spieler.getInventory().clear();\r\n spieler.getInventory().setContents(items);\r\n spieler.teleport(plugin.getSpiel().getSpielfeld().zufaelligerSpawn());\r\n }\r\n }\r\n };\r\n startCountdownTask.runTaskTimer(plugin, 0L, 1L);\r\n } else {\r\n plugin.broadcastMessage(\"Zu wenige Spieler haben SnowSpleef betreten\");\r\n this.stoppeSpiel();\r\n }\r\n }",
"public static void ComienzaTimer(){\n timer = System.nanoTime();\n }",
"private void puntuacion(){\n timer++;\n if(timer == 10){\n contador++;\n timer = 0;\n }\n }",
"public Client ClientplusFidel(Instant debutperiode,Instant finperiode){\n List<Ticket>tickets=ticketRepository.findAll();\n List<Ticket>ticketss=new ArrayList<>();\n\n for(Ticket ticket:tickets){\n if(ticket.getDate().isAfter(debutperiode)&&ticket.getDate().isBefore(finperiode)){\n ticketss.add(ticket);\n }\n }\n List<Client> cl= ticketss.stream().map(tic->tic.getClient()).collect(Collectors.toList());\n\n Client fidel=cl.stream().collect(Collectors.groupingBy(l->l, Collectors.counting())).entrySet().stream().max(Comparator.comparing(Map.Entry::getValue)).get().getKey();\n return fidel;\n }",
"private void deslocarBloco(double dist) {\n\t\t\t\ttime = System.currentTimeMillis();\r\n\t\t\t\tnow = 0;\r\n\t\t\t\twhile(now < distance * 10.0) {\r\n\t\t\t\t\tsendData(\"U\");\t\r\n\t\t\t\t\tnow = System.currentTimeMillis() - time;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsendData(\"u\");\r\n\t\t\t\t\r\n\t\t\t\ttime = System.currentTimeMillis();\r\n\t\t\t\tnow = 0;\r\n\t\t\t\twhile(now < 1000.0) {\r\n\t\t\t\t\tnow = System.currentTimeMillis() - time;\r\n\t\t\t\t}\r\n\t\t\t}",
"public void suspender(){\n if(this.robot.getOrden() == true){\n System.out.println(\"He terminado de atender al cliente, me suspendere.\" + \"\\n\");\n this.robot.asignarEstadoActual(this.robot.getEstadoSuspender());\n }\n }",
"public int darTamanoHourly()\n\t{\n\t\treturn queueHourly.darNumeroElementos();\n\t}",
"double clientWaitingSeconds(final int index);",
"void transStatus()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(passenger != null && status.equals(\"soon\"))\r\n\t\t\t{\r\n\t\t\t\tService s_temp = new Service(passenger);\r\n\t\t\t\tdes = passenger.loc;\r\n\t\t\t\tmakeService(loc.i*80+loc.j,des.i*80+des.j);\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tstatus = \"serve\";\r\n\t\t\t\tdes = passenger.des;\r\n\t\t\t\ts_temp.path.add(loc);\r\n\t\t\t\tmakeService(loc.i*80+loc.j,des.i*80+des.j,s_temp.path);\r\n\t\t\t\tstatus = \"stop\";\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tcredit += 3;\r\n\t\t\t\tser_times += 1;\r\n\t\t\t\tservices.add(s_temp);\r\n\t\t\t\t//refresh:\r\n\t\t\t\tstatus = \"wait\";\r\n\t\t\t\tpassenger = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");\r\n\t\t}\r\n\t}",
"@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}",
"protected void onGetOffTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public static void viaggia(List<Trasporto> lista,Taxi[] taxi,HandlerCoR h) throws SQLException\r\n {\n Persona app = (Persona) lista.get(0);\r\n /* ARGOMENTI handleRequest\r\n 1° Oggetto Request\r\n 2° Array Taxi per permettere la selezione e la modifica della disponibilità\r\n */\r\n h.handleRequest(new RequestCoR(app.getPosPartenza(),app.getPosArrivo(),taxi),taxi); \r\n SceltaPercorso tempo = new SceltaPercorso();\r\n SceltaPercorso spazio = new SceltaPercorso();\r\n tempo.setPercorsoStrategy(new timeStrategy());\r\n spazio.setPercorsoStrategy(new lenghtStrategy());\r\n for(int i=0;i<5;i++)\r\n if(!taxi[i].getLibero())\r\n {\r\n if(Scelta.equals(\"veloce\"))\r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Veloce...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n tempo.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n } else\r\n \r\n {\r\n JOptionPane.showMessageDialog(null,\"Hai Scelto il Percorso più Breve...\");\r\n Connessione conn;\r\n conn = Connessione.getConnessione();\r\n String query = \"Delete from CRONOCORSE where PASSEGGERO = ? \";\r\n try (PreparedStatement ps = conn.connect.prepareStatement(query)) {\r\n ps.setString(1, app.getNome());\r\n ps.executeUpdate();\r\n ps.close();\r\n JOptionPane.showMessageDialog(null,\"Cliente in viaggio...\\n\"+app.getNome()+\" è arrivato a destinazione!\\nPrezzo Corsa: \"+taxi[i].getPrezzoTotale()+\"€\");\r\n \r\n \r\n }catch(SQLException e){JOptionPane.showMessageDialog(null,e);}\r\n spazio.Prenota(taxi[i]); \r\n app.setPosPartenza();\r\n taxi[i].setPosizione(app.getPosArrivo());\r\n taxi[i].setStato(true);\r\n taxi[i].clear();\r\n lista.set(0,app);\r\n i=5;\r\n \r\n \r\n }\r\n }\r\n \r\n }",
"void clientTransferSecondsSet(final int index, final double time);",
"public long getClientForContest(long arg0) throws ContestManagementException {\r\n return 0;\r\n }",
"public void ponerMaximoTiempo() {\n this.timeFi = Long.parseLong(\"2000000000000\");\n }",
"@Override\r\n\tpublic String takeOff() {\n\t\treturn \"El Helicoptero esta despegando\";\r\n\t}",
"public void crunch(){\n cpuBurstTime--;\n rem--;\n }",
"public synchronized void ProvjeriPreuzimanje() {\n dopustenoPreuzimanje = true;\n if (dopustenoPreuzimanje) {\n SveFunkcijeDretve();\n } else {\n //sleep\n }\n }",
"public Double deuda(Cliente c);",
"public int actualizarTiempo(int empresa_id,int idtramite, int usuario_id) throws ParseException {\r\n\t\tint update = 0;\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\tString timeNow = formateador.format(date);\r\n\t\tSimpleDateFormat formateador2 = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString fecha = formateador2.format(date);\r\n\t\tSimpleDateFormat formateador3 = new SimpleDateFormat(\"hh:mm:ss\");\r\n\t\tString hora = formateador3.format(date);\r\n\t\tSystem.out.println(timeNow +\" \"+ fecha+\" \"+hora );\r\n\t\t\r\n\t\t List<Map<String, Object>> rows = listatks(empresa_id, idtramite);\t\r\n\t\t System.out.println(rows);\r\n\t\t if(rows.size() > 0 ) {\r\n\t\t\t String timeCreate = rows.get(0).get(\"TIMECREATE_HEAD\").toString();\r\n\t\t\t System.out.println(\" timeCreate \" +timeCreate+\" timeNow: \"+ timeNow );\r\n\t\t\t Date fechaInicio = formateador.parse(timeCreate); // Date\r\n\t\t\t Date fechaFinalizo = formateador.parse(timeNow); //Date\r\n\t\t\t long horasFechas =(long)((fechaInicio.getTime()- fechaFinalizo.getTime())/3600000);\r\n\t\t\t System.out.println(\" horasFechas \"+ horasFechas);\r\n\t\t\t long diferenciaMils = fechaFinalizo.getTime() - fechaInicio.getTime();\r\n\t\t\t //obtenemos los segundos\r\n\t\t\t long segundos = diferenciaMils / 1000;\t\t\t \r\n\t\t\t //obtenemos las horas\r\n\t\t\t long horas = segundos / 3600;\t\t\t \r\n\t\t\t //restamos las horas para continuar con minutos\r\n\t\t\t segundos -= horas*3600;\t\t\t \r\n\t\t\t //igual que el paso anterior\r\n\t\t\t long minutos = segundos /60;\r\n\t\t\t segundos -= minutos*60;\t\t\t \r\n\t\t\t System.out.println(\" horas \"+ horas +\" min\"+ minutos+ \" seg \"+ segundos );\r\n\t\t\t double tiempoTotal = Double.parseDouble(horas+\".\"+minutos);\r\n\t\t\t // actualizar cabecera \r\n\t\t\t updateHeaderOut( idtramite, fecha, hora, tiempoTotal, usuario_id);\r\n\t\t\t for (Map<?, ?> row : rows) {\r\n\t\t\t\t Map<String, Object> mapa = new HashMap<String, Object>();\r\n\t\t\t\tint idd = Integer.parseInt(row.get(\"IDD\").toString());\r\n\t\t\t\tint idtramite_d = Integer.parseInt(row.get(\"IDTRAMITE\").toString());\r\n\t\t\t\tint cantidaMaletas = Integer.parseInt(row.get(\"CANTIDAD\").toString());\r\n\t\t\t\tdouble precio = Double.parseDouble(row.get(\"PRECIO\").toString());\t\t\t\t\r\n\t\t\t\tdouble subtotal = subtotal(precio, tiempoTotal, cantidaMaletas);\r\n\t\t\t\tString tipoDescuento = \"\";\r\n\t\t\t\tdouble porcDescuento = 0;\r\n\t\t\t\tdouble descuento = descuento(subtotal, porcDescuento);\r\n\t\t\t\tdouble precioNeto = precioNeto(subtotal, descuento);\r\n\t\t\t\tdouble iva = 0;\r\n\t\t\t\tdouble montoIVA = montoIVA(precioNeto, iva);\r\n\t\t\t\tdouble precioFinal = precioFinal(precioNeto, montoIVA);\r\n\t\t\t\t//actualizar detalle\r\n\t\t\t\tupdateBodyOut( idd, idtramite_d, tiempoTotal , subtotal, tipoDescuento, porcDescuento, descuento, precioNeto, iva, montoIVA, precioFinal );\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\treturn update;\r\n\t}",
"public void geldCheat() {\n if (geld + 1000000 < Long.MAX_VALUE) {\n geld = geld + 1000000;\n ticker.neueNachricht(\"Korruptionsverdacht bei Stadtwerken!\");\n }\n }",
"@Override\r\n public void run() {\n d1++;\r\n if (d1 == 1) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP1_EXPIRE});\r\n }\r\n if (d1 == 10) {\r\n onReceive(new byte[]{Message.TIMER_MESSAGE, Message.TFP1_EXPIRE_N});\r\n }\r\n }",
"double clientResidenceSeconds(final int index);",
"public void desligarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" desligado!\");\n notificarTodos();\n }",
"public synchronized static void llamada(Cliente c) {\n System.out.println(c.toString());\n if (c.getOrigen() > piso) {\n try {\n System.out.println(\"Ascensor en el piso: \" + piso);\n System.out.println(\"Subiendo al piso \" + c.getOrigen());\n Thread.sleep(100);\n System.out.println(c.getNombre() + \" entro en el ascensor\");\n if (c.getDestino() > c.getOrigen()) {\n System.out.println(\"Subiendo al piso \" + c.getDestino());\n Thread.sleep(100);\n System.out.println(c.getNombre() + \" llego al destino\");\n piso = c.getDestino();\n } else {\n System.out.println(\"Bajando al piso \" + c.getDestino());\n Thread.sleep(100);\n System.out.println(c.getNombre() + \" llego al destino\");\n piso = c.getDestino();\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(Ascensor.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n try {\n\n System.out.println(\"Ascensor en el piso: \" + piso);\n System.out.println(\"Bajando al piso \" + c.getOrigen());\n Thread.sleep(100);\n System.out.println(c.getNombre() + \" entro en el ascensor\");\n if (c.getDestino() > c.getOrigen()) {\n System.out.println(\"Subiendo al piso \" + c.getDestino());\n Thread.sleep(100);\n System.out.println(c.getNombre() + \" llego al destino\");\n piso = c.getDestino();\n } else {\n System.out.println(\"Bajando al piso \" + c.getDestino());\n Thread.sleep(100);\n System.out.println(c.getNombre() + \" llego al destino\");\n piso = c.getDestino();\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(Ascensor.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"private void temporizadorRonda(int t) {\n Timer timer = new Timer();\n TimerTask tarea = new TimerTask() {\n @Override\n public void run() {\n if (!dead) {\n vida = vidaEstandar;\n atacar();\n rondas ++;\n tiempoRonda = tiempo;\n incrementarTiempo();\n reiniciarVentana();\n if(rondas == 4){\n matar();\n }\n temporizadorRonda(tiempo);\n }\n }\n };\n timer.schedule(tarea, t * 1000);\n }",
"private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}",
"void clientWaitingSecondsSet(final int index, final double time);",
"@HystrixCommand(fallbackMethod = \"tratamento_erro_timeout\", commandProperties = {\n @HystrixProperty(name = \"execution.isolation.thread.timeoutInMilliseconds\", value = \"2000\")\n }) \n @RequestMapping(value = \"/unico/{cep}\" , method = GET)\n public ResponseEntity<DadosCep> testeBuscaCepUnico(@PathVariable(\"cep\") String cep ) throws InterruptedException{\n Thread.sleep(5000);\n DadosCep dados = buscaCepService.buscaCepUnico(cep); \n return new ResponseEntity<DadosCep>(dados, HttpStatus.OK ); \n }",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"@Override\n\t\t\tpublic int durationToWait() {\n\t\t\t\treturn getCarType() == 2 ? 60000 : 15000;\n\t\t\t}",
"@Test\n public void testEliminarCliente() throws Exception {\n long sufijo = System.currentTimeMillis(); \n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(Long.valueOf(sufijo)); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n servicio.eliminarCliente(usuario.getLogin()); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin()); \n assertNull(usuarioRegistrado); \n }",
"public final void downTime() {\n RxDisposableManager.getInstance().add(getTAG(), Observable.interval(0, 1, TimeUnit.SECONDS).take(61).compose(RxUtil.applyIO()).subscribe(new CouponGetActivity$downTime$sub$1(this)));\n }",
"public static void clientsDecrement() {\n if (clientsNumber > 0) {\n clientsNumber--;\n }\n System.out.println(clientsNumber);\n }",
"@Override\n public void run() {\n while(true) {\n try {\n // Caixa dorme até que algum cliente o acorde\n ativo.acquire();\n // atende o cliente\n atender(atendido);\n // volta a estar disponível para atender um novo cliente\n disponivel = true;\n // incrementa o número de caixas a dormir (pois ele passará a dormir)\n this.mutexCaixasDormindo.acquire();\n SystemManager.getInstance().setNumeroCaixasDormindo(SystemManager.getInstance().getNumeroCaixasDormindo() + 1);\n this.mutexCaixasDormindo.release();\n // acorda o próximo cliente, caso haja algum\n SystemManager.getInstance().chamarProximoCliente();\n // incrementa a quantidade de caixas que etão disponíveis\n caixas.release();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"public long termina() {\n\t\treturn (System.currentTimeMillis() - inicio) / 1000;\n\t}",
"@Override // se crea una clase anonima donde se implementa el metodo run porque Timer task implementa la interfaz runnable\r\n public void run() {\r\n System.out.println(\"Tarea realizada en: \" + new Date() + \" nombre del Thread: \"\r\n + Thread.currentThread().getName()); //retorna el nombre del hilo actual\r\n System.out.println(\"Finaliza el tiempo\");\r\n timer.cancel(); // termina este timer descartando cualquier tarea programada actual\r\n }",
"public static void main(String[] args) {\r\n ExamenSegundo es = new ExamenSegundo();\r\n int num = 9000;\r\n try {\r\n num = Integer.parseInt(JOptionPane.showInputDialog(\"Puerto del servidor(9000-9010)\", 9000));\r\n System.out.println(\"Soy el :\" + num);\r\n lab3.setText(lab3.getText().replace(\"Puerto : \", \"Puerto : \" + num));\r\n lab6.setText(num + \"\");\r\n lab7.setText(num + \"\");\r\n clienteM = new ClienteM(num);\r\n servidorD = new ServidorD(num);\r\n clienteD = new ClienteD(num);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.exit(-1);\r\n }\r\n\r\n Thread sm = new Thread(servidorM);\r\n Thread cm = new Thread(clienteM);\r\n Thread sd = new Thread(servidorD);\r\n //Thread cd = new Thread(clienteD);\r\n// Thread sf = new Thread(servidorF);\r\n// Thread cf = new Thread(clienteF);\r\n\r\n sm.start();\r\n cm.start();\r\n sd.start();\r\n //cd.start();\r\n// sf.start();\r\n// cf.start();\r\n\r\n for (;;) {\r\n try {\r\n ArrayList columnas = servidorM.getServidores();\r\n ArrayList ips = servidorM.getServidoresIp();\r\n// System.out.println(modelo.getRowCount()+\" - \"+columnas.size());\r\n for (int i = modelo1.getRowCount() - 1; i >= 0; i--) {\r\n modelo1.removeRow(i);\r\n }\r\n ips = ordenarIps(columnas, ips);\r\n columnas.sort(null);\r\n for (int i = 0; i < columnas.size(); i++) {\r\n String fila[] = {ips.get(i).toString(), columnas.get(i).toString()};\r\n if (Integer.parseInt(columnas.get(i).toString()) == num) {\r\n clienteD.puertoServidor = Integer.parseInt(columnas.get((i + 1) % columnas.size()).toString());\r\n clienteD.ipServidor = ips.get((i + 1) % columnas.size()).toString().substring(1);\r\n servidorD.ipServidor = ips.get((i + 1) % columnas.size()).toString().substring(1);\r\n servidorD.puerto2 = Integer.parseInt(columnas.get((i + 1) % columnas.size()).toString());\r\n lab6.setText(columnas.get((i - 1 + columnas.size()) % columnas.size()).toString());\r\n lab7.setText(columnas.get((i + 1) % columnas.size()).toString());\r\n }\r\n modelo1.addRow(fila);\r\n }\r\n \r\n String fila[]= new String[1];\r\n for(int i=0;i<servidorD.aBuscados.size();i++){\r\n fila[0]=servidorD.aBuscados.get(i);\r\n modelo2.addRow(fila);\r\n }\r\n servidorD.aBuscados.clear();\r\n \r\n for(int i=0;i<servidorD.aRespuestas.size();i++){\r\n fila[0]=servidorD.aRespuestas.get(i);\r\n modelo3.addRow(fila);\r\n }\r\n servidorD.aRespuestas.clear();\r\n\r\n// System.out.println(\"bla\");\r\n servidorM.servidores.clear();\r\n servidorM.servidoresIp.clear();\r\n Thread.sleep(5000);\r\n } // sm.join();\r\n // cm.join();\r\n // sd.join();\r\n // //cd.join();\r\n // sf.join();\r\n // cf.join();\r\n catch (InterruptedException ex) {\r\n Logger.getLogger(ExamenSegundo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }",
"private Cliente obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri)\n throws MareException {\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Entrada\");\n \n StringBuffer nombreCli = new StringBuffer();\n\n // crear cliente\n Cliente cliente = new Cliente();\n cliente.setOidCliente(oidCliente);\n\n // completar oidEstatus\n BigDecimal oidEstatus = null;\n\n {\n BelcorpService bs1;\n RecordSet respuesta1;\n String codigoError1;\n StringBuffer query1 = new StringBuffer();\n\n try {\n bs1 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n try {\n query1.append(\" SELECT CLIE_OID_CLIE, \");\n query1.append(\" ESTA_OID_ESTA_CLIE \");\n query1.append(\" FROM MAE_CLIEN_DATOS_ADICI \");\n query1.append(\" WHERE CLIE_OID_CLIE = \" + oidCliente);\n respuesta1 = bs1.dbService.executeStaticQuery(query1.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta1 \" + respuesta1);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError1 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError1));\n }\n\n if (respuesta1.esVacio()) {\n cliente.setOidEstatus(null);\n } else {\n oidEstatus = (BigDecimal) respuesta1\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatus((oidEstatus != null) ? new Long(\n oidEstatus.longValue()) : null);\n }\n }\n // completar oidEstatusFuturo\n {\n BelcorpService bs2;\n RecordSet respuesta2;\n String codigoError2;\n StringBuffer query2 = new StringBuffer();\n\n try {\n bs2 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n try {\n query2.append(\" SELECT OID_ESTA_CLIE, \");\n query2.append(\" ESTA_OID_ESTA_CLIE \");\n query2.append(\" FROM MAE_ESTAT_CLIEN \");\n query2.append(\" WHERE OID_ESTA_CLIE = \" + oidEstatus);\n respuesta2 = bs2.dbService.executeStaticQuery(query2.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta2 \" + respuesta2); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError2 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError2));\n }\n\n if (respuesta2.esVacio()) {\n cliente.setOidEstatusFuturo(null);\n } else {\n {\n BigDecimal oidEstatusFuturo = (BigDecimal) respuesta2\n .getValueAt(0, \"ESTA_OID_ESTA_CLIE\");\n cliente.setOidEstatusFuturo((oidEstatusFuturo != null) \n ? new Long(oidEstatusFuturo.longValue()) : null);\n }\n }\n }\n // completar periodoPrimerContacto \n {\n BelcorpService bs3;\n RecordSet respuesta3;\n String codigoError3;\n StringBuffer query3 = new StringBuffer();\n\n try {\n bs3 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n try {\n query3.append(\" SELECT A.CLIE_OID_CLIE, \");\n query3.append(\" A.PERD_OID_PERI, \");\n query3.append(\" B.PAIS_OID_PAIS, \");\n query3.append(\" B.CANA_OID_CANA, \");\n query3.append(\" B.MARC_OID_MARC, \");\n query3.append(\" B.FEC_INIC, \");\n query3.append(\" B.FEC_FINA, \");\n query3.append(\" C.COD_PERI \");\n query3.append(\" FROM MAE_CLIEN_PRIME_CONTA A, \");\n query3.append(\" CRA_PERIO B, \");\n query3.append(\" SEG_PERIO_CORPO C \");\n query3.append(\" WHERE A.CLIE_OID_CLIE = \" + oidCliente);\n query3.append(\" AND A.PERD_OID_PERI = B.OID_PERI \");\n query3.append(\" AND B.PERI_OID_PERI = C.OID_PERI \");\n respuesta3 = bs3.dbService.executeStaticQuery(query3.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta3 \" + respuesta3); \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError3 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError3));\n }\n\n if (respuesta3.esVacio()) {\n cliente.setPeriodoPrimerContacto(null);\n } else {\n Periodo periodo = new Periodo();\n\n {\n BigDecimal oidPeriodo = (BigDecimal) respuesta3\n .getValueAt(0, \"PERD_OID_PERI\");\n periodo.setOidPeriodo((oidPeriodo != null) \n ? new Long(oidPeriodo.longValue()) : null);\n }\n\n periodo.setCodperiodo((String) respuesta3\n .getValueAt(0, \"COD_PERI\"));\n periodo.setFechaDesde((Date) respuesta3\n .getValueAt(0, \"FEC_INIC\"));\n periodo.setFechaHasta((Date) respuesta3\n .getValueAt(0, \"FEC_FINA\"));\n periodo.setOidPais(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"PAIS_OID_PAIS\")).longValue()));\n periodo.setOidCanal(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"CANA_OID_CANA\")).longValue()));\n periodo.setOidMarca(new Long(((BigDecimal) respuesta3\n .getValueAt(0, \"MARC_OID_MARC\")).longValue()));\n cliente.setPeriodoPrimerContacto(periodo);\n }\n }\n // completar AmbitoGeografico\n {\n BelcorpService bs4;\n RecordSet respuesta4;\n String codigoError4;\n StringBuffer query4 = new StringBuffer();\n\n try {\n bs4 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n try {\n //jrivas 29/6/2005\n //Modificado INC. 19479\n SimpleDateFormat sdfFormato = new SimpleDateFormat(\"dd/MM/yyyy\");\n String fechaDesde = sdfFormato.format(peri.getFechaDesde());\n String fechaHasta = sdfFormato.format(peri.getFechaHasta());\n\n query4.append(\" SELECT sub.oid_subg_vent, reg.oid_regi, \");\n query4.append(\" zon.oid_zona, sec.oid_secc, \");\n query4.append(\" terr.terr_oid_terr, \");\n query4.append(\" sec.clie_oid_clie oid_lider, \");\n query4.append(\" zon.clie_oid_clie oid_gerente_zona, \");\n query4.append(\" reg.clie_oid_clie oid_gerente_region, \");\n query4.append(\" sub.clie_oid_clie oid_subgerente \");\n query4.append(\" FROM mae_clien_unida_admin una, \");\n query4.append(\" zon_terri_admin terr, \");\n query4.append(\" zon_secci sec, \");\n query4.append(\" zon_zona zon, \");\n query4.append(\" zon_regio reg, \");\n query4.append(\" zon_sub_geren_venta sub \");\n //jrivas 27/04/2006 INC DBLG50000361\n //query4.append(\" , cra_perio per1, \");\n //query4.append(\" cra_perio per2 \");\n query4.append(\" WHERE una.clie_oid_clie = \" + oidCliente);\n query4.append(\" AND una.ztad_oid_terr_admi = \");\n query4.append(\" terr.oid_terr_admi \");\n query4.append(\" AND terr.zscc_oid_secc = sec.oid_secc \");\n query4.append(\" AND sec.zzon_oid_zona = zon.oid_zona \");\n query4.append(\" AND zon.zorg_oid_regi = reg.oid_regi \");\n query4.append(\" AND reg.zsgv_oid_subg_vent = \");\n query4.append(\" sub.oid_subg_vent \");\n //jrivas 27/04/2006 INC DBLG50000361\n query4.append(\" AND una.perd_oid_peri_fin IS NULL \");\n \n // sapaza -- PER-SiCC-2013-0960 -- 03/09/2013\n //query4.append(\" AND una.ind_acti = 1 \");\n \n /*query4.append(\" AND una.perd_oid_peri_fin = \");\n query4.append(\" AND una.perd_oid_peri_ini = per1.oid_peri \");\n query4.append(\" per2.oid_peri(+) \");\n query4.append(\" AND per1.fec_inic <= TO_DATE ('\" + \n fechaDesde + \"', 'dd/MM/yyyy') \");\n query4.append(\" AND ( per2.fec_fina IS NULL OR \");\n query4.append(\" per2.fec_fina >= TO_DATE ('\" + fechaHasta \n + \"', 'dd/MM/yyyy') ) \");*/\n\n respuesta4 = bs4.dbService.executeStaticQuery(query4.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"respuesta4: \" + respuesta4);\n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError4 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError4));\n }\n\n Gerente lider = new Gerente();\n Gerente gerenteZona = new Gerente();\n Gerente gerenteRegion = new Gerente();\n Gerente subGerente = new Gerente();\n\n if (respuesta4.esVacio()) {\n cliente.setAmbitoGeografico(null);\n } else {\n AmbitoGeografico ambito = new AmbitoGeografico();\n ambito.setOidSubgerencia(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBG_VENT\")).longValue()));\n ambito.setOidRegion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_REGI\")).longValue()));\n ambito.setOidZona(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_ZONA\")).longValue()));\n ambito.setOidSeccion(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SECC\")).longValue()));\n\n //jrivas 29/6/2005\n //Modificado INC. 19479\n ambito.setOidTerritorio(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"TERR_OID_TERR\")).longValue()));\n\n if (respuesta4.getValueAt(0, \"OID_LIDER\") != null) {\n lider.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_LIDER\")).longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_ZONA\") != null) {\n gerenteZona.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_GERENTE_ZONA\")).longValue()));\n ;\n }\n\n if (respuesta4.getValueAt(0, \"OID_GERENTE_REGION\") != null) {\n gerenteRegion.setOidCliente(new Long(((BigDecimal) \n respuesta4.getValueAt(0, \"OID_GERENTE_REGION\"))\n .longValue()));\n }\n\n if (respuesta4.getValueAt(0, \"OID_SUBGERENTE\") != null) {\n subGerente.setOidCliente(new Long(((BigDecimal) respuesta4\n .getValueAt(0, \"OID_SUBGERENTE\")).longValue()));\n }\n\n ambito.setLider(lider);\n ambito.setGerenteZona(gerenteZona);\n ambito.setGerenteRegion(gerenteRegion);\n ambito.setSubgerente(subGerente);\n\n cliente.setAmbitoGeografico(ambito);\n }\n }\n // completar nombre\n {\n BelcorpService bs5;\n RecordSet respuesta5;\n String codigoError5;\n StringBuffer query5 = new StringBuffer();\n\n try {\n bs5 = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n try {\n query5.append(\" SELECT OID_CLIE, \");\n query5.append(\" VAL_APE1, \");\n query5.append(\" VAL_APE2, \");\n query5.append(\" VAL_NOM1, \");\n query5.append(\" VAL_NOM2 \");\n query5.append(\" FROM MAE_CLIEN \");\n query5.append(\" WHERE OID_CLIE = \" + oidCliente.longValue());\n respuesta5 = bs5.dbService.executeStaticQuery(query5.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuesta5 \" + respuesta5);\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n codigoError5 = CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(\n codigoError5));\n }\n\n if (respuesta5.esVacio()) {\n cliente.setNombre(null);\n } else {\n \n if(respuesta5.getValueAt(0, \"VAL_NOM1\")!=null) {\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_NOM2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_NOM2\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE1\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE1\"));\n }\n \n if(respuesta5.getValueAt(0, \"VAL_APE2\")!=null) {\n if(nombreCli.length()!=0) {\n nombreCli.append(\" \");\n }\n nombreCli.append((String) respuesta5.getValueAt(0, \"VAL_APE2\"));\n }\n \n cliente.setNombre(nombreCli.toString());\n }\n }\n\n UtilidadesLog.info(\" DAOSolicitudes.obtenerDatosGeneralesCliente(Long oidCliente, Periodo peri):Salida\");\n return cliente;\n }",
"public void ActualizadorOro(){\n\njavax.swing.Timer ao = new javax.swing.Timer(1000*60, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n\n usuarios = new ArrayList<Usuario>();\n ResultSet rs = st.executeQuery(\"select * from usuarios\");\n while(rs.next()){\n usuarios.add(new Usuario(rs.getString(1), rs.getString(2), rs.getString(3), Integer.parseInt(rs.getString(4)), Integer.parseInt(rs.getString(5)), Integer.parseInt(rs.getString(6)), Integer.parseInt(rs.getString(7))));\n }\n\n //preparamos una consulta que nos lanzara el numero de minas por categoria que tiene cada usuario\n String consulta1 = \"select idEdificio, count(*) from regiones, edificiosregion\"+\n \" where regiones.idRegion=edificiosregion.idRegion\"+\n \" and propietario='\";\n\n String consulta2 = \"' and idEdificio in (1101,1102,1103,1104,1105)\"+\n \" group by idEdificio\";\n\n //recorremos toda la lista sumando el oro, dependiendo del numero de minas que posea\n ResultSet rs2 = null;\n for(Usuario usuario : usuarios){\n rs2 = st.executeQuery(consulta1 + usuario.getNick() + consulta2);\n int oro = 0;\n while(rs2.next()){\n System.out.println(Integer.parseInt(rs2.getString(1)));\n if(Integer.parseInt(rs2.getString(1)) == 1101){\n oro = oro + (rs2.getInt(2) * 100);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1102){\n oro = oro + (rs2.getInt(2) * 150);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1103){\n oro = oro + (rs2.getInt(2) * 300);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1104){\n oro = oro + (rs2.getInt(2) * 800);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1105){\n oro = oro + (rs2.getInt(2) * 2000);\n }\n }\n st.executeQuery(\"UPDATE usuarios SET oro = (SELECT oro+\" + oro + \" FROM usuarios WHERE nick ='\" + usuario.getNick() + \"'\"+\n \") WHERE nick = '\" + usuario.getNick() + \"'\");\n\n }\n st.close();\n rs.close();\n rs2.close();\n conn.close();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage() + \" Fallo actualizar oro.\");\n }\n\n }\n });\n\n ao.start();\n}",
"public void teleopPeriodic() {\r\n }",
"public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }",
"public void resetOccupied(){\n \t\toccupiedSeconds = 0;\n \t}",
"@Scheduled(fixedRate = 19000)\n public void tesk() {\n\t\tDateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\");\n DateFormat tf =new SimpleDateFormat(\"HH:mm\");\n\t\t// Get the date today using Calendar object.\n\t\tDate today = Calendar.getInstance().getTime(); \n\t\t// Using DateFormat format method we can create a string \n\t\t// representation of a date with the defined format.\n\t\tString reportDate = df.format(today);\n\t\tString repo = tf.format(today);\n\t\tSystem.out.println(\"Report Date: \" + reportDate);\n \n\t\t List<Tacher> tacher= tacherservice.findBydatetime(today, repo);\n\t\t\n\t\t if (tacher!=null){\t \n \t\t for(int i=0; i<tacher.size(); i++) {\n \t\t\t Tacher current = tacher.get(i);\n \t\t\t System.out.println(\"Tacher: \" + current.getId()+\" Statut=\"+current.getStatut()); \n \t\t tacherservice.metajourtacher(current.getId());\n \t\t System.out.println(\"Tacher: \" + current.getId()+\" Statut=\"+current.getStatut());\n \t\t } ///// fermeteur de for \n\t\t }//fermeteur de if\n\t}",
"private void gestioneDisconnessione(Exception e) {\n\t\tLOG.info(\"Client disconnesso\");\n\t\tthis.completeWithError(e);\n\t\tthis.running=false;\n\t}",
"double clientProcessSeconds(final int index);",
"String clientTransferTime(final int index);",
"String clientWaitingTime(final int index);",
"@Override\n public long getCost(Client client) throws HederaStatusException, HederaNetworkException {\n return Math.max(super.getCost(client), 25);\n }",
"public void descontarUnidad() {\r\n\t\tcantidad--;\r\n\t}",
"public int Recebe_salario() {\n\t\treturn 8000;\r\n\t}",
"public void run (){\n\t\ttry{\n\t\t\tthis.sleep(tiempoEspera);\n\t\t}catch(InterruptedException ex){\n\t\t\tif(debug>0)System.err.println(\"WARNING:Temporizador interrumpido antes de tiempo de forma inesperada\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tEvent ev = new Event(Event.TIME_OUT);\n\t\tbuzon.meter(ev);\n }",
"public void start() {\n boolean continua = true;\n Dati datiRMP;\n int codPiatto;\n int codRiga;\n int quantiCoperti;\n int quanteComande;\n String descPiatto;\n String catPiatto;\n Modulo modRMP = RMPModulo.get();\n Modulo modPiatto = PiattoModulo.get();\n Modulo modCategoria = CategoriaModulo.get();\n ModuloRisultati modRisultati = getModuloRisultati();\n Campo chiaveRMP;\n int codRMP;\n int codMenu;\n int[] codici;\n double qtaOff;\n double qtaCom;\n double gradimento = 0.0;\n PanCoperti panCoperti;\n\n try { // prova ad eseguire il codice\n\n /* azzera il numero di coperti serviti */\n panCoperti = getPanCoperti();\n panCoperti.setNumCopertiPranzo(0);\n panCoperti.setNumCopertiCena(0);\n\n /* svuota i dati del modulo risultati */\n getModuloRisultati().query().eliminaRecords();\n\n datiRMP = this.getDati();\n chiaveRMP = modRMP.getCampoChiave();\n\n /* spazzola le RMP trovate */\n for (int k = 0; k < datiRMP.getRowCount(); k++) {\n\n this.quanti++;\n\n codRMP = datiRMP.getIntAt(k, chiaveRMP);\n codPiatto = datiRMP.getIntAt(k, modRMP.getCampo(RMP.CAMPO_PIATTO));\n descPiatto = datiRMP.getStringAt(k,\n modPiatto.getCampo(Piatto.CAMPO_NOME_ITALIANO));\n catPiatto = datiRMP.getStringAt(k,\n modCategoria.getCampo(Categoria.CAMPO_SIGLA));\n\n codRiga = addPiatto(codPiatto, descPiatto, catPiatto);\n\n if (codRiga <= 0) {\n continua = false;\n break;\n }// fine del blocco if\n\n /* incrementa di 1 il numero di volte in cui il piatto è stato proposto\n * per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quanteVolte, 1);\n\n /* determina il numero dei coperti presenti nel menu al\n * quale questa RMP appartiene */\n codMenu = datiRMP.getIntAt(k, modRMP.getCampo(RMP.CAMPO_MENU));\n quantiCoperti = getQuantiCoperti(codMenu);\n\n /* incrementa il numero di coperti potenziali per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quantiCoperti, quantiCoperti);\n\n /* determina il numero di comande effettuate\n * per questa RMP */\n quanteComande = getQuanteComande(codRMP);\n\n /* incrementa il numero di comande effettuate per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quanteComande, quanteComande);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n continua = false;\n break;\n }// fine del blocco if\n\n } // fine del ciclo for\n\n /* spazzola le righe dei risultati per regolare il gradimento */\n if (continua) {\n codici = modRisultati.query().valoriChiave();\n for (int k = 0; k < codici.length; k++) {\n codRiga = codici[k];\n gradimento = 0.0;\n qtaOff = modRisultati.query()\n .valoreDouble(Campi.Ris.quantiCoperti.getCampo(), codRiga);\n qtaCom = modRisultati.query()\n .valoreDouble(Campi.Ris.quanteComande.getCampo(), codRiga);\n if (qtaOff != 0) {\n gradimento = qtaCom / qtaOff;\n gradimento = Lib.Mat.arrotonda(gradimento, 4);\n }// fine del blocco if\n modRisultati.query().registraRecordValore(codRiga,\n Campi.Ris.gradimento.getCampo(),\n gradimento);\n } // fine del ciclo for\n }// fine del blocco if\n\n datiRMP.close();\n\n getNavigatore().aggiornaLista();\n\n /* aggiorna il numero di coperti serviti */\n Filtro filtro;\n Number numero;\n Modulo moduloRMT = RMTModulo.get();\n Filtro filtroMenu = getFiltroMenu();\n Filtro filtroPranzo = FiltroFactory.crea(MenuModulo.get().getCampo(Menu.Cam.pasto), Ristorante.COD_DB_PRANZO);\n Filtro filtroCena = FiltroFactory.crea(MenuModulo.get().getCampo(Menu.Cam.pasto), Ristorante.COD_DB_CENA);\n filtro = new Filtro();\n filtro.add(filtroMenu);\n filtro.add(filtroPranzo);\n numero = moduloRMT.query().somma(RMT.Cam.coperti.get(), filtro);\n panCoperti.setNumCopertiPranzo(Libreria.getInt(numero));\n filtro = new Filtro();\n filtro.add(filtroMenu);\n filtro.add(filtroCena);\n numero = moduloRMT.query().somma(RMT.Cam.coperti.get(), filtro);\n panCoperti.setNumCopertiCena(Libreria.getInt(numero));\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void resetTimeLimit();",
"public void decMonstres() {\n\t\tthis.nbMonstres -= 1;\n\t}",
"private void addClient () {\n ArrayList<String> info = loadOnePlayerInfo();\n Ntotal++;\n Nnow++;\n\n System.out.println(\"Vai ser inicializado o utilizador \" + info.get(0));\n initThread(info.get(0), info.get(1));\n }",
"@Override\n public void teleopPeriodic() {\n }",
"@Override\n public void teleopPeriodic() {\n }",
"void removePouncee(Long pouncee);",
"public void ferdig(){\n antallTelegrafister--;\n }",
"void clientResidenceSecondsSet(final int index, final double time);",
"private void peticionDeCliente() throws IOException, InterruptedException {\n\t\tString mensaje = null;\n\t\tboolean salir = false;\n\t\twhile(!salir) {\n\t\t\tmensaje = in.readLine();\n\t\t\tif(mensaje!=null && !mensaje.split(\";\")[0].equals(\"Comprobacion\")) {\n\t\t\t\tthis.tcpServidor.colaPeticion.put(mensaje); //ALMACENA SOLICITUD EN COLA_PETICIONES\n\t\t\t\tSystem.out.println(\"Peticion del cliente \"+this.idCliente+\": \"+ mensaje);\n\t\t\t}\n\t\t}\n\t}",
"protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}",
"public void tickerNeuStarten( int ms ) \n {\n anzeige.tickerAbmelden( this );\n anzeige.tickerAnmelden( this , ms );\n }",
"public void gererPatrimoine(Client client) {\n\t\tif (calculerSoldeTotal(client) > 500000) {\n\t\t\tSystem.out.println(\"Riche client !\");\n\t\t\tSystem.out.println(\"Gestion de Patrimoine :\");\n\t\t\tAction action1 = new Action(\"Airbus\", 72, \"Paris\");\n\t\t\tacheterAction(action1);\n\t\t}\n\t}",
"@Override\n protected Void doInBackground(Void... params) {\n while(myProgress<TIEMPOMAXIMO){\n if (isCancelled())\n break;\n\n if(Cancelar==true){\n myProgress=TIEMPOMAXIMO;\n }else {\n\n if(issumartiempo==true){\n TIEMPOMAXIMO=TIEMPOAUMENTADO+TIEMPOLIMITE;\n\n }\n myProgress++;\n\n publishProgress(myProgress);\n\n\n SystemClock.sleep(1000);}\n }\n return null;\n }",
"public void contartiempo() {\r\n\r\n\t\tif (activarContador) {\r\n\t\t//\tSystem.out.println(\"CONTADOR \" + activarContador);\r\n\t\t\tif (app.frameCount % 60 == 0) {\r\n\t\t\t\tcontador--;\r\n\t\t\t//\tSystem.out.println(\"EMPEZO CONTADOR\");\r\n\t\t\t//\tSystem.out.println(\"CONTADOR \" + contador);\r\n\t\t\t\tif (contador == 0) {\r\n\t\t\t\t\tcontador = 0;\r\n\t\t\t\t\tactivado = false;\r\n\t\t\t\t\tactivarContador = false;\r\n\t\t\t\t//\tSystem.out.println(\"CONTADOR \" + activarContador);\r\n\t\t\t\t//\tSystem.out.println(\"EFECTO \" + activado);\r\n\t\t\t\t\tplayer.setBoost(0);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public double getClientTime() {\n return clientTime_;\n }",
"private void obtenerClienteRecomendado(Cliente clienteParametro, Long oidPais) throws MareException {\n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Entrada\");\n\n BelcorpService bsInc = null;\n RecordSet respuestaInc = null;\n StringBuffer queryInc = new StringBuffer();\n ArrayList lstRecomendados;\n\n if ( clienteParametro.getClienteRecomendante() != null){\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"oidClienteRecomendante=\"+clienteParametro.getClienteRecomendante().getRecomendante());\n }\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n try {\n queryInc.append(\" SELECT \");\n queryInc.append(\" CLIE_OID_CLIE_VNDO CLIE_OID_CLIE, \");\n queryInc.append(\" FEC_DESD FEC_INIC, \");\n queryInc.append(\" FEC_HAST FEC_FINA \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n queryInc.append(\" AND CLIE_OID_CLIE_VNDO NOT IN ( \");\n \n // queryInc.append(\" SELECT RDO.CLIE_OID_CLIE, FEC_INIC, FEC_FINA \");\n queryInc.append(\" SELECT DISTINCT RDO.CLIE_OID_CLIE \");\n queryInc.append(\" FROM INC_CLIEN_RECDO RDO, CRA_PERIO, \");\n queryInc.append(\" INC_CLIEN_RECTE RECT \");\n queryInc.append(\" WHERE PERD_OID_PERI = OID_PERI \");\n queryInc.append(\" AND RECT.CLIE_OID_CLIE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND CLR3_OID_CLIE_RETE = OID_CLIE_RETE \");\n \n queryInc.append(\" ) \");\n \n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n //BelcorpService bsMae = null;\n RecordSet respuestaMae = null;\n //StringBuffer queryMae = new StringBuffer();\n\n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n \n boolean hayRecomendado = false;\n Cliente clienteLocal = new Cliente();\n lstRecomendados = clienteParametro.getClienteRecomendado();\n\n if (!respuestaInc.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnINC(true);\n \n /* vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n * no lleno lstRecomendados con estos valores solo mantengo el indicador IndRecomendadosEnINC \n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaInc.getRowCount();i++){ \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente()); \n \n BigDecimal recomendado = (BigDecimal) respuestaInc.getValueAt(i, \"CLIE_OID_CLIE\");\n clienteRecomendado.setRecomendado((recomendado != null) ? new Long(recomendado.longValue()) : null);\n \n clienteRecomendado.setFechaInicio((Date) respuestaInc.getValueAt(i, \"FEC_INIC\"));\n Date fechaFin = (Date) respuestaInc.getValueAt(i, \"FEC_FINA\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n\n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n }*/\n } \n \n // vbongiov -- RI SiCC 20090941 -- 16/06/2009 \n // \n \n try {\n queryInc = new StringBuffer(); \n queryInc.append(\" SELECT CLIE_OID_CLIE_VNDO, FEC_DESD, FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU, MAE_TIPO_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n queryInc.append(\" AND TIVC_OID_TIPO_VINC = OID_TIPO_VINC \");\n queryInc.append(\" AND PAIS_OID_PAIS = \" + oidPais);\n queryInc.append(\" AND IND_RECO = 1 \");\n\n respuestaMae = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMae \" + respuestaMae); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n if (!respuestaMae.esVacio()) {\n \n hayRecomendado = true;\n \n clienteParametro.setIndRecomendadosEnMAE(true);\n \n lstRecomendados.clear();\n \n for(int i=0; i<respuestaMae.getRowCount();i++){ \n \n ClienteRecomendado clienteRecomendado = new ClienteRecomendado(); \n\n clienteRecomendado.setRecomendante(clienteParametro.getOidCliente());\n\n clienteRecomendado.setRecomendado(new Long(((BigDecimal) \n respuestaMae.getValueAt(i, \"CLIE_OID_CLIE_VNDO\")).longValue()));\n {\n Date fechaInicio = (Date) respuestaMae.getValueAt(i, \"FEC_DESD\");\n clienteRecomendado.setFechaInicio((fechaInicio != null) ? fechaInicio : null);\n }\n\n {\n Date fechaFin = (Date) respuestaMae.getValueAt(i, \"FEC_HAST\");\n clienteRecomendado.setFechaFin((fechaFin != null) ? fechaFin : null);\n }\n \n clienteLocal.setOidCliente(clienteRecomendado.getRecomendado());\n this.obtenerPeriodosConPedidosCliente(clienteLocal);\n clienteRecomendado.setPeriodosConPedidos(clienteLocal.getPeriodosConPedidos());\n \n lstRecomendados.add(clienteRecomendado); \n \n }\n \n clienteParametro.setClienteRecomendado(lstRecomendados);\n \n } else {\n hayRecomendado = false;\n }\n\n if (!hayRecomendado) {\n clienteParametro.setClienteRecomendado(null);\n }\n \n // JVM, sicc 20070381, if, manejo del Recomendador, bloque de recuparacion de periodo\n if (lstRecomendados.size() > 0)\n { \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n \n RecordSet respuestaMaeRdr = null;\n\n try { \n queryInc = new StringBuffer();\n queryInc.append(\" SELECT DISTINCT CLIE_OID_CLIE_VNTE , FEC_DESD , FEC_HAST \");\n queryInc.append(\" FROM MAE_CLIEN_VINCU \");\n queryInc.append(\" WHERE CLIE_OID_CLIE_VNTE = \" + clienteParametro.getOidCliente());\n respuestaMaeRdr = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaMaeRdr \" + respuestaMaeRdr); \n \n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n \n ClienteRecomendante clienteRecomendador = new ClienteRecomendante();\n \n if (!respuestaMaeRdr.esVacio()) {\n \n {\n BigDecimal recomendador = (BigDecimal) respuestaMaeRdr.getValueAt(0, \"CLIE_OID_CLIE_VNTE\");\n clienteRecomendador.setRecomendante((recomendador != null) ? new Long(recomendador.longValue()) : null);\n }\n \n clienteRecomendador.setFechaInicio((Date) respuestaMaeRdr.getValueAt(0, \"FEC_DESD\"));\n // fecha fin de INC\n {\n Date fechaFin = (Date) respuestaMaeRdr.getValueAt(0, \"FEC_HAST\");\n clienteRecomendador.setFechaFin((fechaFin != null)? fechaFin : null);\n }\n \n clienteParametro.setClienteRecomendador(clienteRecomendador);\n }\n \n for (int i=0; i<lstRecomendados.size(); i++){\n\n ClienteRecomendado clienteRecomendados = new ClienteRecomendado(); \n \n clienteRecomendados = (ClienteRecomendado) lstRecomendados.get(i);\n \n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n try {\n bsInc = BelcorpService.getInstance();\n } catch (MareMiiServiceNotFoundException e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n\n queryInc = new StringBuffer();\n \n try {\n queryInc.append(\" select x.n, x.oid_peri, x.fec_inic, x.fec_fina, x.pais_oid_pais, x.marc_oid_marc, x.cana_oid_cana \"); \n queryInc.append(\" from ( \"); \n queryInc.append(\" select 1 n, b.oid_peri as oid_peri, \"); \n queryInc.append(\" b.fec_inic as fec_inic, \"); \n queryInc.append(\" b.fec_fina as fec_fina, \"); \n queryInc.append(\" b.pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" b.marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" b.cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from mae_clien_prime_conta a, cra_perio b, seg_perio_corpo c \"); \n queryInc.append(\" where a.clie_oid_clie = \" + clienteRecomendados.getRecomendado()); \n queryInc.append(\" and a.perd_oid_peri = b.oid_peri \"); \n queryInc.append(\" and b.peri_oid_peri = c.oid_peri \"); \n queryInc.append(\" and b.oid_peri in ( \"); \n queryInc.append(\" select oid_peri \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD/MM/YYYY') <= fec_fina ) \");\n queryInc.append(\" union \"); \n queryInc.append(\" select rownum + 1 as n, oid_peri as oid_peri, \"); \n queryInc.append(\" fec_inic as fec_inic, \"); \n queryInc.append(\" fec_fina as fec_fina, \"); \n queryInc.append(\" pais_oid_pais as pais_oid_pais, \"); \n queryInc.append(\" marc_oid_marc as marc_oid_marc, \"); \n queryInc.append(\" cana_oid_cana as cana_oid_cana \"); \n queryInc.append(\" from cra_perio \"); \n queryInc.append(\" where fec_inic <= to_date ('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') \");\n queryInc.append(\" and to_date('\"+ df.format(clienteRecomendados.getFechaInicio()) +\"', 'DD-MM-YYYY') <= fec_fina \");\n queryInc.append(\" order by oid_peri asc \"); \n queryInc.append(\" ) x \"); \n queryInc.append(\" order by n \"); \n\n respuestaInc = bsInc.dbService.executeStaticQuery(queryInc.toString());\n \n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"******* respuestaInc \" + respuestaInc); \n\n } catch (Exception e) {\n UtilidadesLog.error(\"ERROR \", e);\n throw new MareException(e, UtilidadesError.armarCodigoError(\n CodigosError.ERROR_DE_LECTURA_EN_BASE_DE_DATOS));\n }\n\n BigDecimal bd;\n \n if (!respuestaInc.esVacio()) {\n\n Periodo periodo = new Periodo();\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"OID_PERI\");\n periodo.setOidPeriodo(new Long(bd.longValue()));\n \n periodo.setFechaDesde((Date) respuestaInc.getValueAt(0, \"FEC_INIC\"));\n\n periodo.setFechaHasta((Date) respuestaInc.getValueAt(0, \"FEC_FINA\")); \n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"PAIS_OID_PAIS\");\n periodo.setOidPais(new Long(bd.longValue()));\n \n bd = (BigDecimal) respuestaInc.getValueAt(0, \"MARC_OID_MARC\");\n periodo.setOidMarca(new Long(bd.longValue()));\n\n bd = (BigDecimal) respuestaInc.getValueAt(0, \"CANA_OID_CANA\");\n periodo.setOidCanal(new Long(bd.longValue()));\n \n clienteRecomendados.setPeriodo(periodo);\n } \n }\n }\n\n if(log.isDebugEnabled()) //sapaza -- cambio Optimizacion Logs -- 23/03/2010 \n UtilidadesLog.debug(\"lstRecomendados(\"+lstRecomendados.size() + \n \") getIndRecomendadosEnMAE(\"+clienteParametro.getIndRecomendadosEnMAE() +\n \") getIndRecomendadosEnINC(\"+clienteParametro.getIndRecomendadosEnINC() +\")\"); \n \n UtilidadesLog.info(\" DAOSolicitudes.obtenerClienteRecomendado(ClienteclienteParametro, Long oidPais):Salida\"); \n \n }",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\twhile(true)\n\t\t\t\t{\n\t\t\t\t\tfor(int i =0 ; i< secuencia.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\tGdeMonitor.dispararTransicion(secuencia[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"public int getminutoStamina(){\n return tiempoReal;\n }",
"public static void dormir(long milis)\r\n\t{\r\n\t\tlong inicial=System.currentTimeMillis();\r\n\t\twhile(System.currentTimeMillis()-inicial < milis) {/*Esperar a que pase el tiempo*/}\r\n\t}",
"@Override\r\n\tpublic void emettreOffre() {\n\t\t\r\n\t}"
] |
[
"0.63832307",
"0.63127875",
"0.62983334",
"0.61128926",
"0.60038525",
"0.58018047",
"0.5769803",
"0.5703128",
"0.5699626",
"0.5646374",
"0.56409895",
"0.5578508",
"0.55530596",
"0.5545556",
"0.5539091",
"0.55332804",
"0.55303955",
"0.55261093",
"0.55257964",
"0.55206776",
"0.5494629",
"0.54888535",
"0.54683447",
"0.5467929",
"0.5457103",
"0.54533875",
"0.5426972",
"0.54091907",
"0.540401",
"0.54027116",
"0.5401093",
"0.53925484",
"0.5390503",
"0.53875583",
"0.53856266",
"0.53842676",
"0.5381457",
"0.53793436",
"0.5378405",
"0.5366087",
"0.53635436",
"0.5353395",
"0.5348022",
"0.5342151",
"0.5334931",
"0.5329206",
"0.53263974",
"0.531697",
"0.53104985",
"0.5310153",
"0.53057027",
"0.53044933",
"0.52990526",
"0.5296456",
"0.5291879",
"0.5291566",
"0.5289289",
"0.528489",
"0.5279624",
"0.5279379",
"0.5274872",
"0.52741057",
"0.5268663",
"0.5266655",
"0.52607125",
"0.52570915",
"0.5255312",
"0.52478856",
"0.52456784",
"0.5240542",
"0.5239526",
"0.5239522",
"0.5235872",
"0.523564",
"0.52323115",
"0.5231559",
"0.52313894",
"0.523074",
"0.5230648",
"0.5228433",
"0.52276605",
"0.5225225",
"0.5222894",
"0.52095306",
"0.52095306",
"0.52084017",
"0.52071124",
"0.5194585",
"0.51939666",
"0.5190619",
"0.5190619",
"0.5189509",
"0.51745826",
"0.51695913",
"0.51691806",
"0.5164836",
"0.51639086",
"0.5162949",
"0.51625097",
"0.5159934",
"0.5159437"
] |
0.0
|
-1
|
elimina pedido de la orden
|
public void removeFromOrder(String dishToRemove){
Order.remove(dishToRemove);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void eliminarPedido(UUID idPedido);",
"void eliminarPedidosUsuario(String idUsuario);",
"public void eliminar(DetalleArmado detallearmado);",
"@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}",
"public void eliminarTripulante(Long id);",
"public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);",
"@Override\n\tpublic void delete(Pedido arg0) {\n\n\t}",
"public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }",
"@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}",
"@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}",
"public void eliminar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //eliminamos el Dia\n session.delete(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n }",
"public void eliminarUsuario(Long idUsuario);",
"public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }",
"@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }",
"@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }",
"void eliminar(Long id);",
"public void eliminar(Long id) throws AppException;",
"@Override\n\tpublic void eliminar(Seccion seccion) {\n\t\tentity.getTransaction().begin();\n\t\tentity.remove(seccion);\n\t\tentity.getTransaction().commit();\n\t}",
"@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}",
"@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}",
"public void eliminar(Provincia provincia) throws BusinessErrorHelper;",
"public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }",
"public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }",
"public void EliminarElmento(int el) throws Exception{\n if (!estVacia()) {\n if (inicio == fin && el == inicio.GetDato()) {\n inicio = fin = null;\n } else if (el == inicio.GetDato()) {\n inicio = inicio.GetSiguiente();\n } else {\n NodoDoble ante, temporal;\n ante = inicio;\n temporal = inicio.GetSiguiente();\n while (temporal != null && temporal.GetDato() != el) {\n ante = ante.GetSiguiente();\n temporal = temporal.GetSiguiente();\n }\n if (temporal != null) {\n ante.SetSiguiente(temporal.GetSiguiente());\n if (temporal == fin) {\n fin = ante;\n }\n }\n }\n }else{\n throw new Exception(\"No existen datos por borrar!!!\");\n }\n }",
"@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}",
"@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}",
"private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }",
"public void eliminar(Producto producto) throws IWDaoException;",
"public String eliminar()\r\n/* 88: */ {\r\n/* 89: */ try\r\n/* 90: */ {\r\n/* 91:101 */ this.servicioMotivoLlamadoAtencion.eliminar(this.motivoLlamadoAtencion);\r\n/* 92:102 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_eliminar\"));\r\n/* 93: */ }\r\n/* 94: */ catch (Exception e)\r\n/* 95: */ {\r\n/* 96:104 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_eliminar\"));\r\n/* 97:105 */ LOG.error(\"ERROR AL ELIMINAR DATOS\", e);\r\n/* 98: */ }\r\n/* 99:107 */ return \"\";\r\n/* 100: */ }",
"void eliminar(PK id);",
"public void eliminar(Periodo periodo)\r\n/* 27: */ {\r\n/* 28: 53 */ this.periodoDao.eliminar(periodo);\r\n/* 29: */ }",
"public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }",
"@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}",
"private void eliminar(HttpServletRequest request, HttpServletResponse response) {\n\t\n\t\ttry {\n\t\t\tString numero =request.getParameter(\"idCliente\");//leo parametro numeroHabitacion de la vista\n\t\t\t\n\t\t\t//llamo a un metodo del modelo para que elimine el editorial de la bd y consulto si se pudo eliminar\n\t\t\tif(modelo.eliminarCliente(numero) > 0) {\n\t\t\t\t\n\t\t\t\t//paso un atributo de exito si se pudo eliminar\n\t\t\t\trequest.setAttribute(\"exito\", \"Cliente eliminado exitosamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//paso un atributo de fracaso. \n\t\t\t\trequest.setAttribute(\"fracaso\", \"No se puede eliminar Cliente\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//redirecciono sin importar si se pudo o no eliminar\n\t\t\trequest.getRequestDispatcher(\"/clientes.do?op=listar\").forward(request, response);\n\t\t} catch (SQLException | ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}",
"public void eliminar(Short idEmpleado) {\n\t\tEmpleado empleado;\n\t\templeado = entityManager.find(Empleado.class, idEmpleado);\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.remove(empleado);\n\t\tentityManager.getTransaction().commit();\n\t\tJPAUtil.shutdown();\n\t}",
"public int eliminar(int pasoSolicitado ){\n if(tipoTraductor.equals(\"Ascendente\"))\n eliminarAsc(pasoSolicitado);\n else \n eliminarDesc(pasoSolicitado);\n cadena.actualizarCadena(pasoSolicitado);\n contador=pasoSolicitado;\n return contador-1;\n }",
"public void deleteProveedor (Long id_proveedor){\n proveedorPersistence.delete(id_proveedor);\n }",
"public void eliminar(Producto producto) throws BusinessErrorHelper;",
"public void eliminar(Procedimiento procedimiento) {\n IProcedimientoDao dao = new ProcedimientoDaoImpl();\n dao.eliminarProcedimiento(procedimiento);\n }",
"public void sepulsaeliminar(View view) {\n\t\tif(posicionArrayList !=-1) {\n\t\t\tarrayList.get(posicionArrayList);\n\n\t\t\tfinal DatabaseReference referenciaUseraBorrar=FirebaseDatabase.getInstance().getReference(\"users\").child(arrayList.get(posicionArrayList));\n\n\t\t\treferenciaUseraBorrar.removeValue(); //Elimina el campo del User de la BD\n\t\t\tarrayList.remove(posicionArrayList); //Elimina la posición correspondiente del ArrayList\n\t\t\tarrayAdapter.notifyDataSetChanged(); //Función que actualiza el arrayAdapter y lo dibuja de nuevo.\n\t\t\tToast.makeText(getApplicationContext(),\"Usuario Cuidador eliminado\",Toast.LENGTH_LONG).show();\n\n\t\t}else{\n\t\t\tToast.makeText(getApplicationContext(),\"No se ha seleccionado ningún elemento\",Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"public void eliminar() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n clientefacadelocal.remove(userFound);\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.getExternalContext().redirect(\"../index.xhtml\");\n System.out.println(\"Usuario Eliminado\");\n } else {\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n System.out.println(\"Error al eliminar el cliente \" + e);\n }\n }",
"public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }",
"public void delUtente(int id);",
"@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}",
"public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }",
"@Override\n public void deletePartida(String idPartida) {\n template.opsForHash().delete(idPartida, \"jugador1\");\n template.opsForHash().delete(idPartida, \"jugador2\");\n template.opsForSet().remove(\"partidas\",idPartida);\n }",
"@Override\n public boolean eliminar(ModelCliente cliente) {\n strSql = \"DELETE CLIENTE WHERE ID_CLIENTE = \" + cliente.getIdCliente();\n \n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }",
"public void eliminarEntidad(E entidad) {\n logger.debug(\"Eliminando la entidad: [\" + clasePersistente + \"]\" + entidad);\n getSesion().delete(entidad);\n }",
"private void remover() {\n int confirma = JOptionPane.showConfirmDialog(null, \"Tem certeza que deseja remover este cliente\", \"Atenção\", JOptionPane.YES_NO_OPTION);\n if (confirma == JOptionPane.YES_OPTION) {\n String sql = \"delete from empresa where id=?\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpId.getText());\n int apagado = pst.executeUpdate();\n if (apagado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa removida com sucesso!\");\n txtEmpId.setText(null);\n txtEmpNome.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }",
"@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}",
"@Override\n\tpublic void eliminar(int id) {\n\t\tdao.deleteById(id);;\n\t}",
"public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}",
"public void eliminar(TipoDocumento tpDocu) {\n try {\n boolean verificarReLaboraldEnTpDocu = servReLaboral.buscarRegistroPorTpDocumento(tpDocu);\n if (verificarReLaboraldEnTpDocu) {\n MensajesFaces.informacion(\"No se puede eliminar\", \"Existen Datos Relacionados\");\n } else {\n servtpDocumento.eliminarTipoDocumento(tpDocu);\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Eliminado\", \"Exitoso\");\n }\n } catch (Exception e) {\n MensajesFaces.advertencia(\"Error al eliminar\", \"detalle\" + e);\n }\n }",
"private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }",
"@Override\n\tpublic void remover(int idServico) throws SQLException {\n\t\t\n\t}",
"public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }",
"@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}",
"public void eliminar(Maquina maquina)\r\n/* 24: */ {\r\n/* 25: 52 */ this.maquinaDao.eliminar(maquina);\r\n/* 26: */ }",
"public void eliminaEdificio() {\n this.edificio = null;\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }",
"public void eliminarCajeros(int id);",
"@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}",
"public void deleteUsuario (int id);",
"@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}",
"public void eliminarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdGrado(17);\n \tString respuesta = negocio.eliminarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }",
"public void eliminarIntemediaPersonaMovilidad(Movilidad mov){\n try{\n String query = \"DELETE FROM PERSONA_MOVILIDAD WHERE ID_MOVILIDAD = \"+ mov.getIdMovilidad();\n Query q = getSessionFactory().getCurrentSession().createSQLQuery(query);\n q.executeUpdate();\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}",
"@Override\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino el usuario de la bd\");\n\t}",
"public void eliminar(int id) {\n\t\tvacantesrepo.deleteById(id);\n\t}",
"public void deleteTbagendamento() {\n\n if (agendamentoLogic.removeTbagendamento(tbagendamentoSelected)) {\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento removido com sucesso.\");\n listTbagendamentos = agendamentoLogic.findAllTbagendamentoFromCurrentDay();\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falha ao remover agendamento.\");\n }\n\n }",
"public void delete(Long alojamientosId) {\n LOGGER.log(Level.INFO, \"Eliminar el alojamiento con id = {0}\", alojamientosId);\n AlojamientoEntity alojamientoEntity = em.find(AlojamientoEntity.class, alojamientosId);\n em.remove(alojamientoEntity);\n LOGGER.log(Level.INFO, \"Terminando de eliminar el alojamiento con id = {0}\", alojamientosId);\n }",
"public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }",
"@Override\n\tpublic boolean eliminarPorId(Integer llave) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void eliminar() {\n\t\t\n\t}",
"@Override\n\tpublic void quitar(Alumno alumno) {\n\t\tcomision.remove(alumno);\n\t}",
"@Override\n public void elimina(int id_alumno) {\n\n try {\n Alumno a = admin.alumnosTotales.get(id_alumno);\n int area = a.area;\n char grupo = a.grupo;\n\n admin.fisicoMatematicas.remove(a);\n admin.biologicasYsalud.remove(a);\n admin.cienciasSociales.remove(a);\n admin.humanidadesYartes.remove(a);\n admin.fotoLabPrensa.remove(a);\n admin.viajesyhoteleria.remove(a);\n admin.nutriologo.remove(a);\n admin.labQuimico.remove(a);\n\n Iterador<Profesor> ite = new Iterador<>(admin.profesores);\n\n while (ite.hasNext()) {\n Profesor profeActual = ite.next();\n if (profeActual.area == area & profeActual.grupo == grupo) {\n profeActual.eliminaAlumnoLista(a);\n }\n }\n \n admin.alumnosTotales.remove(id_alumno);\n \n } catch (NullPointerException e) {\n System.out.println(\"No existe el Alumno\");\n }\n \n \n\n }",
"@Override\n\tpublic void eliminar() {\n\n\t}",
"public void deleteDetalleNominaEmpleado(DetalleNominaEmpleado entity)\n throws Exception;",
"public void eliminarMensaje(InfoMensaje m) throws Exception;",
"@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}",
"public void eliminarUsuario(String id) throws BLException;",
"@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;",
"public void eliminarTermino() {\n System.out.println(\"......................\");\n System.out.println(\"Eliminar Termino Academico\");\n int i = 1;\n Entrada entrada = new Entrada();\n for (Termino t : Termino.terminos) {\n System.out.println(i + \". \" + t);\n i++;\n }\n if (i != 1) {\n int opc;\n do {\n opc = entrada.Entera(\"Ingrese opcion(1-\" + (i - 1) + \"): \");\n if (!(opc >= 1 && opc <= (i - 1))) {\n System.out.println(\"opcion no valida\");\n }\n } while (!(opc >= 1 && opc <= (i - 1)));\n Termino.terminos.remove(opc - 1);\n System.out.println(\"Termino Eliminado\");\n } else {\n System.out.println(\"No existen terminos\");\n }\n }",
"@Override\r\n public void removerQuestaoDiscursiva(long id) throws Exception {\n rnQuestaoDiscursiva.remover(id);\r\n\r\n }",
"public void eliminarPaciente(String codigo)\n {\n try\n {\n int rows_update=0;\n PreparedStatement pstm=con.conexion.prepareStatement(\"DELETE paciente.* FROM paciente WHERE IdPaciente='\"+codigo+\"'\");\n rows_update=pstm.executeUpdate();\n \n if (rows_update==1)\n {\n JOptionPane.showMessageDialog(null,\"Registro eliminado exitosamente\");\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"No se pudo eliminar el registro, verifique datos\");\n con.desconectar();\n }\n }\n catch (SQLException e)\n {\n JOptionPane.showMessageDialog(null,\"Error \"+e.getMessage()); \n }\n }",
"public RespuestaBD eliminarRegistro(int codigoFlujo, int secuencia) {\n/* 296 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 299 */ String s = \"delete from wkf_detalle where codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* 304 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 306 */ catch (Exception e) {\n/* 307 */ e.printStackTrace();\n/* 308 */ Utilidades.writeError(\"FlujoDetalleDAO:eliminarRegistro \", e);\n/* 309 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 311 */ return rta;\n/* */ }",
"public void delete(Long viajerosId) {\n LOGGER.log(Level.INFO, \"Borrando viajero con id = {0}\", viajerosId);\n ViajeroEntity viajero = em.find(ViajeroEntity.class, viajerosId);\n em.remove(viajero);\n }",
"public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}",
"@Override\n\t@Transactional\n\tpublic int eliminarSgAgenteOpcion(SgAgenteOpcion objSgAgenteOpcion) {\n\t\ttry {\n\t\t\t\n\t\t\tsgAgenteOpcionDao.delete(objSgAgenteOpcion);\n\t\t\t\n\t\t\treturn 1;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t}\n\t}",
"@Override\n\tpublic void remover(Agendamento agendamento) {\n\t\t\n\t}",
"public void deleteIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENTDEL);\r\n\t\t\t\r\n\t\t\tpstmt.setString(1, i.getGiocatore());\r\n\t\t\tpstmt.setInt(2, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}",
"public void eliminar (String idSalida) {\r\n String query = \"UPDATE actividad SET eliminar = true WHERE id_salida = \\\"\" + idSalida + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad eliminada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}",
"public void deleteByVaiTroID(long vaiTroId);",
"public void deleteFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);",
"@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}",
"@Override\n\tpublic boolean eliminar(Connection connection, Object DetalleSolicitud) {\n\t\tString query = \"DELETE FROM detallesolicitudes WHERE sysPK = ?\";\n\t\ttry {\t\n\t\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement) connection.prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, detalleSolicitud.getSysPk());\n\t\t\tpreparedStatement.execute();\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\tNotificacion.dialogoException(e);\n\t\t\treturn false;\n\t\t}//FIN TRY/CATCH\t\n\t}",
"public void deleteUsuario(Usuario usuario) {\n\t\t\n\t}",
"public void atenderPedidoDelCliente(PedidoIndividual pedido) throws QRocksException;",
"@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}"
] |
[
"0.80670047",
"0.76586443",
"0.7456662",
"0.7452721",
"0.735803",
"0.73292035",
"0.73265916",
"0.72512764",
"0.724366",
"0.7243134",
"0.72107387",
"0.71972495",
"0.7119827",
"0.7075104",
"0.70672",
"0.7063709",
"0.70579493",
"0.70560956",
"0.70514154",
"0.70514154",
"0.70460296",
"0.7045289",
"0.7038725",
"0.7037044",
"0.7036417",
"0.7014037",
"0.70134914",
"0.7011969",
"0.7011917",
"0.6959356",
"0.69437695",
"0.6928542",
"0.6927137",
"0.69264203",
"0.69233155",
"0.6922338",
"0.69179153",
"0.6917242",
"0.69052714",
"0.6893764",
"0.6885963",
"0.68711305",
"0.68708897",
"0.6861592",
"0.68599856",
"0.68520385",
"0.68503445",
"0.6842086",
"0.68349695",
"0.68320626",
"0.6830008",
"0.6825702",
"0.68230146",
"0.6821835",
"0.6807359",
"0.6803516",
"0.6796623",
"0.6795306",
"0.677739",
"0.6775618",
"0.6761113",
"0.67583185",
"0.6758116",
"0.6756074",
"0.6752551",
"0.67505676",
"0.67421806",
"0.67313296",
"0.6730406",
"0.6725735",
"0.6724226",
"0.6722021",
"0.6720703",
"0.67178464",
"0.6713536",
"0.67122936",
"0.67087066",
"0.6707188",
"0.6701811",
"0.6701589",
"0.6700077",
"0.6699439",
"0.6698646",
"0.6697427",
"0.669724",
"0.66926634",
"0.6682126",
"0.6673015",
"0.66607887",
"0.66571313",
"0.66559464",
"0.66506314",
"0.6641862",
"0.66401196",
"0.6640028",
"0.6638588",
"0.663708",
"0.66356266",
"0.66342956",
"0.66328084",
"0.663275"
] |
0.0
|
-1
|
Spring Data repository for the ContentDoc entity.
|
@SuppressWarnings("unused")
@Repository
public interface ContentDocRepository extends JpaRepository<ContentDoc, Long> {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface ContentRepository {\n\n List<Content> findContentList(int bbsId, int pageNum, int perPage, int searchMode, String searchContent);\n\n long findContentCount(int bbsId, int searchMode, String searchContent);\n\n void saveContent(Content content);\n\n Content findContentById(int contentId);\n\n void updateContent(Content content);\n\n void deleteContent(int contentId, String userid);\n\n List<Content> getBbsNoticeThumnailList(int bbsId);\n\n}",
"public interface DocumentDao extends CrudRepository<Document, Long> {\n\n public Document findById(long id);\n public Document findByTitle(String title);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DocumentRepository extends JpaRepository<Document, Long> {\n\n\tList<Document> findAllByTypeDocument(TypeDocument type);\n\n}",
"@Repository\npublic interface TbContentDao extends BaseDao<TbContent> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DocRepository extends JpaRepository<Doc, Long> {\n\n}",
"public interface NoteTagRepository extends MyRepository<NoteTag, Long> {\n\n NoteTag findByContent(String content);\n\n}",
"public interface ContentSearchRepository extends ElasticsearchRepository<Content, Long> {\n}",
"public interface DocumentParameterRepository extends JpaRepository<DocumentParameterEntity, Long> {\n}",
"@Repository\npublic interface ArticlePictureRepository extends JpaRepository<ArticlePicture, Long> {\n}",
"@Repository\npublic interface DBFileRepository extends JpaRepository<DBFile, Long> {\n\n}",
"public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}",
"public interface DocumentService {\n /**\n * 查找\n *\n * @return\n */\n DocumentPo findOne(Long id);\n\n DocumentPo findByUuid(String uuid);\n /**\n * 查找\n *\n * @return\n */\n List<DocumentPo> findAll();\n\n /**\n * 新增/更新\n *\n * @param documentPo\n * @return\n */\n DocumentPo save(DocumentPo documentPo);\n /**\n * 删除\n *\n * @param id\n */\n void delete(Long id);\n}",
"@Repository\npublic interface EditorRepository extends JpaRepository<Editor, Long> {\n}",
"public interface SensitiveWordRepository extends MyRepository<SensitiveWord,Long> {\n\n SensitiveWord findByContent(String content);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface EmEmpDocumentsRepository extends JpaRepository<EmEmpDocuments, Long> {\n List<EmEmpDocuments> findByIdEmployeeId(long id);\n}",
"public Iterable<Content> findAllContent(){\n\n return contentRepository.findAll();\n }",
"public interface AttachmentRepository extends JpaRepository<Attachment,Long> {\n}",
"public interface NewsImageRepo extends CrudRepository<NewsImages, Long> {\n}",
"public interface CommentRepository extends JpaRepository<Comment, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ContractDocumentEntryRowRepository extends JpaRepository<ContractDocumentEntryRow, Long> {\n\n}",
"public interface AuthorRepository extends CrudRepository<Author, Long> {\n}",
"public interface AuthorRepository extends CrudRepository<Author,Long> {\n}",
"public interface AuthorRepository extends CrudRepository<Author,Long> {\n}",
"public interface ContactRepository extends JpaRepository<Contact, Long> {\n\n}",
"public interface AttachmentRepo extends CrudRepository<Attachment,Long> {\n}",
"@Repository\npublic interface ContactRepository extends JpaRepository<Contact, Long> {\n}",
"public interface MediaFolderRepository extends CrudRepository<MediaFolder, Integer> {\n\n}",
"public interface OfficeRepository extends MongoRepository<OfficeFile, String> {\n\n}",
"public List<IDoc> getDocs();",
"public List<IDoc> getDocs();",
"public interface FilesDAO extends CrudRepository<Files,Long> {\n}",
"@Repository\npublic interface WebsiteRepository extends JpaRepository<WebsiteEntity, Long> { }",
"public interface FileDetailRepository extends CrudRepository<FileDetail, Long> {\n\n}",
"public interface ContactRepository extends MongoRepository<Contact, String> {\n}",
"public interface CommentRepository extends CrudRepository<Comment, Integer> {\n List<Comment> getByPostId(int postId);\n\n}",
"public interface ArticleRepository extends MongoRepository<Article, String> {\n}",
"public interface TResourceContentCache extends LeCrudRepository<TResourceContent, Long> {\r\n}",
"@Repository\npublic interface ContactInformationDAO extends JpaRepository<Contact, Long> {\n\n}",
"public interface TopicRepository extends CrudRepository<Topic, String> {\n\n}",
"@Repository\npublic interface ModelRepository extends JpaRepository<Citire, Long>{\n}",
"public interface LinkRepository extends MongoRepository<Link, String>\n{\n Link findOneByLink(String link);\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CommunityMediaRepository extends JpaRepository<CommunityMedia, Long> {\n\n}",
"@Repository\r\npublic interface TbContentCategoryDao extends BaseTreeDao<TbContentCategory> {\r\n\r\n}",
"public interface JournalEntryRepository extends MongoRepository<JournalEntry, String> {\n\n List<JournalEntry> findByTitleLike(String word);\n\n}",
"public interface DocumentManager extends Manager {\n\n /* Document related properties */\n public static final String DOCUMENT_THUMBNAIL_PROPERTY = \"dell.document.thumbnail\";\n\n /**\n * Method to retrieve the the Document objects list\n *\n * @return - List of Document's\n */\n Collection<Document> getDocuments();\n\n\n /**\n * Method to retrieve the list of Document's using retailer siteID\n *\n * @param retailerSiteID\n * @return -Return the list of Document's with matching siteID\n * @see com.dell.acs.persistence.domain.RetailerSite\n */\n @Deprecated\n Collection<Document> getDocumentByRetailerSiteID(Long retailerSiteID);\n\n // Library page helper method\n @Deprecated\n Collection<Document> getLatestDocuments(Long retailerSiteID);\n\n public boolean doesDocumentExists(Document document);\n /* Document management related methods */\n\n\n /**\n * Method to persist the Document object\n *\n * @return - Return the document object\n */\n Document saveDocument(Document document) throws EntityExistsException;\n\n /**\n * Method to load the Document by ID\n *\n * @param documentID - Document ID\n * @return - Document object with ID = documentID\n */\n Document getDocument(Long documentID) throws EntityNotFoundException;\n\n /**\n * Method to delete a Document object by ID\n *\n * @param documentID - Document ID\n */\n void deleteDocument(Long documentID) throws EntityNotFoundException;\n\n /**\n * Method to get the BASECDN path for Document\n *\n * @param document\n * @return\n */\n String getBaseCDNPathForDocument(Document document);\n\n /**\n * To get the filtered documents.\n *\n * @param paramsMap\n * @return\n */\n List<Map<String, String>> getFilteredDocuments(Map<String, Object> paramsMap);\n\n\n // <======= New methods introduced in sprint 4 =======>\n\n /**\n Retrieve the published document.\n @param documentId, store the document id.\n @param type , store the document type.\n @return published document name.\n */\n @Deprecated\n String getDocumentNameByID(Long documentId,Integer type);\n\n /**\n Check the name existence , so that duplicate entry not allowed.\n It checks during ajax call.\n @param documentName , store the document name.\n @return boolean status , according to existence status.\n @throws NonUniqueResultException\n */\n @Deprecated\n boolean checkNameExistence(String documentName) throws NonUniqueResultException;\n\n /**\n * Method to load the Document by ID and type.\n *\n * @param documentID - Long - document ID\n * @return - Document object with ID = documentID\n * @throws - EntityNotFoundException - if document with given ID and type is not found.\n */\n Document getDocument(Long documentID, Integer type) throws EntityNotFoundException;\n\n /**\n * retrieve the documents on the basis of RetailerSite and source Type.\n *\n * @param retailerSiteID - Long - retailer site ID\n * @param type - Integer - Refer {@link com.dell.acs.content.EntityConstants}\n * @return Collection of {@link Document}\n */\n Collection<Document> getDocuments(Long retailerSiteID, Integer type, ServiceFilterBean filterBean);\n\n /**\n * retrieve the documents on the basis of RetailerSite Name and source Type.\n *\n * @param retailerSiteName - String - retailer site name\n * @param type - Integer - Refer {@link com.dell.acs.content.EntityConstants}\n * @return Collection of {@link}\n */\n Collection<Document> getDocuments(String retailerSiteName, Integer type, ServiceFilterBean filterBean);\n\n\n}",
"@Repository\npublic interface BiologicalEntityRepository extends MongoRepository<BiologicalEntity, String> {\n}",
"public interface PublisherRepository extends CrudRepository <Publisher, Long> {\n\n}",
"@SuppressWarnings(value = \"all\")\npublic interface ContentService {\n /**\n * 参数列表:TbContent content\n * 返回值类型:TaotaoResult\n * @param content\n * @return TaotaoResult\n */\n TaotaoResult addContent(TbContent content);\n\n /**\n * 返回值类型:List<TbContent>\n * 参数列表:long categoryId\n */\n List<TbContent> getContentList(long categoryId);\n\n /**\n * 展示内容\n * @param categoryId\n * @param page\n * @param rows\n * @return EasyUIDataGridResult\n */\n EasyUIDataGridResult showContentList(long categoryId, Integer page, Integer rows);\n\n /**\n * 修改内容\n * @param content\n * @return TaotaoResult\n */\n TaotaoResult editContent(TbContent content);\n\n /**\n * 删除所选内容\n * @param ids\n */\n void deleteContentByIds(long ids);\n}",
"public interface FileRepository extends MongoRepository<FileModel,String> {\n}",
"public interface ItemRepository extends CrudRepository<Item, Integer> {\n\n Iterable<Item> findByDescription(String description);\n}",
"@Repository(\"contentMapper\")\npublic interface ContentMapper extends Mapper<Content>{\n\n}",
"void process(Document document, Repository repository) throws Exception;",
"@Repository\npublic interface AlliesRepository extends CrudRepository<AlliesDO, Long> {\n\n}",
"@RepositoryRestResource\npublic interface WebsiteRepository extends JpaRepository<WebsiteEntity, Long> {\n\n}",
"@Repository\npublic interface BookRepository extends JpaRepository<Book, Long> {\n\n}",
"@Repository\npublic interface MongoParserRepository extends MongoRepository<DocumentParserResult,String> {\n}",
"public interface TopicRepository extends CrudRepository<Topic,Integer> {\n}",
"public interface ContentService {\n /**\n * 添加内容\n * @param content\n * @return\n */\n TaotaoResult addContent(TbContent content);\n\n /**\n * 根据id查询内容\n * @param cid\n * @return\n */\n List<TbContent> getContentListByCid(long cid);\n}",
"public interface CaptionsRepository extends JpaRepository<Captions,Long> {\n\n}",
"@Repository\npublic interface CourseRepository extends CrudRepository<Course, String> {\n\n\tpublic List<Course> findByTopicId(String topicId);\n}",
"public interface DocumentContentFactory {\n\n /**\n * Creates a DocumentContent object for given byte array\n * @param bytes Input byte array - file content\n * @return DocumentContent object\n */\n DocumentContent createDocumentContent(byte[] bytes);\n}",
"public interface ContentService {\n\n //前面四个方法都是后台的内容查询\n int add(Content content);\n\n PageInfo<Content> list(int categoryId, int page, int rows);\n\n int edit(Content content);\n\n int delete(String ids);\n\n //商城首页的大广告位查询\n // List<Content> selectByCategoryId(long cid);\n //缓存的写法\n String selectByCategoryId(long cid);\n\n}",
"public interface FormDataRepository extends CrudRepository<FormData, Integer> {}",
"public interface PostRepository extends CrudRepository<Post, Long> {\n}",
"UserContent findContentById(@Param(\"contentUid\") long contentUid);",
"public interface DocumentDao {\n public List<Document> getAll();\n\n Document save(String id, Document document);\n\n public Document findById(String documentId);\n\n Document removeById(String id);\n\n void save(Document document);\n}",
"public interface BlogRepository extends JpaRepository<Blog, Integer> {\n\n List<Blog> findByUser(User user);\n}",
"public interface NoteRepository extends JpaRepository<Note, Integer> {\n\n}",
"public interface ContentSumService {\n\n /**\n * Save a contentSum.\n *\n * @param contentSum the entity to save\n * @return the persisted entity\n */\n ContentSum save(ContentSum contentSum);\n\n /**\n * Get all the contentSums.\n *\n * @return the list of entities\n */\n List<ContentSum> findAll();\n\n /**\n * Get the \"id\" contentSum.\n *\n * @param id the id of the entity\n * @return the entity\n */\n ContentSum findOne(Long id);\n\n /**\n * Delete the \"id\" contentSum.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n boolean addContentSum(Long contetId, ContentSumType contentSumType, String profileId);\n\n Map<Long, ContentSum> queryContentSumByids(Set<Long> contentIds);\n}",
"public interface ResumeRepository extends MongoRepository<Personal, String> {\n}",
"public interface DocumentService {\n Document create(Long userId, Document document);\n\n Document update(Long userId, Document document);\n\n Page<Document> findAll(Long userId, Integer documentType, RestPageRequest pageRequest);\n\n Page<Document> findAll(Long userId, Long parentId, Integer documentType, RestPageRequest pageRequest);\n\n Page<Document> findAll(Long userId, Long businessPartnerId, Integer businessPartnerType, Integer documentType, RestPageRequest pageRequest);\n\n List<Document> getAll(Long userId, Integer documentType);\n\n Document findOne(Long userId, Integer documentType, Long recordId);\n\n Document findOne(Long userId, Long recordId);\n\n Document findByDocNumber(Long userId, Integer documentType, String docNumber);\n\n Document findByOrderRefNumber(Long userId, Integer documentType, String orderRefNumber);\n\n Document findByDocNumber(Long userId, Integer documentType, Integer childDocumentType, String docNumber);\n\n void updateAmounts(Double totalTax, Double amountWithoutTax, Double totalAll, Integer quantity, Long userId, Long documentId);\n\n Double getBusinessPartnerBalance(Long userId, Long businessPartnerId);\n\n Double getDocumentAmount(Long userId, Long documentId);\n\n Double getAmountByDocumentByBusinessPartner(Long userId, Long businessPartnerId, Integer documentType, Integer childDocumentType);\n\n Double getInvoicePaymentsTotal(Long userId, Long businessPartnerId, Integer documentType, Integer childDocumentType, Long parentId);\n\n void updateDocumentBalance(Long userId, Long documentId);\n\n Double getSumByTenant(Long userId, Integer documentType, Integer status);\n\n Double getSumByTenantByDate(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate);\n\n Integer getQuantityByTenantByDate(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate);\n\n Double getSumByTenantByDateByBusinessUnit(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate,Long businessUnitId);\n\n Integer getQuantityByTenantByDateByBusinessUnit(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate,Long businessUnitId);\n\n Long countByTenant(Long userId, Integer documentType, Integer status);\n}",
"public List<Content> getAllContents() {\n return contentRepo.findAll();\n }",
"public interface DokumentasiService {\n Dokumentasi findById(Long id);\n\n Long countAlls();\n\n Long countPublished();\n\n List<Dokumentasi> get(Long start, Long count);\n\n List<Dokumentasi> getPublished(Long start, Long rowPerPage);\n\n void saveTitlePicture(Long galleryId, java.io.InputStream is) throws IOException;\n\n// InputStream getTitlePictureStream(Long galleryId) throws IOException;\n\n Boolean hasTitlePicture(Long galleryId);\n\n void save(Dokumentasi gallery);\n\n void removeById(Long galleryId);\n\n void savePicture(DokumentasiPhoto picture, InputStream inputStream) throws IOException;\n\n void removePictureById(Long galleryPictureId);\n\n Long countByKeyword(String keyword);\n\n List<Dokumentasi> findAlls(Long start, Long count);\n\n List<Dokumentasi> findByKeyword(String keyword, Long start, Long count);\n\n void removeByIds(Long[] ids);\n\n void publishByIds(Long[] ids);\n\n void unpublishByIds(Long[] ids);\n\n void getResizedTitlePicture(Long id, Integer width, Integer height, OutputStream outputStream) throws IOException;\n}",
"public interface PdfBookMasterRepository {\n String savePdfMaster(InputStream inputStream,String fileName,Map<String,String> metadata);\n byte[] readPdfMaster(String id);\n boolean deletePdfMaster(String id);\n}",
"public DocumentController(String date, String content) {\n document = new DocumentSchema();\n document.setDocumentStr(content);\n document.setPublicationDate(date);\n document.setDocId(UUID.randomUUID().toString());\n }",
"@DBRepository\npublic interface ArticleDao {\n\n void save(Article article);\n\n void update(Article article);\n\n void incrReadTime(@Param(\"id\") int id);\n\n Article findById(@Param(\"id\") int id);\n\n List<Article> getPage(PageQuery page);\n\n int count();\n}",
"@Repository\npublic interface WallPostPhotoRepository extends JpaRepository<WallPostPhoto, Long> {\n}",
"public interface CommentDao extends JpaRepository<CommentPO , Long> , JpaSpecificationExecutor<CommentPO> {\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface DownloadFileRepository extends MongoRepository<DownloadFile, String> {\n\n}",
"@Component\npublic interface AdFieldRepository extends CrudRepository<AdField, Integer> {\n\n AdField findById(int id);\n\n}",
"public interface BibliographicEntitySearchRepository extends ElasticsearchRepository<BibliographicEntity, Long> {\n}",
"public interface WriteReadContentDAO\n extends ReadContentDAO {\n void putContent(EntryMetaData entry, String content);\n\n void deleteContent(EntryMetaData entry);\n\n void deleteAllContent(String workspace);\n\n void deleteAllContent(String workspace, String collection);\n\n void deleteAllRowsFromContent();\n}",
"public interface IDocumentaryService {\n\n public List<Documentary> getByOffset(int offset);\n\n public int getCount();\n\n public Documentary getById(String id);\n\n public int insert(Documentary doc);\n\n public int update(Documentary doc);\n\n public List<Documentary> search(String key);\n}",
"public interface CountersRepository extends CrudRepository<Counters, BigInteger> {\n Counters findFirstByDocumentId(Long id);\n}",
"public interface StoryworldRepository extends MongoRepository<Storyworld, String> {\n}",
"@Repository\n@Transactional\npublic interface JobDescRepository extends CrudRepository<JobDesc, String> {\n\n}",
"public interface AuthorRepository extends CustomJpaRepository<Author, Long> {\n\n\tpublic Author findByAuthorName(String authorName);\n\n\tpublic Set<Author> findByAuthorBooks_Book_Id(Long bookId);\n}",
"public interface PhotoRepository extends CrudRepository<Photo, UUID> {\n\n Photo findByFilename(String filename);\n}",
"@Repository\npublic interface TodoRepository extends MongoRepository<Todo, String>{\n\n}",
"public interface ImageRepository extends JpaRepository<Image, Long> {\n\n List<Image> findByUrl(String url);\n}",
"@Repository\npublic interface PhotoRepository extends JpaRepository<Photo,Long> {\n\n public List<Photo> findByProduct(Product product);\n}",
"@Repository\npublic interface RespostaRepository extends CrudRepository<Resposta, Long> {}",
"public abstract List<ClinicalDocument> findAllClinicalDocuments();",
"public interface RelatedDocumentSearchRepository extends ElasticsearchRepository<RelatedDocument, Long> {\n}",
"@Repository\r\npublic interface HaltestellenzuordnungRepository extends CrudRepository<Haltestellenzuordnung, Long> {\r\n\r\n /**\r\n * Gibt die Haltestellenzuordnungen zurück mit der übergebenen Fahrtstrecke\r\n * \r\n * @param fahrtstrecke\r\n * @return Iterable von Haltestellenzuordnungen\r\n */\r\n Iterable<Haltestellenzuordnung> findAllByFahrtstrecke(Fahrtstrecke fahrtstrecke);\r\n}",
"@GetMapping(\"/documents/{docId}\")\r\n\tpublic ResponseEntity<String> getById(@PathVariable(\"docId\") String docId) {\r\n\t\tif(!this.documentHandler.isDocumentExisting(docId)) {\r\n\t\t\treturn new ResponseEntity<String>(HttpStatus.NOT_FOUND);\r\n\t\t}\r\n\t\tString content = this.documentHandler.getById(docId);\r\n\t\tHttpHeaders headers = new HttpHeaders();\r\n\t\theaders.setContentLength(content.length());\r\n\t\treturn new ResponseEntity<String>(content, headers, HttpStatus.OK);\r\n\t}",
"@Repository\npublic interface BookGroupDao extends JpaRepository<BookGroup, Long> {\n List<BookGroup> findByTitle(String title);\n}",
"@Repository\npublic interface ProductRepo extends CrudRepository<Product, String> {\n\n @Override\n Product save(Product product);\n\n @Override\n List<Product> findAll();\n\n Product findByTitle(String title);\n}",
"@OneToMany(mappedBy = \"folder\")\n public List<CharmsDocument> getDocuments() {\n return documents;\n }",
"public interface PackagesRepository extends JpaRepository<Packages,Long> {\n\n}"
] |
[
"0.68162155",
"0.68016297",
"0.65811175",
"0.64078146",
"0.6300092",
"0.62124676",
"0.61457574",
"0.60417014",
"0.5922109",
"0.5921969",
"0.5855446",
"0.58352035",
"0.58228815",
"0.58164954",
"0.58134574",
"0.5808389",
"0.5801127",
"0.57918406",
"0.57821983",
"0.57272744",
"0.56986415",
"0.5683435",
"0.5683435",
"0.5678664",
"0.56781185",
"0.56658924",
"0.5664595",
"0.564291",
"0.5632461",
"0.5632461",
"0.5623248",
"0.56100214",
"0.5601676",
"0.55980426",
"0.5594548",
"0.5592119",
"0.55842096",
"0.5582077",
"0.5570397",
"0.55580103",
"0.5553389",
"0.55441064",
"0.5540905",
"0.5536177",
"0.5535887",
"0.5532175",
"0.5519945",
"0.55192393",
"0.5517431",
"0.551218",
"0.5499879",
"0.54985744",
"0.5495114",
"0.5494847",
"0.5490232",
"0.5489833",
"0.5483361",
"0.54734063",
"0.54677665",
"0.5467259",
"0.5463395",
"0.54616326",
"0.5457939",
"0.54575884",
"0.545734",
"0.5455552",
"0.5445026",
"0.5435951",
"0.5435736",
"0.5419893",
"0.5419022",
"0.54173833",
"0.5417201",
"0.5411596",
"0.54089785",
"0.54063034",
"0.54015815",
"0.5393808",
"0.53905916",
"0.53875357",
"0.5382019",
"0.5381702",
"0.53728753",
"0.5366108",
"0.53603035",
"0.535192",
"0.5346983",
"0.5342637",
"0.53324634",
"0.5332451",
"0.53272814",
"0.53250587",
"0.5322528",
"0.5318473",
"0.5313837",
"0.530657",
"0.53064626",
"0.53002566",
"0.5296714",
"0.5294861"
] |
0.7292562
|
0
|
Answer an instance for the following arguments
|
public StackAndQueueChallengesTest() {
super();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"protected Answer(){\r\n\t\t\r\n\t}",
"Reproducible newInstance();",
"Object instantiate(Map<String, Object> arguments);",
"Instance createInstance();",
"T newInstance(Object... args);",
"public LyricAnswer() {\n }",
"public Answer() {\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public static void main(String[] args) {\n Template robert = new ConcreteAnswer(\"Robert\");\r\n robert.question();\r\n }",
"abstract Object build();",
"protected abstract String answer();",
"public abstract Intent constructResults();",
"public Answers()\r\n {\r\n \r\n }",
"void run(AnswerType parameter);",
"private void createIAnswerInterface(final Environment result,\n\t\t\tEnvironment extEnv)\n\t{\n\n\t\tList<String> genericArguments = new LinkedList<String>();\n\t\tgenericArguments.add(\"A\");\n\t\tString name = \"Answer\";\n\t\tString tag = result.TAG_IAnswer;\n\t\tMethodFactory extMf = new MethodFactory()\n\t\t{\n\n\t\t\t// @Override\n\t\t\t// public void updateApplyMethod(IClassDefinition cdef,\n\t\t\t// String newAnalysisName) {\n\t\t\t// AnswerAcceptMethod aam = findMethodType(\n\t\t\t// AnswerAcceptMethod.class, cdef);\n\t\t\t// if (aam != null)\n\t\t\t// aam.setPrivilegedBody(\"\\t\\treturn (A)((\"\n\t\t\t// + newAnalysisName\n\t\t\t// + \"<A>)caller).case\"\n\t\t\t// + AnalysisUtil.getCaseClass(result, cdef).getName()\n\t\t\t// .getName() + \"(this);\");\n\t\t\t// }\n\n\t\t\t@Override\n\t\t\tpublic Method createCaseMethod(IClassDefinition cdef)\n\t\t\t{\n\t\t\t\tAnswerAdaptorCaseMethod caseM = new AnswerAdaptorCaseMethod();\n\t\t\t\tcaseM.setClassDefinition(cdef);\n\t\t\t\treturn caseM;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Method createDefaultCaseMethod(IClassDefinition cdef)\n\t\t\t{\n\t\t\t\tAnswerAdaptorDefaultMethod aadm = new AnswerAdaptorDefaultMethod();\n\t\t\t\taadm.setClassDefinition(cdef);\n\t\t\t\treturn aadm;\n\t\t\t}\n\t\t};\n\t\tcreateAnalysisInterface(genericArguments, name, tag, extMf, extEnv, result, base);\n\t}",
"private static abstract class <init> extends com.google.android.gms.games.hodImpl\n{\n\n public com.google.android.gms.games.quest.Result zzau(Status status)\n {\n return new com.google.android.gms.games.quest.Quests.ClaimMilestoneResult(status) {\n\n final Status zzQs;\n final QuestsImpl.ClaimImpl zzavH;\n\n public Milestone getMilestone()\n {\n return null;\n }\n\n public Quest getQuest()\n {\n return null;\n }\n\n public Status getStatus()\n {\n return zzQs;\n }\n\n \n {\n zzavH = QuestsImpl.ClaimImpl.this;\n zzQs = status;\n super();\n }\n };\n }",
"protected abstract void construct();",
"abstract T build();",
"For createFor();",
"private Instantiation(){}",
"public AttemptAnswer() {\n }",
"private static abstract class <init> extends com.google.android.gms.games.dMatchesImpl\n{\n\n public com.google.android.gms.games.multiplayer.turnbased.Q V(Status status)\n {\n return new com.google.android.gms.games.multiplayer.turnbased.TurnBasedMultiplayer.LoadMatchesResult(status) {\n\n final TurnBasedMultiplayerImpl.LoadMatchesImpl Ln;\n final Status wz;\n\n public LoadMatchesResponse getMatches()\n {\n return new LoadMatchesResponse(new Bundle());\n }\n\n public Status getStatus()\n {\n return wz;\n }\n\n public void release()\n {\n }\n\n \n {\n Ln = TurnBasedMultiplayerImpl.LoadMatchesImpl.this;\n wz = status;\n super();\n }\n };\n }",
"public T parseArguments(String[] args) {\r\n try {\r\n //Load annotated methods into a Map keyed by the option name\r\n final T targetInstance = targetClass.newInstance();\r\n\r\n final Map<String, String> argsMap = getOptionsMap(args);\r\n\r\n for (Entry<String, Method> annotatedMethodEntry : annotatedMethods.entrySet()) {\r\n final String optionName = annotatedMethodEntry.getKey();\r\n if (argsMap.containsKey(optionName)) {\r\n final String value = argsMap.get(optionName);\r\n invokeAnnotatedMethod(optionName, targetInstance, value);\r\n } else if (!hasDefault(optionName)) {\r\n invokeAnnotationDefault(optionName, targetInstance);\r\n }\r\n }\r\n\r\n return targetInstance;\r\n } catch (ReflectiveOperationException ex) {\r\n throw new IllegalArgumentException(Arrays.toString(args), ex);\r\n }\r\n }",
"public T newInstance();",
"public abstract Object build();",
"T create(R argument);",
"public Evaluador() {\n aL = new Arguments();\n }",
"public void answer(Properties answers) {}",
"H create(Method method);",
"public bcm a(World paramaqu, int paramInt)\r\n/* 41: */ {\r\n/* 42:56 */ return new bdj();\r\n/* 43: */ }",
"InstanceModel createInstanceOfInstanceModel();",
"public Riddle(String initQuestion, String initAnswer)\n {\n // set the instance variables to the init parameter variables\n\n }",
"Object build();",
"private Object getInstance(Annotation label) throws Exception {\r\n ExtractorBuilder builder = getBuilder(label);\r\n Constructor factory = builder.getConstructor();\r\n \r\n if(!factory.isAccessible()) {\r\n factory.setAccessible(true);\r\n }\r\n return factory.newInstance(contact, label, format); \r\n }",
"public MockClass(String arg) {\n\t}",
"public CMObject newInstance();",
"public Object construct() {\n try {\n Object res;\n\n res = mTarget.invokeTimeout(mMethodName, mParams, mTimeout);\n return res;\n }\n catch (TokenFailure ex) {\n return ex;\n }\n catch (RPCException ex) {\n return ex;\n }\n catch (XMPPException ex) {\n return ex;\n }\n }",
"private ExecutableMetaData(String name, Type returnType, Class<?>[] parameterTypes, ElementKind kind, Set<String> signatures, Set<MetaConstraint<?>> returnValueConstraints, List<ParameterMetaData> parameterMetaData, Set<MetaConstraint<?>> crossParameterConstraints, Set<MetaConstraint<?>> typeArgumentsConstraints, Map<Class<?>, Class<?>> returnValueGroupConversions, boolean isCascading, boolean isConstrained, boolean isGetter, UnwrapMode unwrapMode)\n/* */ {\n/* 92 */ super(name, returnType, returnValueConstraints, kind, isCascading, isConstrained, unwrapMode);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 102 */ this.parameterTypes = parameterTypes;\n/* 103 */ this.parameterMetaDataList = Collections.unmodifiableList(parameterMetaData);\n/* 104 */ this.crossParameterConstraints = Collections.unmodifiableSet(crossParameterConstraints);\n/* 105 */ this.signatures = signatures;\n/* 106 */ this.returnValueMetaData = new ReturnValueMetaData(returnType, returnValueConstraints, typeArgumentsConstraints, isCascading, returnValueGroupConversions, unwrapMode);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 114 */ this.isGetter = isGetter;\n/* */ }",
"Oracion createOracion();",
"@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}",
"public Ability init(Object... args)\r\n {\r\n return this;\r\n }",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}",
"@Override\n public IntentDTO run(String... args) {\n this.setup(args);\n\n if (foundStudent != null) {\n ProgressDAO progressDAO = new ProgressDAO();\n Progress progress = progressDAO.findProgress(foundStudent);\n\n if (progress != null) {\n if (progress.name.equals(Progress.reset)) {\n /**\n * The student reseted it's account, reply accordingly\n */\n return (new RegistrationResetIntention()).run(args);\n } else if (progress.name.equals(Progress.initialRegistration)) {\n /**\n * After the student replied to the \"can you help me?\"\n * question, check if they are willing to continue\n */\n return (new InititalRegistrationIntent()).run(args);\n } else if (progress.name.equals(Progress.registrationCanceled)) {\n /**\n * The student replied negatively to the \"can you help me?\"\n * question\n */\n return (new RegistrationCanceledIntent()).run(args);\n } else if (shouldRegisterUniversity(progress)) {\n /**\n * The user replied positively to the \"can you help me?\"\n * question, or we did not find their university or they\n * said we didn't find their university\n */\n return (new RegisterUniversityIntent()).run(args);\n } else if (progress.name.equals(Progress.universityRegistrationResponse)) {\n /**\n * The user replied to the \"what is your university?\"\n * question\n */\n return (new UniversityRegistrationResponseIntent()).run(args);\n } else if (shouldRegisterCourse(progress)) {\n /**\n * The user replied positively to the \"is this your\n * university?\" question, or we did not find their course or\n * they said we didn't find their course\n */\n return (new RegisterCourseIntent()).run(args);\n } else if (progress.name.equals(Progress.courseRegistrationResponse)) {\n /**\n * The user replied to the \"what is your course?\" question\n */\n return (new CourseRegistrationResponseIntent()).run(args);\n } else if (shouldForwardToTermsAcceptanceIntent(progress)) {\n /**\n * The user replied positively to the \"Is this your course?\"\n * question\n */\n return (new TermsAcceptanceIntent()).run(args);\n }\n }\n }\n\n /**\n * The user is not in any valid progress, therefore, we assume it's\n * their first access\n */\n return firstAccess();\n }",
"public Object build();",
"public static void main(String[] args) \r\n\t{\n\t\tnew Questions(10);\r\n\t\t\r\n\t}",
"Argument createArgument();",
"protected abstract T self();",
"protected abstract T self();",
"protected abstract T self();",
"public abstract Response create(Request request, Response response);",
"protected AnswerList() {/* intentionally empty block */}",
"public interface UrlArgumentBuilder {\n\n /**\n * Sets next element of a chain.\n *\n * @param next next element of a chain\n */\n void setNext(final UrlArgumentBuilder next);\n\n /**\n * Builds URL argument that is used by Yandex static API.\n *\n * @param yandexMap yandex map\n * @return URL part\n */\n String build(final YandexMap yandexMap);\n\n}",
"private Response() {}",
"private Response() {}",
"DynamicInstance createDynamicInstance();",
"public interface Representation // C# has public abstract class\n{\n /// <summary>\n /// Creates a new type object of this representation, and\n /// associates it with the given HOW. Also sets up a new\n /// representation instance if needed.\n /// </summary>\n /// <param name=\"HOW\"></param>\n /// <returns></returns>\n RakudoObject type_object_for(ThreadContext tc, RakudoObject how);\n\n /// <summary>\n /// Creates a new instance based on the type object.\n /// </summary>\n /// <param name=\"WHAT\"></param>\n /// <returns></returns>\n RakudoObject instance_of(ThreadContext tc, RakudoObject what);\n\n /// <summary>\n /// Checks if a given object is defined.\n /// </summary>\n /// <param name=\"Obj\"></param>\n /// <returns></returns>\n boolean defined(ThreadContext tc, RakudoObject obj);\n\n /// <summary>\n /// Gets the current value for an attribute.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <returns></returns>\n RakudoObject get_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name);\n\n /// <summary>\n /// Gets the current value for an attribute, obtained using the\n /// given hint.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Hint\"></param>\n /// <returns></returns>\n RakudoObject get_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint);\n\n /// <summary>\n /// Binds the given value to the specified attribute.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Value\"></param>\n void bind_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, RakudoObject value);\n\n /// <summary>\n /// Binds the given value to the specified attribute, using the\n /// given hint.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Hint\"></param>\n /// <param name=\"Value\"></param>\n void bind_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint, RakudoObject Value);\n\n /// <summary>\n /// Gets the hint for the given attribute ID.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <returns></returns>\n int hint_for(ThreadContext tc, RakudoObject classHandle, String name);\n\n /// <summary>\n /// Used with boxing. Sets an integer value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_int(ThreadContext tc, RakudoObject classHandle, int Value);\n\n /// <summary>\n /// Used with boxing. Gets an integer value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n int get_int(ThreadContext tc, RakudoObject classHandle);\n\n /// <summary>\n /// Used with boxing. Sets a floating point value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_num(ThreadContext tc, RakudoObject classHandle, double Value);\n\n /// <summary>\n /// Used with boxing. Gets a floating point value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n double get_num(ThreadContext tc, RakudoObject classHandle);\n\n /// <summary>\n /// Used with boxing. Sets a string value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_str(ThreadContext tc, RakudoObject classHandle, String Value);\n\n /// <summary>\n /// Used with boxing. Gets a string value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n String get_str(ThreadContext tc, RakudoObject classHandle);\n}",
"private void createIQuestionInterface(final Environment result,\n\t\t\tEnvironment extEnv)\n\t{\n\n\t\tList<String> genericArguments = new LinkedList<String>();\n\t\tgenericArguments.add(\"Q\");\n\t\tString name = \"Question\";\n\t\tString tag = result.TAG_IQuestion;\n\t\tMethodFactory extMf = new MethodFactory()\n\t\t{\n\n\t\t\t// @Override\n\t\t\t// public void updateApplyMethod(IClassDefinition cdef,\n\t\t\t// String newAnalysisName)\n\t\t\t// {\n\t\t\t// // QuestionAcceptMethod qam = findMethodType(QuestionAcceptMethod.class, cdef);\n\t\t\t// // if (qam != null)\n\t\t\t// // qam.setPrivilegedBody(\"\\t\\t((\"\n\t\t\t// // + newAnalysisName\n\t\t\t// // + \"<Q>)caller).case\"\n\t\t\t// // + AnalysisUtil.getCaseClass(result, cdef).getName().getName()\n\t\t\t// // + \"(this, question);\");\n\t\t\t// }\n\n\t\t\t@Override\n\t\t\tpublic Method createCaseMethod(IClassDefinition cdef)\n\t\t\t{\n\t\t\t\tQuestionAdaptorCaseMethod caseM = new QuestionAdaptorCaseMethod();\n\t\t\t\tcaseM.setClassDefinition(cdef);\n\t\t\t\treturn caseM;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Method createDefaultCaseMethod(IClassDefinition cdef)\n\t\t\t{\n\t\t\t\tQuestionAdaptorDefaultMethod qadm = new QuestionAdaptorDefaultMethod();\n\t\t\t\tqadm.setClassDefinition(cdef);\n\t\t\t\treturn qadm;\n\t\t\t}\n\t\t};\n\t\tcreateAnalysisInterface(genericArguments, name, tag, extMf, extEnv, result, base);\n\t}",
"public Thaw_args(Thaw_args other) {\r\n }",
"public static void main(String[] args) {\r\n\t // Usamos un método genérico para instanciar la factoría por defecto.\r\n\t // La factoría estará definida en la configuración\r\n\t IMotorFactory factoria = MotorFactory.obtenerFactoria();\r\n\t \r\n\t // Instanciamos un motor a través de la factoría.\r\n\t // Fijémonos que únicamente tratamos con interfaces. En ningún momento\r\n\t // concretamos la clase con la que estamos trabajando\r\n\t IMotor motor = factoria.createInstance();\r\n\t \r\n\t // Finalmente, hacemos uso del motor a través de los métodos de la\r\n\t // interfaz IMotor.\r\n\t System.out.println(motor.inyectarCombustible(20));\r\n\t System.out.println(motor.consumirCombustible());\r\n\t System.out.println(motor.realizarExpansion());\r\n\t System.out.println(motor.realizarEscape());\r\n\t System.out.println();\r\n\t}",
"public static <T> T createObject(Class<T> clas, Object[] arguments) throws InstantiationException {\n ProxyFactory f = new ProxyFactory(); //This starts a proxy factory which will create the proxy.\n f.setSuperclass(clas); //This sets the super class.\n\n Field[] fields = clas.getDeclaredFields(); //Get all the fields from the class it's being made to replicate\n boolean hasFieldInv = ContractHelper.fieldHasInvariant(fields);\n //The is to ensure that a class which has a field invariant \n //then all of the methods will be checked.\n\n f.setFilter((Method m) -> {\n //This checks if any annotations are present for a method supplied.\n return m.getAnnotationsByType(Pre.class).length != 0\n || m.getAnnotationsByType(Post.class).length != 0\n || m.getAnnotationsByType(Invariant.class).length != 0\n || m.getAnnotationsByType(ForAll.class).length != 0\n || m.getAnnotationsByType(Exists.class).length != 0\n || m.getAnnotationsByType(PostThrow.class).length != 0\n || hasFieldInv;\n });\n\n Class c = f.createClass(); //This then creates a new class from the proxy factory.\n\n MethodHandler mi = (Object self, Method m, Method proceed, Object[] args) -> { //This is the method handler for the proxy created.\n Parameter[] params = m.getParameters(); //This gets the parameters of the method.\n //These are maps of all the parameters and fields to be checked.\n HashMap<String, Object> initialParameters = ContractHelper.mapHelper(args, params); //This uses a helper to assign the parameter names and values.\n HashMap<String, Object> afterParameters = initialParameters; //This sets the after parameters to the intial to begin with.\n HashMap<String, Object> initialFields = ContractHelper.fieldHelper(self, fields); //This uses a helper to assign the field name and values\n HashMap<String, Object> afterFields = initialFields; //This sets the after fields to the intial to begin.\n //These are arrays of all the annotations.\n Pre[] preArr = m.getAnnotationsByType(Pre.class); //This gets all the annotations that could be on the methods.\n Post[] postArr = m.getAnnotationsByType(Post.class);\n Invariant[] invArr = m.getAnnotationsByType(Invariant.class);\n ForAll[] forAllArr = m.getAnnotationsByType(ForAll.class);\n Exists[] existsArr = m.getAnnotationsByType(Exists.class);\n\n invArr = getFieldInvs(invArr, fields);\n\n for (Pre pre : preArr) { //This loops through all annotations for pre.\n preCheck(pre.value(), initialParameters, initialFields); //This then checks the pre conditions.\n }\n\n for (Invariant inv : invArr) {\n invCheck(inv.value(), initialParameters, initialFields); //This then checks the invariant condition.\n }\n\n Object result = null; //This intialised the result to null.\n\n try {\n result = proceed.invoke(self, args); // execute the original method.\n\n afterParameters = ContractHelper.mapHelper(args, params); //This gets the parameters after the method is called.\n afterFields = ContractHelper.fieldHelper(self, fields); //This gets the fields after\n\n initialParameters = ContractHelper.alterOldMap(initialParameters);\n initialFields = ContractHelper.alterOldMap(initialFields);\n\n for (Post post : postArr) {\n postCheck(post.value(), initialParameters, afterParameters, initialFields, afterFields, result); //This then runs any post checks.\n }\n \n for (ForAll forAll : forAllArr) {\n forAllCheck(forAll.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n\n for (Exists exist : existsArr) {\n existsCheck(exist.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n \n for (Invariant inv : invArr) {\n invCheck(inv.value(), afterParameters, afterFields);\n }\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException thrownByMethod) {\n Throwable cause = thrownByMethod.getCause();\n\n if (!(cause instanceof AssertionError || cause instanceof ContractException)) {\n if (cause != null) { //If cause is null then it is not an exception from the method.\n PostThrow[] thrown = m.getAnnotationsByType(PostThrow.class);\n\n for (PostThrow post : thrown) {\n if (cause.getClass().equals(post.exception())) { //Check if it has exception to check.\n postThrowCheck(post.condition(), initialParameters, afterParameters, initialFields, afterFields, result, cause); //This then runs any post checks.\n }\n }\n cause.setStackTrace(ContractHelper.alterTrace(cause.getStackTrace())); //This sets the trace of the throwable \n throw cause;\n }\n }\n throw thrownByMethod;\n }\n return result; // this returns the result of the method invocation.\n };\n\n Object obj = ContractHelper.getConstructor(c, arguments); //This uses a helper to get a constructor.\n\n //If it is still null then it can't instantiated by reflection.\n if (obj == null) {\n InstantiationException e = new InstantiationException(\"Class could not be instantiated: \" + clas);\n e.setStackTrace(ContractHelper.alterStackInstantiation(e.getStackTrace()));\n throw e;\n }\n\n ((Proxy) obj).setHandler(mi); //This then sets it's handler using the proxy.\n\n return clas.cast(obj); //This returns the object which should now have the proxy with it.\n }",
"Response createResponse();",
"public interface SearcherConstructor {\n public HashMap<String,String> getHeader();\n public String getUrl(String word, int page);\n public NetImage[] getImageList(String response);\n}",
"public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, boolean paramBoolean1, boolean paramBoolean2)\r\n/* 37: */ {\r\n/* 38: 53 */ this.d = paramaqu;\r\n/* 39: 54 */ this.h = paramwv;\r\n/* 40: 55 */ this.i = paramFloat;\r\n/* 41: 56 */ this.e = paramDouble1;\r\n/* 42: 57 */ this.f = paramDouble2;\r\n/* 43: 58 */ this.g = paramDouble3;\r\n/* 44: 59 */ this.a = paramBoolean1;\r\n/* 45: 60 */ this.b = paramBoolean2;\r\n/* 46: */ }",
"public interface RMASubmitCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide JSON and XML format\n\t */\n\t@Headers({ \"Accept: application/json\", \"Content-Type: application/json\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestJSON(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t@Headers({ \"Accept: application/xml\", \"Content-Type: application/xml\" })\n\t@RequestLine(\"POST /servicemgmt/rma/newrma?sellerid={sellerid}&version={version}\")\n\tSubmitRMAResponse sendRMASubmitRequestXML(@Param(\"sellerid\") String sellerID, @Param(\"version\") String version,\n\t\t\tSubmitRMARequest body);\n\n\t// Implement default method of interface class that according to\n\t// Variables.MediaType to run at JSON or XML request.\n\tdefault SubmitRMAResponse sendRMASubmitRequest(SubmitRMARequest body, String version) {\n\t\tswitch (Variables.MediaType) {\n\t\tcase JSON:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestJSON(Content.SellerID, version, body);\n\n\t\tcase XML:\n\t\t\tif (Variables.SimulationEnabled)\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, \"307\", body);\n\t\t\telse\n\t\t\t\treturn sendRMASubmitRequestXML(Content.SellerID, version, body);\n\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\n\t}\n\n\tstatic RMASubmitCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().jsonBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n\tstatic RMASubmitCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\n\t\treturn new CallerFactory<RMASubmitCaller>().xmlBuild(RMASubmitCaller.class, Variables.LogLevel,\n\t\t\t\tVariables.Retryer, RMAClient.genClient());\n\t}\n\n}",
"private Builder() {}",
"protected abstract Self self();",
"public static void main(String[] args) {\n\t\tAbstraction ab = new RefinedAbstraction();\r\n\r\n\t\tab.SetImplementor(new ConcreteImplementorA());\r\n\t\tab.Operation();\r\n\r\n\t\tab.SetImplementor(new ConcreteImplementorB());\r\n\t\tab.Operation();\r\n\t}",
"Match createMatch();",
"public T newInstance(Object... args) {\n Class<?>[] receivedParameterTypes = Arrays.stream(args).map(arg -> arg == null ? null : arg.getClass())\n .toArray(Class<?>[]::new);\n return createInstance(getProxyClass(), receivedParameterTypes, args);\n }",
"Like createLike();",
"public static void main(String[] args) {\n\n TurkishTourist client=new TurkishTourist();\n\n BritishGuide adaptee1=new BritishGuide();\n\n BritishTranslator adapter1=new BritishTranslator(adaptee1);\n\n client.listenTranslator(adapter1);\n\n\n System.out.println();\n\n /**\n * Factory design pattern part\n */\n Organizer britishOrg=new BritishOrganizer();\n Organizer greekOrg=new GreekOrganizer();\n\n System.out.println(((BritishOrganizer) britishOrg).getRace()+\" organizator called translator for business\");\n Translator translator1=britishOrg.callTranslator(TranslatorLevel.EXPERT);\n\n\n System.out.println(((GreekOrganizer) greekOrg).getRace()+\" organizator called translator for business\");\n translator1=greekOrg.callTranslator(TranslatorLevel.JUNIOR);\n\n\n\n\n\n\n\n }",
"public static abstract interface Builder\n/* */ {\n/* */ public abstract Builder paths(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder methods(RequestMethod... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder params(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder headers(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder consumes(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder produces(String... paramVarArgs);\n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder mappingName(String paramString);\n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);\n/* */ \n/* */ \n/* */ \n/* */ public abstract Builder options(RequestMappingInfo.BuilderConfiguration paramBuilderConfiguration);\n/* */ \n/* */ \n/* */ \n/* */ public abstract RequestMappingInfo build();\n/* */ }",
"public static void main(String[] args) {\n\t\tHappyNumber result = new HappyNumber();\n\t\tSystem.out.println(result.happyNumber(19));\n\t\tSystem.out.println(result.happyNumberI(19));\n\t\tSystem.out.println(result.happyNumberI(10));\n\t}",
"public StubValidateInput(String[] answers) {\n super(answers);\n }",
"public Result(){\n\t}",
"public Instance() {\n }",
"public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, List<BlockPosition> paramList)\r\n/* 26: */ {\r\n/* 27: 44 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, false, true, paramList);\r\n/* 28: */ }",
"public static void main(String args[]) {\n System.out.println(getResult(5, 3, 10)); // 9 10 9 8 7\n System.out.println(getResult(7, 6, 10)); // 8 9 10 9 8 7 6\n System.out.println(getResult(5, 6, 10)); // 6 7 8 9 10 // cannot construct\n System.out.println(getResult(7, 9, 10)); // cannot construct.\n\n }",
"private ContractMethod findMatchedInstance(List arguments) {\n List<ContractMethod> matchedMethod = new ArrayList<>();\n\n if(this.getInputs().size() != arguments.size()) {\n for(ContractMethod method : this.getNextContractMethods()) {\n if(method.getInputs().size() == arguments.size()) {\n matchedMethod.add(method);\n }\n }\n } else {\n matchedMethod.add(this);\n }\n\n if(matchedMethod.size() == 0) {\n throw new IllegalArgumentException(\"Cannot find method with passed parameters.\");\n }\n\n if(matchedMethod.size() != 1) {\n LOGGER.warn(\"It found a two or more overloaded function that has same parameter counts. It may be abnormally executed. Please use *withSolidityWrapper().\");\n }\n\n return matchedMethod.get(0);\n }",
"public Question(){}",
"private final class <init> extends com.ebay.nautilus.kernel.util.t>\n{\n\n final _cls1 this$1;\n\n public com.ebay.nautilus.kernel.util.t> get(String s, String s1, String s2, Attributes attributes)\n throws SAXException\n {\n if (\"http://www.ebay.com/marketplace/mobile/v1/services\".equals(s) && \"roiFactoryResponse\".equals(s1))\n {\n return new com.ebay.nautilus.kernel.util.SaxHandler.TextElement() {\n\n final RoiTrackEventResponse.RootElement.RoiTrackEventResponses this$2;\n\n public void text(String s3)\n throws SAXException\n {\n if (urls == null)\n {\n urls = new ArrayList();\n }\n urls.add(s3);\n }\n\n \n {\n this$2 = RoiTrackEventResponse.RootElement.RoiTrackEventResponses.this;\n super();\n }\n };\n } else\n {\n return super.t>(s, s1, s2, attributes);\n }\n }",
"public abstract String chooseAnswer();",
"public abstract Builder produces(String... paramVarArgs);",
"public IDetectionAlgorithm createInstance();",
"public DepotTimetableAsk() {\n }",
"public static <T, A> Answer<T> answer(Answer1<T, A> answer) {\n return toAnswer(answer);\n }",
"public abstract DankSubmissionRequest build();",
"public Ping_args(Ping_args other) {\r\n }",
"private ChainingMethods() {\n // private constructor\n\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tInstitude i1=new Institude(10,\"Pune\",new Branch(11,\"Bas\",new Subject(20,\"Java\",new Topic\r\n\t\t\t\t(30,\"Method Overloading\",new SubTopic(40,\"Method Overriding\",new Question(50,\"What is class\"))))));\r\n\t\t\r\n\t\tSystem.out.println(i1);\r\n\t\t\r\n\t\t\r\n//\t\tInstitude i1=new Institude();\r\n//\t\ti1.setId(10);\r\n//\t\ti1.setName(\"Pune\");\r\n//\t\t\r\n//\t\tBranch b1=new Branch();\r\n//\t\tb1.setId(11);\r\n//\t\tb1.setName(\"Bsc\");\r\n//\t\t\r\n//\t\tSubject s1=new Subject();\r\n//\t\ts1.setId(20);\r\n//\t\ts1.setName(\"Java\");\r\n//\t\t\r\n//\t\tTopic t1=new Topic();\r\n//\t\tt1.setId(30);\r\n//\t\tt1.setName(\"Method Overloading\");\r\n//\t\t\r\n//\t\tSubTopic s2=new SubTopic();\r\n//\t\ts2.setId(40);\r\n//\t\ts2.setName(\"Method overriding\");\r\n//\t\t\r\n//\t\tQuestion q1=new Question();\r\n//\t\tq1.setId(50);\r\n//\t\tq1.setName(\"What is Class ?\");\r\n//\t\t\r\n//\t\t\r\n//\t\ti1.setB1(b1);\r\n//\t\tb1.setS1(s1);\r\n//\t\ts1.setT1(t1);\r\n//\t\tt1.setSt(s2);\r\n//\t\ts2.setQ1(q1);\r\n//\t\t\r\n//\t\tSystem.out.println(i1);\r\n\t\r\n\t\t}",
"public void run(Object options);",
"public static void main(String[] args) {\n\t\tQ q = new Q();\r\n\t\tnew Producer(q);\r\n\t\tnew Customer(q);\r\n\t}",
"public static void main(String[] args) {\n\n Shape circle = new Circle(5);\n System.out.println(circle.getArea());\n System.out.println(circle.getCircuit());\n Shape triangle = new Triangle(3,5,4,3);\n System.out.println(triangle.getCircuit());\n System.out.println(triangle.getArea());\n Shape square = new Square(5);\n System.out.println(square.getArea());\n System.out.println(square.getCircuit());\n\n Person person = new Person(\"Grzegorz\",40,new Medical(1111,\"Kierowanie Karetką\"));\n System.out.println(person.getResponsibilities());\n\n }",
"public abstract Self accepts();",
"public interface Requestor {\r\n \r\n /**\r\n * Marshal the given operation and its parameters into a request object, send\r\n * it to the remote component, and interpret the answer and convert it back\r\n * into the return type of generic type T\r\n * \r\n * @param <T>\r\n * generic type of the return value\r\n * @param objectId\r\n * the object that this request relates to; not that this may not\r\n * necessarily just be the object that the method is called upon\r\n * @param operationName\r\n * the operation (=method) to invoke\r\n * @param typeOfReturnValue\r\n * the java reflection type of the returned type\r\n * @param argument\r\n * the arguments to the method call\r\n * @return the return value of the type given by typeOfReturnValue\r\n */\r\n <T> T sendRequestAndAwaitReply(String objectId, String operationName, Type typeOfReturnValue, String accessToken, Object... argument);\r\n\r\n}",
"public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}",
"private Builder(Class<T> clazz, Object... objects) {\n try {\n Stream<Constructor<?>> constructors = Stream.of(clazz.getDeclaredConstructors()).peek(constructor -> constructor.setAccessible(true));\n Optional<Constructor<?>> constructor;\n if (null == objects) {\n constructor = constructors.filter(cons -> cons.getParameterCount() == 0).findFirst();\n if (constructor.isPresent()) {\n instance = clazz.cast(constructor.get().newInstance());\n }\n } else {\n constructor = constructors.filter(cons -> cons.getParameterCount() == objects.length)\n .filter(cons -> {\n List<Class<?>> consClass = Arrays.asList(cons.getParameterTypes());\n List<Class<?>> paramsClass = Arrays.stream(objects).map(Object::getClass).collect(Collectors.toList());\n return consClass.stream()\n .allMatch(con -> paramsClass.stream()\n .anyMatch(param -> (con.isPrimitive() &&\n (Number.class.isAssignableFrom(param) ||\n Boolean.class.isAssignableFrom(param) ||\n Character.class.isAssignableFrom(param) ||\n Byte.class.isAssignableFrom(param))) ||\n param.equals(con) ||\n param.isAssignableFrom(con) ||\n con.isAssignableFrom(param)));\n })\n .findFirst();\n if (constructor.isPresent()) {\n instance = clazz.cast(constructor.get().newInstance(objects));\n }\n }\n } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n }",
"public void answer(Properties answers) {\n/* 56 */ setAnswer(answers);\n/* 57 */ QuestionParser.parseManageAllianceQuestion(this);\n/* */ }",
"public static RunArguments instance(){\n\t\treturn RunArguments.builder().build();\n\t}",
"public Implementor(){}",
"public BwaOptions(String[] args) {\n\n\t\t//Parse arguments\n\t\tfor (String argument : args) {\n\t\t\tLOG.info(\"[\"+this.getClass().getName()+\"] :: Received argument: \" + argument);\n\t\t}\n\n\t\t//Algorithm options\n\t\tthis.options = this.initOptions();\n\n\t\t//To print the help\n\t\tHelpFormatter formatter = new HelpFormatter();\n\t\t//formatter.setWidth(500);\n\t\t//formatter.printHelp( correctUse,header, options,footer , true);\n\n\t\t//Parse the given arguments\n\t\tCommandLineParser parser = new BasicParser();\n\t\tCommandLine cmd;\n\n\t\ttry {\n\t\t\tcmd = parser.parse(this.options, args);\n\n\t\t\t//We look for the algorithm\n\t\t\tif (cmd.hasOption('m') || cmd.hasOption(\"mem\")){\n\t\t\t\t//Case of the mem algorithm\n\t\t\t\tmemAlgorithm = true;\n\t\t\t\talnAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\t\t\telse if(cmd.hasOption('a') || cmd.hasOption(\"aln\")){\n\t\t\t\t// Case of aln algorithm\n\t\t\t\talnAlgorithm = true;\n\t\t\t\tmemAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\t\t\telse if(cmd.hasOption('b') || cmd.hasOption(\"bwasw\")){\n\t\t\t\t// Case of bwasw algorithm\n\t\t\t\tbwaswAlgorithm = true;\n\t\t\t\tmemAlgorithm = false;\n\t\t\t\talnAlgorithm = false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// Default case. Mem algorithm\n\t\t\t\tLOG.warn(\"[\"+this.getClass().getName()+\"] :: The algorithm \"\n\t\t\t\t\t\t+ cmd.getOptionValue(\"algorithm\")\n\t\t\t\t\t\t+ \" could not be found\\nSetting to default mem algorithm\\n\");\n\n\t\t\t\tmemAlgorithm = true;\n\t\t\t\talnAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\n\t\t\t//We look for the index\n\t\t\tif (cmd.hasOption(\"index\") || cmd.hasOption('i')) {\n\t\t\t\tindexPath = cmd.getOptionValue(\"index\");\n\t\t\t}\n\t\t/* There is no need of this, as the index option is mandatory\n\t\telse {\n\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] :: No index has been found. Aborting.\");\n\t\t\tformatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tSystem.exit(1);\n\t\t}*/\n\n\t\t\t//Partition number\n\t\t\tif (cmd.hasOption(\"partitions\") || cmd.hasOption('n')) {\n\t\t\t\tpartitionNumber = Integer.parseInt(cmd.getOptionValue(\"partitions\"));\n\t\t\t}\n\n\t\t\t// BWA arguments\n\t\t\tif (cmd.hasOption(\"bwa\") || cmd.hasOption('w')) {\n\t\t\t\tbwaArgs = cmd.getOptionValue(\"bwa\");\n\t\t\t}\n\n\t\t\t// Paired or single reads\n\t\t\tif (cmd.hasOption(\"paired\") || cmd.hasOption('p')) {\n\t\t\t\tpairedReads = true;\n\t\t\t\tsingleReads = false;\n\t\t\t}\n\t\t\telse if (cmd.hasOption(\"single\") || cmd.hasOption('s')) {\n\t\t\t\tpairedReads = false;\n\t\t\t\tsingleReads = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLOG.warn(\"[\"+this.getClass().getName()+\"] :: Reads argument could not be found\\nSetting it to default paired reads\\n\");\n\t\t\t\tpairedReads = true;\n\t\t\t\tsingleReads = false;\n\t\t\t}\n\n\t\t\t// Sorting\n\t\t\tif (cmd.hasOption('f') || cmd.hasOption(\"hdfs\")) {\n\t\t\t\tthis.sortFastqReadsHdfs = true;\n\t\t\t\tthis.sortFastqReads = false;\n\t\t\t}\n\t\t\telse if (cmd.hasOption('k') || cmd.hasOption(\"spark\")) {\n\t\t\t\tthis.sortFastqReadsHdfs = false;\n\t\t\t\tthis.sortFastqReads = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.sortFastqReadsHdfs = false;\n\t\t\t\tthis.sortFastqReads = false;\n\t\t\t}\n\n\t\t\t// Use reducer\n\t\t\tif (cmd.hasOption('r') || cmd.hasOption(\"reducer\")) {\n\t\t\t\tthis.useReducer = true;\n\t\t\t}\n\n\t\t\t// Help\n\t\t\tif (cmd.hasOption('h') || cmd.hasOption(\"help\")) {\n\t\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\t\tthis.printHelp();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\t//Input and output paths\n\t\t\tString otherArguments[] = cmd.getArgs(); //With this we get the rest of the arguments\n\n\t\t\tif ((otherArguments.length != 2) && (otherArguments.length != 3)) {\n\t\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] No input and output has been found. Aborting.\");\n\n\t\t\t\tfor (String tmpString : otherArguments) {\n\t\t\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] Other args:: \" + tmpString);\n\t\t\t\t}\n\n\t\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\telse if (otherArguments.length == 2) {\n\t\t\t\tinputPath = otherArguments[0];\n\t\t\t\toutputPath = otherArguments[1];\n\t\t\t}\n\t\t\telse if (otherArguments.length == 3) {\n\t\t\t\tinputPath = otherArguments[0];\n\t\t\t\tinputPath2 = otherArguments[1];\n\t\t\t\toutputPath = otherArguments[2];\n\t\t\t}\n\n\t\t} catch (UnrecognizedOptionException e) {\n\t\t\te.printStackTrace();\n\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tthis.printHelp();\n\t\t\tSystem.exit(1);\n\t\t} catch (MissingOptionException e) {\n\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tthis.printHelp();\n\t\t\tSystem.exit(1);\n\t\t} catch (ParseException e) {\n\t\t\t//formatter.printHelp( correctUse,header, options,footer , true);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}"
] |
[
"0.62442356",
"0.62394834",
"0.5983255",
"0.5890238",
"0.5852883",
"0.5828843",
"0.58042544",
"0.57526535",
"0.5578121",
"0.5557207",
"0.55522263",
"0.5551611",
"0.5537371",
"0.55253434",
"0.55241185",
"0.55046815",
"0.5444987",
"0.54042",
"0.5400482",
"0.53902835",
"0.5387224",
"0.5352987",
"0.5344663",
"0.53327703",
"0.5328733",
"0.5278604",
"0.52621484",
"0.5226516",
"0.5222989",
"0.5177506",
"0.51561904",
"0.51508194",
"0.5128395",
"0.5110743",
"0.5103913",
"0.509709",
"0.5093419",
"0.508676",
"0.50783724",
"0.507797",
"0.5071625",
"0.506373",
"0.50601554",
"0.5019861",
"0.5006016",
"0.50050783",
"0.5000927",
"0.5000927",
"0.5000927",
"0.49916115",
"0.49808574",
"0.4975149",
"0.49743655",
"0.49743655",
"0.4971769",
"0.4970932",
"0.49547592",
"0.4954235",
"0.4950239",
"0.49184167",
"0.4911276",
"0.49053192",
"0.490298",
"0.49003738",
"0.48942715",
"0.48927137",
"0.48924834",
"0.4891503",
"0.48892432",
"0.4888033",
"0.48871064",
"0.48853138",
"0.4878449",
"0.48715425",
"0.48705378",
"0.48682693",
"0.4866293",
"0.48634505",
"0.48605224",
"0.48598647",
"0.48593038",
"0.48555252",
"0.4855278",
"0.48551047",
"0.48527375",
"0.4850981",
"0.48374408",
"0.48349816",
"0.48332655",
"0.4833264",
"0.4828799",
"0.4825879",
"0.4823787",
"0.48235127",
"0.482153",
"0.4818033",
"0.48165482",
"0.4815191",
"0.4814759",
"0.48115277",
"0.48106295"
] |
0.0
|
-1
|
Answer an integer comparator
|
public Comparator<Integer> createIntegerComparator() {
return (Integer i1, Integer i2) -> ( i1.intValue() - i2.intValue());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private Comparator<Integer> getIntegerComparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer integer1, Integer integer2) {\n return integer1 - integer2;\n }\n };\n }",
"int compareToInt(integers i);",
"public static ComparatorPlus<IntPlus> getIntComparator() {\n return new ComparatorPlus<SortingPeterTest.IntPlus>() {\n @Override\n public int compare(SortingPeterTest.IntPlus int1,\n SortingPeterTest.IntPlus int2) {\n incrementCount();\n return int1.value - int2.value;\n }\n };\n }",
"public int compare(Integer a,Integer b)\n\t{\n\t\treturn a%2-b%2;\n\t}",
"private static int compareInts(int first, int second) {\n return first > second ? 1 : (second > first ? -1 : 0);\n }",
"@Override\n public int compare(Integer o1, Integer o2) {\n return Integer.compare(o1, o2);\n }",
"@Override\n\tpublic int compare(Integer i1, Integer i2) {\n\t\treturn (i1>i2)?-1:(i1<i2)?+1:0;\n\t}",
"@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\n\t\t\t\treturn Integer.compare(o2[2], o1[2]);\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1 > o2 ? -1: (o1==o2) ? 0 : 1;\r\n\t\t\t}",
"@Test\n public void testSort_intArr_IntegerComparator() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1.compareTo(o2);\n\t\t\t}",
"public static Comparator convert(final int value) {\n\t\treturn GREATER_THAN.convertInt(value);\n\t}",
"@Override\n\tpublic int compare(Integer o1, Integer o2) {\n\t\treturn o1.compareTo(o2);\n\t}",
"public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }",
"@Override\n\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\treturn o2.compareTo(o1);\n\t\t}",
"@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1.compareTo(o2);\r\n\t\t\t}",
"@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2.compareTo(o1);\n\t\t\t}",
"@Override\r\n\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\treturn -1 * a.compareTo(b);\r\n\t\t\t}",
"@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2.compareTo(o1);\r\n\t\t\t}",
"@Override\n public int compare(Integer o1, Integer o2) {\n return o2.compareTo(o1);\n }",
"@Override\n public int compare(Integer o1, Integer o2) {\n return o2 .compareTo(o1);\n }",
"@Test\n public void testSort_intArr_IntegerComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Override\n\t\t\tpublic int compare(Integer ano1, Integer ano2) {\n\t\t\t\treturn ano1.compareTo(ano2);\n\t\t\t}",
"public interface Comparator {\n default int compare(Object a, Object b) {\n FeatureExpr ctx = Contexts.model_java_util_Comparator_compare;\n V<?> compareResult = compare__Ljava_lang_Object_Ljava_lang_Object__I(V.one(ctx, a), V.one(ctx, b), ctx);\n V<?> selected = compareResult.select(ctx);\n assert selected.getOne() instanceof java.lang.Integer : \"compare returns non-Integer\";\n return ((java.lang.Integer) selected.getOne());\n }\n V<?> compare__Ljava_lang_Object_Ljava_lang_Object__I(V a, V b, FeatureExpr fe);\n}",
"@Override\r\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\treturn arg1.compareTo(arg0);\r\n\t\t\t}",
"@Override\n public int compare(Integer o1, Integer o2) {\n return o2.compareTo(o1);\n }",
"@Override\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\treturn arg1.compareTo(arg0);\n\t\t\t}",
"@Override\n public int compare(Integer a, Integer b) {\n if (base.get(a) >= base.get(b)) {\n return 1;\n } else {\n return -1;\n } // returning 0 would merge keys\n }",
"@Override\n\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\treturn o2 - o1;\n\t\t}",
"public int compare(List<Integer> a, List<Integer> b) {\n return Integer.compare(b.get(1), a.get(1));\n }",
"@Override\n public int compare(int[] o1, int[] o2) {\n \n if(o1[0] == o2[0]) {\n return Integer.compare(o1[1],o2[1]);\n }\n else \n return Integer.compare(o1[0], o2[0]);\n \n \n }",
"public int compare(Integer o1, Integer o2) {\n\t\t\t\t\t\t\treturn o2.compareTo(o1);\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic int compare(Comparendo o1, Comparendo o2) \r\n\t\t\t\t{\n\t\t\t\t\treturn (new Integer(o1.id)).compareTo(o2.id);\r\n\t\t\t\t}",
"@Test\n public void test_min_Integer_Collection2() {\n populate_i2();\n int actual = Selector.min(i2, new CompareIntegerDescending());\n int expected = 9;\n Assert.assertEquals(\"Minimum not found in descending comparator\", expected, actual);\n }",
"@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2-o1;\n\t\t\t}",
"@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Override\n\t\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\t\tInteger x= (Integer)P[a];\n\t\t\t\t\tInteger y= (Integer)P[b];\n\t\t\t\t\treturn x.compareTo(y);\n\t\t\t\t}",
"@Override\n\t\t\tpublic int compare(List<Integer> o1, List<Integer> o2) {\n\t\t\t\tif(o1.get(0)< o2.get(0)){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.get(0) > o2.get(0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}",
"@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2-o1;\r\n\t\t\t}",
"@Override\n\t\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\t\tSystem.out.println(\"comparision occur\");\n\t\t\tif (a instanceof IntPair && b instanceof IntPair) {\n\t\t\t\treturn ((IntPair) a).id.compareTo(((IntPair) b).id);\n\t\t\t}\n\t\t\treturn super.compare(a, b);\n\t\t}",
"@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2 - o1;\n\t\t\t}",
"@Test\n public void testSort_intArr_IntComparator() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Test\n public void testSort_intArr_IntegerComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o2-o1;\n\t\t\t\t}",
"@Test\n public void compareFunctionalBigger() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p2);\n \n assertEquals(-1, a);\n\n }",
"public static int cmp(Object a, Object b)\n\t{\n\t\tint c = (int)a;\n//C++ TO JAVA CONVERTER TODO TASK: Java does not have an equivalent to pointers to value types:\n//ORIGINAL LINE: int *d = (int *)b;\n\t\tint d = (int)b;\n\t\treturn c - d;\n\t}",
"public boolean compare(int i, int j);",
"@Override\n\t\t\tpublic int compare(Integer o1, Integer o2)\n\t\t\t{\n\t\t\t\treturn (o2-o1);\n\t\t\t}",
"public static int compare(int obj1,int obj2){\n\t\tif(obj1 == obj2) { return 0;}\n\t\telse if(obj1>obj2){ return 1;}\n\t\telse { return -1;}\n\t}",
"@Test\n public void testSort_intArr_IntComparator_Desc() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_ARRAY;\n sorter.sort(data, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Override\r\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o2-o1;\r\n\t\t\t\t}",
"interface IComparator<T> {\n // Returns a negative number if t1 comes before t2 in this ordering\n // Returns zero if t1 is the same as t2 in this ordering\n // Returns a positive number if t1 comes after t2 in this ordering\n int compare(T t1, T t2);\n}",
"@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1-o2;\r\n\t\t\t}",
"public int compare( final int x, final int y ) {\n\t\t\t\tfinal LazyIntIterator i = g.successors( x ), j = g.successors( y );\n\t\t\t\tint a, b;\n\n\t\t\t\t/* This code duplicates eagerly of the behaviour of the lazy comparator\n\t\t\t\t below. It is here for documentation and debugging purposes.\n\t\t\t\t\n\t\t\t\tbyte[] g1 = new byte[ g.numNodes() ], g2 = new byte[ g.numNodes() ];\n\t\t\t\twhile( i.hasNext() ) g1[ g.numNodes() - 1 - i.nextInt() ] = 1;\n\t\t\t\twhile( j.hasNext() ) g2[ g.numNodes() - 1 - j.nextInt() ] = 1;\n\t\t\t\tfor( int k = g.numNodes() - 2; k >= 0; k-- ) {\n\t\t\t\t\tg1[ k ] ^= g1[ k + 1 ];\n\t\t\t\t\tg2[ k ] ^= g2[ k + 1 ];\n\t\t\t\t}\n\t\t\t\tfor( int k = g.numNodes() - 1; k >= 0; k-- ) if ( g1[ k ] != g2[ k ] ) return g1[ k ] - g2[ k ];\n\t\t\t\treturn 0;\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tboolean parity = false; // Keeps track of the parity of number of arcs before the current ones.\n\t\t\t\tfor( ;; ) {\n\t\t\t\t\ta = i.nextInt();\n\t\t\t\t\tb = j.nextInt();\n\t\t\t\t\tif ( a == -1 && b == -1 ) return 0;\n\t\t\t\t\tif ( a == -1 ) return parity ? 1 : -1;\n\t\t\t\t\tif ( b == -1 ) return parity ? -1 : 1;\n\t\t\t\t\tif ( a != b ) return parity ^ ( a < b ) ? 1 : -1;\n\t\t\t\t\tparity = ! parity;\n\t\t\t\t}\t\t\t\t\n\t\t\t}",
"@Override\n public int compare(Integer o1, Integer o2) {\n return map.get(o1)-map.get(o2);\n }",
"public int compareTo( Comparable rhs )\n {\n return value < ((MyInteger)rhs).value ? -1 :\n value == ((MyInteger)rhs).value ? 0 : 1;\n }",
"private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }",
"@Override\n\t\t\tpublic int compare(MyInteger arg0, MyInteger arg1) {\n\t\t\t\treturn arg0.getValue() - arg1.getValue();\n\t\t\t}",
"@Test\n public void test_kmin_Integer_Collection2() {\n populate_i2();\n int actual = Selector.kmin(i2, 2, new CompareIntegerDescending());\n int expected = 7;\n Assert.assertEquals(\"2nd minimum in descending comparator not found\", expected, actual);\n }",
"public int compare(int[] a, int[] b) {\n\t\t \treturn Integer.valueOf(a[0]).compareTo(Integer.valueOf(b[0]));\n\t\t }",
"@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\tString s1 = String.valueOf(o1) + String.valueOf(o2);\n\t\t\t\tString s2 = String.valueOf(o2) + String.valueOf(o1);\n\n\t\t\t\tif (Integer.valueOf(s1) > Integer.valueOf(s2)) {\n\t\t\t\t\ts1 = null;\n\t\t\t\t\ts2 = null;\n\t\t\t\t\treturn -1;\n\t\t\t\t} else if (Integer.valueOf(s1) < Integer.valueOf(s1)) {\n\t\t\t\t\ts1 = null;\n\t\t\t\t\ts2 = null;\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = null;\n\t\t\t\t\ts2 = null;\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}",
"public T caseIntegerComparisonExpression(IntegerComparisonExpression object) {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic int compareTo(MyInteger o) {\n\t\t\treturn -1*(this.num - o.num);\n\t\t}",
"@Override\n public int compare(Object arg0, Object arg1) {\n int a = arg0.hashCode();\n int b = arg1.hashCode();\n int accum;\n if (a == b) {\n accum = 0;\n } else if (a > b) {\n accum = 1;\n } else {\n accum = -1;\n }\n return accum;\n }",
"@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Test\n public void testSort_intArr_IntComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"public int compare(Long one, Long two){ return one.compareTo(two); }",
"int compare(T t1, T t2);",
"@Test\n public void compareFunctionalSmaller() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p2, p1);\n \n assertEquals(1, a);\n }",
"Comparator<? super K> comparator();",
"private int comparator(int u, int synapSum){\n\t\treturn synapSum >= u ? 1 : 0;\n\t}",
"@Override\n public int compare(Integer o1, Integer o2) {\n String s1 = o1.toString();\n String s2 = o2.toString();\n int s1Length = s1.length();\n int s2Length = s2.length();\n\n if (s1Length == s2Length) {\n //we want descending order\n return s2.compareTo(s1);\n }\n\n //find shortest\n if (s1Length < s2Length) {\n //we want descending order\n return compareInternal(s1, s2) * -1;\n } else {\n return compareInternal(s2, s1);\n }\n }",
"@Override\n public int compare(T a, T b) {\n for (Comparator<T> comparator : comparators) {\n int cmp = comparator.compare(a, b);\n\n if (cmp != 0) {\n return cmp;\n }\n }\n return 0;\n }",
"int compare(T o1, T o2);",
"public void testComparatorChainOnMinvaluedCompatator() {\n ComparatorChain chain = new ComparatorChain();\r\n chain.addComparator(\r\n new Comparator() {\r\n public int compare(Object a, Object b) {\r\n int result = ((Comparable)a).compareTo(b);\r\n if(result < 0) {\r\n return Integer.MIN_VALUE;\r\n } else if(result > 0) {\r\n return Integer.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n }, true);\r\n\r\n assertTrue(chain.compare(new Integer(4), new Integer(5)) > 0); \r\n assertTrue(chain.compare(new Integer(5), new Integer(4)) < 0); \r\n assertTrue(chain.compare(new Integer(4), new Integer(4)) == 0); \r\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic static void main(String[] args) {\n\t\t\r\n\t\tComparator integerComparator = (Object arg0, Object arg1) -> {\r\n\t\t\treturn ((Integer)arg0>(Integer)arg1)?-1:((Integer)arg0>(Integer)arg1)?1:0;\r\n\t\t};\r\n\t\t\r\n\t\tCollectionUtils utils = new CollectionUtils();\r\n\t\tList<Integer> list = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list, integerComparator);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\t\t\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list,(a,b)->(a>b)?-1:(a>b)?1:0);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list);\r\n\t\tSystem.out.println(\"After sorting in ascending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t}",
"public int compare(E a, E b) {\n // Complete this method.\n\t\treturn -1 * ((Map.Entry<String,Integer>)a).getValue().compareTo(((Map.Entry<String,Integer>)b).getValue());\n }",
"@Override\r\n\tpublic int compare(Entry<Integer, Integer> o1, Entry<Integer, Integer> o2) {\n\t\treturn o2.getValue().compareTo(o1.getValue());\r\n\t}",
"public int compare(int a, int b) {\n //System.err.println(\"compare \" + a + \" with \" + b);\n return comparer.compare((NodeInfo)sequence.itemAt(a),\n (NodeInfo)sequence.itemAt(b));\n }",
"public int compare(Object o1,Object o2) {\n\t\t\r\n\t\tString str1=o1.toString();\r\n\t\tString str2=o2.toString();\r\n\t\t/*if(int1<int2) {\r\n\t\t\treturn +10000;\r\n\t\t}else if(int1>int2) {\r\n\t\t\treturn -10000;\r\n\t\t}*/\r\n\t\t\r\n\t\treturn -str1.compareTo(str2);\r\n\t\t//return int1.compareTo(int2);\r\n\t}",
"public int compare(Object o1, Object o2) {\n\t\t\t\n\t\t\tint number1 = (Integer) o1;\n\t\t\tint number2 = (Integer) o2;\n\t\t\t\t\tint option1 = Integer.parseInt(number1+ \"\" + number2 + \"\");\n\t\t \n\t\t int option2 = Integer.parseInt(number2+ \"\" + number1 + \"\");\n\t\t \n\t\t\treturn option2 - option1;\n\t\t}",
"public int compareID(Integer o) {\n\t\treturn ((Integer) (applicant.getUserID())).compareTo(o);\n\n\t}",
"public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n assertEquals( Comparator.LESS, Util.objCompare(new Integer(10), new Integer(20)) );\n assertEquals( Comparator.GREATER, Util.objCompare(new Integer(25), new Integer(20)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(null,new Integer(1)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(new Integer(1),null) );\n }",
"@Override\n public int compareTo(BinaryType binarytype) {\n Integer binarytypevalue = Integer.valueOf(binarytype.asInt().getValue());\n Integer value = Integer.valueOf(this.asInt().getValue());\n return value.compareTo(binarytypevalue);\n }",
"public static int compare(final int previousResult, final Comparable object, final Comparable other)\n {\n return previousResult == 0 ? compare(object, other) : previousResult;\n }",
"public static interface ToInteger<T> {\n /**\n * What integer should we use for sorting purposes for\n * the given item?\n */\n int v(T item);\n }",
"public int compareTo(Object o) {\n return compareTo((MutableInteger) o);\n }",
"@Override\n public Comparator<Object> thenComparingInt(final ToIntFunction<?> p0) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.WildcardType.containsGenericParameters(WildcardType.java:55)\n // at com.strobel.assembler.metadata.TypeReference.containsGenericParameters(TypeReference.java:48)\n // at com.strobel.assembler.metadata.MethodReference.containsGenericParameters(MethodReference.java:79)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2497)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public interface Comparator extends ComparisonConstants {\n public int compare(Object a, Object b);\n}",
"@Override\n\tpublic int compareTo(CompType o) {\n\t\treturn (i<o.i ? -1 : (i == o.i ? 0 : 1));\n\t}",
"@Override\r\n public int compare(AlgebraicInteger numberA, AlgebraicInteger numberB) {\r\n return Long.compare(numberA.norm(), numberB.norm());\r\n }",
"public int comp(Integer x1, Integer x2, int num) {\n int x = (int) x1;\n int y = (int) x2;\n switch (num) {\n case 1:\n return x2 + x1;\n case 2:\n return x2 - x1;\n case 3:\n return x2 * x1;\n case 4:\n return x2 / x1;\n default:\n return Integer.MAX_VALUE;\n }\n }",
"public Comparator<? super P> comparator();",
"@Test\n public void test4() {\n Comparator<Integer> comparator = Integer::compare;\n }",
"@Test\n public void test_min_Integer_Collection1() {\n populate_i1();\n int actual = Selector.min(i1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Minimum not found\", expected, actual);\n }",
"private boolean comps(int a, int b){\n\t\tthis.comparisons.add(new Integer[]{a, b});\n\t\treturn true;\n\t}",
"int compFunction(int code) {\n return Math.abs(((3 * code + 8) % largePrime) % buckets.length);\n }",
"@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\n\t\t\t\treturn o1[1] - o2[1];\r\n\t\t\t}",
"public int compare(Entry<Integer, Integer> o1,\n\t\t\t\t\tEntry<Integer, Integer> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}"
] |
[
"0.7390451",
"0.711279",
"0.6709215",
"0.64979935",
"0.642665",
"0.6362322",
"0.627309",
"0.6186016",
"0.6161944",
"0.61581266",
"0.6156866",
"0.6151184",
"0.6143184",
"0.614032",
"0.61350226",
"0.61340374",
"0.6114377",
"0.6113438",
"0.6107447",
"0.60940003",
"0.60897475",
"0.60897446",
"0.6053341",
"0.6050879",
"0.6038861",
"0.60325897",
"0.6017983",
"0.6014228",
"0.60001343",
"0.5979153",
"0.59663016",
"0.59653765",
"0.59338766",
"0.58844936",
"0.58800054",
"0.58681566",
"0.58627784",
"0.5862515",
"0.58577555",
"0.58541095",
"0.5853463",
"0.58526546",
"0.5846614",
"0.5837278",
"0.5830576",
"0.58180773",
"0.5814935",
"0.58104306",
"0.5801798",
"0.5782324",
"0.57774764",
"0.5775316",
"0.57705986",
"0.5768402",
"0.57675564",
"0.5748636",
"0.57446295",
"0.574299",
"0.5736361",
"0.5736116",
"0.5726024",
"0.5687192",
"0.5674314",
"0.5669244",
"0.55912566",
"0.55779123",
"0.5576199",
"0.5564061",
"0.5559212",
"0.5555039",
"0.554502",
"0.5537994",
"0.55290765",
"0.5517491",
"0.55160856",
"0.54886067",
"0.54825073",
"0.5469167",
"0.5467552",
"0.54426914",
"0.54361117",
"0.54310834",
"0.5426626",
"0.5412565",
"0.5408894",
"0.54074496",
"0.5399837",
"0.53982395",
"0.5385496",
"0.5378557",
"0.5370203",
"0.5360717",
"0.53366923",
"0.5311124",
"0.53047305",
"0.5278238",
"0.52763903",
"0.5271434",
"0.5271288",
"0.5271194"
] |
0.7321866
|
1
|
Queue test. Note that this only currently works for queues that have unique values...If I have duplicate elements, this will blow up
|
@Test
public void basicQueueOfStacksTest() {
QueueOfStacks<String> tempQueue = new QueueOfStacks<String>();
String tempCurrentElement;
assertTrue("Element not in queue", tempQueue.isEmpty());
tempQueue.add("a");
assertTrue("Element not in queue", !tempQueue.isEmpty());
tempQueue.add("b");
assertTrue("Number of elements not correct", tempQueue.size() == 2);
tempCurrentElement = tempQueue.peek();
assertTrue("Element not correct", tempCurrentElement.equals("a"));
tempCurrentElement = tempQueue.remove();
assertTrue("Element not correct", tempCurrentElement.equals("a") &&
tempQueue.size() == 1);
tempQueue.add("c");
assertTrue("Number of elements not correct", tempQueue.size() == 2);
tempCurrentElement = tempQueue.remove();
assertTrue("Element not correct", tempCurrentElement.equals("b") &&
tempQueue.size() == 1 &&
!tempQueue.isEmpty());
tempCurrentElement = tempQueue.remove();
assertTrue("Element not correct", tempCurrentElement.equals("c") &&
tempQueue.size() == 0 &&
tempQueue.isEmpty());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void tester(APQueue<String> q) {\n q.push(\"c++\");\n q.push(\"python\");\n q.push(\"java\");\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.peek());\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.pop());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.peek());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.pop());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.peek());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.pop());\n System.out.println(\"Should be 0: \" + q.size());\n \n System.out.println();\n }",
"@Test\n public void testEnqueue() {\n Queue queue = new Queue();\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n queue.enqueue(testParams[3]);\n queue.enqueue(testParams[4]);\n queue.enqueue(testParams[5]);\n\n Object[] expResult = {testParams[1], testParams[2], testParams[3], testParams[4], testParams[5]};\n\n // call tested method\n Object[] actualResult = new Object[queue.getSize()];\n int len = queue.getSize();\n for(int i = 0; i < len; i++){\n actualResult[i] = queue.dequeue();\n }\n\n // compare expected result with actual result\n assertArrayEquals(expResult, actualResult);\n }",
"public static void main(String[] args) {\n// System.out.println(testQueue.getQueueElement());\n// System.out.println(testQueue.getQueueElement());\n }",
"@Test\n public void emptyFalseTest() {\n SimpleQueue<String> queue = new SimpleQueue<>();\n final String result = queue.push(this.work1);\n assertThat(false, is(queue.empty()));\n assertThat(\"work1\", is(result));\n }",
"public static void main(String[] args) {\n Queue<QueueData> q1 = new LinkedList<>();\n List<String> testArList = new ArrayList<>();\n testArList.add(0, \"1\");\n for (int i = 0; i < 10; i++){\n // ArrayList의 add와 같은 기능을 가졌다.\n // 하지만, 자료구조의 특성상, 특정 인덱스에 add하는 메소드는 없다.\n q1.add(new QueueData(i, (int) (Math.random() * 1000)));\n }\n System.out.println(q1);\n // peek() : 0번째 인덱스 즉 head에 해당하는 데이터를 살펴본다. 해당 데이터가 없을 경우\n // null이 출력된다. 검색된 데이터는 삭제되지 않고 그대로 남는다.\n System.out.println(q1.peek());\n System.out.println(\"peek\");\n System.out.println(q1);\n\n // element() : peek과 동일한 기능을 가졌지만, 차이점은 해당 데이터가 없을때,\n // 예외처리를 해준다.\n System.out.println(q1.element());\n System.out.println(\"element\");\n System.out.println(q1);\n\n // Enqueue : 추가\n q1.offer(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 예외발생\n System.out.println(\"offer\");\n System.out.println(q1);\n q1.add(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 false 리턴\n System.out.println(\"add\");\n System.out.println(q1);\n\n // Dequeue : 삭제\n q1.remove(); // 삭제 실패시, 예외 발생\n System.out.println(\"remove\");\n System.out.println(q1);\n System.out.println(\"poll\");\n q1.poll(); // 실패시 false 리턴\n System.out.println(q1);\n \n // 조건부 삭제\n System.out.println(\"remove if idx % 10 == 0\");\n q1.removeIf(queueData -> queueData.idx % 10 == 0);\n System.out.println(q1);\n\n // priority Queue(우선순위 큐)\n // 가장 가중치가 낮은 순서로 poll, peek()을 할 수 있는 자료구조다.\n // Min Heap로 데이터를 sort 시켜놓고 출력하는 자료구조.\n // 데이터의 크기를 뒤죽박죽 아무렇게 넣어도 의도에 따라 오름차순 혹은 내림차순으로\n // poll(), peek() 할 수 있다.\n Queue<QueueData> pQueue = new PriorityQueue<>();\n pQueue.add(new QueueData(0, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(9, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(2, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(5, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(4, (int) (Math.random() * 1000)));\n\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.remove()); // 더이상 삭제할 수 없을 때, 예외처리(프로그램 종료)\n System.out.println(pQueue.poll()); // 더이상 삭제할 수 없을 때, null 출력\n System.out.println(pQueue.size());\n }",
"@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }",
"@Test\n public void popTest() {\n assertThat(\"work1\", is(this.queue.pop()));\n assertThat(\"work2\", is(this.queue.peek()));\n }",
"@Test\n public void testAdd() throws Exception {\n this.queue = new HeapPriorityQueue<Person>(5); \n this.queue.add(new Person(\"Four\"), 4);\n this.queue.add(new Person(\"Five\"), 5);\n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = false; \n assertEquals(expectedResult, actualResult);\n }",
"public void test_2() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// clear the queue\n\t\ttheBSQ.clear();\n\n\t\tcheckEmptyness(theBSQ);\n\t}",
"public void test_1() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(theBSQ.isEmpty());\n\t\tassertTrue(!theBSQ.isFull());\n\n\t\t// Fill the Queue\n\t\tfor(int i = 0; i < theBSQ.capacity(); ++i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\ttheBSQ.add(new Integer(i));\n\t\t}\n\n\t\t// make sure the capacity doesn't evolve\n\t\tassertEquals(MAX_CAPACITY, theBSQ.capacity());\n\t\t// make sure the size is right after the filling loop\n\t\tassertEquals(theBSQ.capacity(), theBSQ.size());\n\t\t// make sure that the queue properties are right\n\t\tassertTrue(!theBSQ.isEmpty());\n\t\tassertTrue(theBSQ.isFull());\n\n\t\t// Empty the queue\n\t\tfor(int i = theBSQ.capacity(); i > 0 ; --i) {\n\t\t\tassertEquals(i, theBSQ.size());\n\t\t\tObject theObject = theBSQ.remove();\n\t\t\tassertEquals(theObject, new Integer(theBSQ.capacity()-i));\n\t\t}\n\n\t\tcheckEmptyness(theBSQ);\n\t}",
"@Test\n public void testDequeue() {\n Queue queue = new Queue();\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n\n Object[] expResult = {testParams[1], testParams[2]};\n\n // call tested method\n Object[] actualResult = new Object[queue.getSize()];\n int len = queue.getSize();\n for(int i = 0; i < len; i++){\n actualResult[i] = queue.dequeue();\n }\n\n // compare expected result with actual result\n assertArrayEquals(expResult, actualResult);\n }",
"public void test_3() throws Exception {\n\t\tfinal BoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\tThread theProducer = new Thread(\"Producer\") {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i = 0; i < MAX_CAPACITY * 1000; ++i) {\n\t\t\t\t\t\ttheBSQ.add(new Integer(i));\n//\t\t\t\t\t\tif(theBSQ.isFull()) {\n//\t\t\t\t\t\t\tSystem.err.println(\"theProducer: queue is full \" + theBSQ);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tfail(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tThread theConsumer = new Thread(\"Consumer\") {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tfor(int i = 0; i < MAX_CAPACITY * 1000; ++i) {\n\t\t\t\t\t\tInteger theInteger = (Integer)theBSQ.remove();\n\t\t\t\t\t\t// Consume the Integers, make sure they arrive in the same\n\t\t\t\t\t\t// order they where produced\n\t\t\t\t\t\tassertEquals(i, theInteger.intValue());\n//\t\t\t\t\t\tif(theBSQ.isEmpty()) {\n//\t\t\t\t\t\t\tSystem.err.println(theInteger);\n//\t\t\t\t\t\t\tSystem.err.println(\"theConsumer: queue is empty \");\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\tSystem.err.println(theInteger);\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception ex) {\n\t\t\t\t\tfail(ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheProducer.start();\n\t\ttheConsumer.start();\n\n\t\ttheProducer.join();\n\t\ttheConsumer.join();\n\n\t\t// Make sure avery and all Integers have been consumed\n\t\tcheckEmptyness(theBSQ);\n\t}",
"public static boolean testServingQueue() {\n // Reset the guest index\n Guest.resetNextGuestIndex();\n // Create a new serving queue with size of 4\n ServingQueue table = new ServingQueue(4);\n // Create 4 new guests\n Guest shihan = new Guest();\n Guest cheng = new Guest();\n Guest ruoxi = new Guest();\n Guest shen = new Guest();\n\n // Add them into the queue\n table.add(shihan);\n table.add(cheng);\n table.add(ruoxi);\n table.add(shen);\n\n // Check if the serving queue is empty\n if (table.isEmpty() != false) {\n System.out.println(\"Table is \" + table.isEmpty());\n return false;\n }\n // Check if shihan is the peek(front) of queue\n if (table.peek() != shihan) {\n System.out.println(\"Peek is \" + table.peek());\n return false;\n }\n // Try to remove peek\n table.remove();\n // Check the current peek\n if (table.peek() != cheng) {\n System.out.println(\"Peek is \" + table.peek());\n return false;\n }\n // Check table's list\n if (!table.toString().equals(\"[#2, #3, #4]\")) {\n System.out.println(table.toString());\n return false;\n }\n // Add shihan to the queue again\n table.add(shihan);\n // Check table's list again\n if (!table.toString().equals(\"[#2, #3, #4, #1]\")) {\n System.out.println(table.toString());\n return false;\n }\n // Remove all guests then check if the empty queue works well\n table.remove();\n table.remove();\n table.remove();\n table.remove();\n if (table.isEmpty() != true) {\n System.out.println(\"Table is \" + table.isEmpty());\n return false;\n }\n if (!table.toString().equals(\"[]\")) {\n System.out.println(table.toString());\n return false;\n }\n // Reset the guest index for next time or other classes' call\n Guest.resetNextGuestIndex();\n // No bug, return true;\n return true;\n }",
"@Test\n public void totalOfEmptyQueue(){\n // Arrange\n QueueOfPeople queueOfPeople = new QueueOfPeople(Arrays.asList());\n // Act\n // Assert\n assertEquals(0.0, queueOfPeople.getAmountOfPeopleWaiting(), 0.0);\n }",
"@Test\n @DisplayName(\"Testing offer StringQueue\")\n public void testOfferStringQueue() {\n assertEquals(queue.offer(\"Test\"), true);\n assertEquals(queue.offer(\"Test2\"), true);\n assertEquals(queue.offer(\"Test3\"), true);\n assertEquals(queue.offer(\"Test4\"), true);\n assertEquals(queue.offer(\"Test5\"), true);\n assertEquals(queue.offer(\"Test6\"), true);\n assertEquals(queue.offer(\"Test6\"), false);\n }",
"@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }",
"@Test (expected = QueueEmptyException.class)\n public void testRemoveMaxOnEmpty() {\n this.iPQ.remove();\n this.sPQ.remove();\n }",
"@Test\n @DisplayName(\"Testing element StringQueue\")\n public void testElementStringQueue() {\n assertThrows(NoSuchElementException.class, () -> {\n queue.element();\n });\n\n queue.offer(\"Test\");\n assertEquals(queue.element(), \"Test\");\n\n }",
"public static void main(String[] args) {\n Queue<Queue<Integer>> queues = new Queue<>(QUEUE_COUNT);\n // create and insert game queues\n for (int i = 0; i < QUEUE_COUNT; i++) {\n // our capacity is 7\n Queue<Integer> q = new Queue<>(QUEUE_CAPACITY);\n queues.enqueue(q);\n }\n\n boolean turn = true; // true -> player 1, false -> player 2\n boolean allFull;\n while (true) {\n allFull = true; // reset\n\n // user plays\n int randomQueue = randQueue();\n int randomNumber = randNumber();\n\n // if random selected queue is full, select another\n while (queues.elementAt(randomQueue).isFull())\n randomQueue = randQueue();\n\n // enqueue number to selected queue\n queues.elementAt(randomQueue).enqueue(randomNumber);\n\n // print current state to screen\n System.out.println(\"\\nUser\" + (turn ? 1 : 2) + \":\");\n for (int qi = 0; qi < QUEUE_COUNT; qi++) {\n Queue<Integer> q = queues.elementAt(qi);\n System.out.println(\"Q\" + (qi + 1) + \" \" + q.toString());\n }\n\n // SEQUENCES\n // =========\n\n // flag for indicating if any sequence is encountered during search\n boolean hasSequence = false;\n\n // HORIZONTAL SEQUENCES\n for (int i = 0; i < QUEUE_COUNT; i++) {\n Queue<Integer> q = queues.elementAt(i);\n if (q.size() < 3)\n continue;\n\n for (int j = 1; j < q.size() - 1; j++) {\n // skip first and last element and check through windows across queue, sized 3\n if (isSequence(q.elementAt(j - 1), q.elementAt(j), q.elementAt(j + 1))) {\n hasSequence = true;\n break;\n }\n }\n\n // already found a sequence? stop.\n if (hasSequence)\n break;\n }\n\n // no need to play further or check the terminal conditions\n if (hasSequence) {\n allFull = false;\n break;\n }\n\n // VERTICAL SEQUENCES\n\n // find smallest queue\n int minLength = 999;\n for (int i = 0; i < QUEUE_COUNT; i++)\n if (queues.elementAt(i).size() < minLength)\n minLength = queues.elementAt(i).size();\n\n for (int i = 0; i < minLength; i++) {\n if (isSequence(queues.elementAt(0).elementAt(i), queues.elementAt(1).elementAt(i), queues.elementAt(2).elementAt(i))) {\n hasSequence = true;\n break;\n }\n }\n\n if (hasSequence) {\n allFull = false;\n break;\n }\n\n // are queues full?\n for (int i = 0; i < QUEUE_COUNT; i++) {\n allFull = allFull && queues.elementAt(i).isFull();\n }\n\n if (allFull) {\n break;\n }\n\n turn = !turn;\n }\n\n System.out.println();\n if (allFull) {\n System.out.println(\"Tie!\");\n } else {\n System.out.println(\"winner: User\" + (turn ? 1 : 2));\n }\n }",
"public static void main(String[] args) {\n RandomizedQueue<Integer> rq = new RandomizedQueue<>();\n\n StdOut.println(rq.size());\n\n rq.enqueue(1);\n rq.enqueue(2);\n rq.enqueue(3);\n rq.enqueue(4);\n\n for (Integer i : rq) {\n StdOut.println(i);\n }\n\n StdOut.println(rq.isEmpty());\n\n StdOut.println(rq.sample());\n StdOut.println(rq.sample());\n StdOut.println(rq.size());\n\n StdOut.println(rq.dequeue());\n StdOut.println(rq.size());\n\n for (Integer i : rq) {\n StdOut.println(i);\n }\n\n StdOut.println(rq.dequeue());\n StdOut.println(rq.dequeue());\n StdOut.println(rq.dequeue());\n\n StdOut.println(rq.isEmpty());\n\n try {\n StdOut.println(rq.dequeue());\n } catch (java.util.NoSuchElementException exception) {\n StdOut.println(exception.getMessage());\n }\n }",
"@Test\n public void testPeek() {\n Queue queue = new Queue();\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n\n Object[] expResult = {testParams[1], testParams[1]};\n\n // call tested method\n Object[] actualResult = new Object[queue.getSize()];\n for(int i = 0; i < queue.getSize(); i++){\n actualResult[i] = queue.peek();\n }\n\n // compare expected result with actual result\n assertArrayEquals(expResult, actualResult);\n }",
"static int deQueue(Queue q) {\r\n int x;\r\n\r\n /* If both stacks are empty then error */\r\n if (q.stack1.isEmpty() && q.stack2.isEmpty()) {\r\n System.out.println(\"Q is empty\");\r\n System.exit(0);\r\n }\r\n\r\n /*\r\n * Move elements from stack1 to stack 2 only if\r\n * stack2 is empty\r\n */\r\n if (q.stack2.isEmpty()) {\r\n while (!q.stack1.isEmpty()) {\r\n x = pop(q.stack1);\r\n push(q.stack2, x);\r\n }\r\n }\r\n x = pop(q.stack2);\r\n return x;\r\n }",
"@Test\n public void test() {\n int queueSize = 10;\n\n String numbers[] = new String[queueSize];\n\n for (int i = 0; i < numbers.length; i++)\n numbers[i] = String.format(\"%02d\", ((int) (Math.random() * 100)));\n\n Queue queue = new CircularArrayQueue();\n\n // Fill the Circular Queue\n for (String number : numbers)\n queue.add(number);\n\n System.out.println(\"Queue Size: \" + queue.size());\n\n queue.print();\n\n String var = \"\";\n\n var = (String) queue.remove();\n\n System.out.println(\"Dequeue: \" + var + \" : new queue size: \" + queue.size());\n\n queue.add(var);\n System.out.println(\"Re-enqueue: \" + var + \" : new queue size: \" + queue.size());\n\n // Clear the Circular Queue\n while (queue.size() > 1)\n System.out.println(\"Dequeue: \" + queue.remove() + \" : New queue Size: \" + queue.size());\n\n System.out.println(\"Final Queue Size: \" + queue.size());\n }",
"@Test\n public void testGetSize() {\n Queue queue = new Queue();\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n queue.enqueue(testParams[1]);\n queue.enqueue(testParams[2]);\n\n int expResult = 4;\n\n // call tested method\n int actualResult = queue.getSize();\n\n // compare expected result with actual result\n assertEquals(expResult, actualResult);\n }",
"public void testContainsAll() {\n SynchronousQueue q = new SynchronousQueue();\n Integer[] empty = new Integer[0];\n assertTrue(q.containsAll(Arrays.asList(empty)));\n Integer[] ints = new Integer[1]; ints[0] = zero;\n assertFalse(q.containsAll(Arrays.asList(ints)));\n }",
"@Test\n public void testIsEmpty() {\n this.queue = new HeapPriorityQueue<Person>(5); \n boolean actualResult = this.queue.isEmpty();\n \n boolean expectedResult = true;\n \n assertEquals(expectedResult, actualResult);\n }",
"@Test\n public void peekTest() {\n assertThat(\"work1\", is(this.queue.peek()));\n }",
"public static void main(String[] args) {\n CircleArrayQueue circleArrayQueue = new CircleArrayQueue(4);\n circleArrayQueue.addQueue(1);\n circleArrayQueue.addQueue(2);\n circleArrayQueue.addQueue(3);\n System.out.println(circleArrayQueue.getQueue());\n circleArrayQueue.showQueue();\n// System.out.println(circleArrayQueue.getQueue());\n// System.out.println(circleArrayQueue.getQueue());\n circleArrayQueue.addQueue(4);\n circleArrayQueue.showQueue();\n\n System.out.println(circleArrayQueue.getQueue());\n circleArrayQueue.showQueue();\n\n circleArrayQueue.addQueue(5);\n circleArrayQueue.showQueue();\n System.out.println(circleArrayQueue.getQueue());\n circleArrayQueue.showQueue();\n\n circleArrayQueue.addQueue(5);\n circleArrayQueue.showQueue();\n// System.out.println(circleArrayQueue.getQueue());\n }",
"public static void main(String[] args) {\n int[] test = {1,2,3,4,5,6,7,8,9,10};\n Queue testing = new Queue(test);\n int[] pulled = new int[3];\n pulled[0] = testing.pop();\n pulled[1] = testing.pop();\n pulled[0] = testing.pop();\n System.out.println(\"pulled \" + pulled[0] + \" \" + pulled[1] + \" \" + pulled[2]);\n testing.push(pulled);\n testing.iter();\n }",
"@Test\n public void testMaxQueue() throws Throwable {\n internalMaxQueue(\"core\");\n internalMaxQueue(\"openwire\");\n internalMaxQueue(\"amqp\");\n }",
"void processQueue();",
"@Test\n public void shouldNotReadWholeStreamWithDefault() {\n final Queue<String> queue = new LinkedBlockingQueue<>();\n\n Executors.newCachedThreadPool().submit(() -> produceData(queue));\n\n final List<String> collected = queue.stream().collect(Collectors.toList());\n assertThat(collected, not(hasItems(\"0\", \"1\", \"2\", \"3\", \"4\")));\n }",
"void runQueue();",
"public void testEmptyFull() {\n SynchronousQueue q = new SynchronousQueue();\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }",
"@Test (timeout=5000)\n public void test2Queue() throws IOException {\n Configuration conf = getConfiguration();\n\n QueueManager manager = new QueueManager(conf);\n manager.setSchedulerInfo(\"first\", \"queueInfo\");\n manager.setSchedulerInfo(\"second\", \"queueInfoqueueInfo\");\n\n Queue root = manager.getRoot();\n \n // test children queues\n assertTrue(root.getChildren().size() == 2);\n Iterator<Queue> iterator = root.getChildren().iterator();\n Queue firstSubQueue = iterator.next();\n assertEquals(\"first\", firstSubQueue.getName());\n assertThat(\n firstSubQueue.getAcls().get(\"mapred.queue.first.acl-submit-job\")\n .toString()).isEqualTo(\n \"Users [user1, user2] and members of \" +\n \"the groups [group1, group2] are allowed\");\n Queue secondSubQueue = iterator.next();\n assertEquals(\"second\", secondSubQueue.getName());\n\n assertThat(firstSubQueue.getState().getStateName()).isEqualTo(\"running\");\n assertThat(secondSubQueue.getState().getStateName()).isEqualTo(\"stopped\");\n assertTrue(manager.isRunning(\"first\"));\n assertFalse(manager.isRunning(\"second\"));\n\n assertThat(firstSubQueue.getSchedulingInfo()).isEqualTo(\"queueInfo\");\n assertThat(secondSubQueue.getSchedulingInfo())\n .isEqualTo(\"queueInfoqueueInfo\");\n // test leaf queue\n Set<String> template = new HashSet<String>();\n template.add(\"first\");\n template.add(\"second\");\n assertEquals(manager.getLeafQueueNames(), template);\n }",
"public static void main(String[] args) {\n ArrayQueue<String> qu = new ArrayQueue<>();\n\n qu.enqueue(\"this\");\n System.out.println(qu);\n\n qu.enqueue(\"is\");\n System.out.println(qu);\n\n qu.enqueue(\"a\");\n System.out.println(qu);\n\n System.out.println(qu.dequeue());\n System.out.println(qu);\n\n qu.enqueue(\"queue\");\n System.out.println(qu);\n\n qu.enqueue(\"of\");\n System.out.println(qu);\n\n // qu.enqueue(\"strings\");\n // System.out.println(qu);\n\n\n while (!qu.isEmpty()) {\n System.out.println(qu.dequeue());\n System.out.println(qu);\n }\n\n }",
"public static void checkQueue(){\n if(Duel.getLobby().getQueue().size() >= 2){\n Duel.getGameManager().startingAGame();\n// for(Player player : Bukkit.getOnlinePlayers()){\n// if(Lobby.getQueue().get(0).equals(player.getUniqueId()) || Lobby.getQueue().get(1).equals(player.getUniqueId())){\n// Duel.getGameManager().startingAGame();\n// }\n// for(UUID uuid : Lobby.getQueue()){\n// Duel.getGameManager().startingAGame();\n// }\n }\n }",
"@Test\n public void testSetValidQueueItem() throws Exception {\n List<MediaSessionCompat.QueueItem> queue = QueueHelper.getPlayingQueueFromSearch(\n \" \", null, provider);\n\n int expectedItemIndex = queue.size() - 1;\n MediaSessionCompat.QueueItem expectedItem = queue.get(expectedItemIndex);\n // Latch for 3 tests\n CountDownLatch latch = new CountDownLatch(3);\n QueueManager queueManager = createQueueManagerWithValidation(latch, expectedItemIndex,\n queue);\n\n // test 1: set the current queue\n queueManager.setCurrentQueue(\"Queue 1\", queue);\n\n // test 2: set queue index to the expectedItem using its queueId\n assertTrue(queueManager.setCurrentQueueItem(expectedItem.getQueueId()));\n\n // test 3: set queue index to the expectedItem using its mediaId\n assertTrue(queueManager.setCurrentQueueItem(expectedItem.getDescription().getMediaId()));\n\n latch.await(5, TimeUnit.SECONDS);\n }",
"@Test\n @DisplayName(\"Testing poll StringQueue\")\n public void testPollStringQueue() {\n\n queue.offer(\"Test\");\n assertEquals(queue.poll(), \"Test\");\n\n assertEquals(queue.poll(), null);\n\n\n }",
"@Test\n @DisplayName(\"Testing peek StringQueue\")\n public void testPeekStringQueue() {\n assertEquals(queue.peek(), null);\n\n queue.offer(\"Test\");\n assertEquals(queue.peek(), \"Test\");\n\n }",
"public int useQueue(){\t\r\n\t\t//save the top of the queue\r\n\t\tint top = queue[0];\r\n\t\t//move the queue up 1 space\r\n\t\tfor (int x = 0; x < queue.length - 1; x++){\r\n\t\t\tqueue[x] = queue[x+1];\r\n\t\t}\r\n\t\t//generate a new value at the bottom of the queue\r\n\t\tqueue[queue.length-1] = random.nextInt(10);\r\n\t\treturn top;\r\n\t}",
"@Test\n public void emptyTrueTest() {\n SimpleQueue<String> queue = new SimpleQueue<>();\n assertThat(true, is(queue.empty()));\n }",
"public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}",
"public static void main(String[] args) {\n\t\t\n\t\tQueue<Test> q = new LinkedList<Test>();\n\t\tList<String> t = new ArrayList<String>();\n\t\tt.add(\"apple\");\n\t\tt.add(\"orange\");\n\t\tt.add(\"banana\");\n\t\tt.add(\"kiwi\");\n\t\tfor (int i=0; i <10; i++) {\n\t\t\tq.add(new Test(i, \"\"));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Show queue: \" +q);\n\t\tSystem.out.println();\n\t\tTest remove = q.remove();\n\t\tSystem.out.println(\"Removed queue: \" +remove);\n\t\t\n\t\tSystem.out.println(q);\n\t\tSystem.out.println();\n\t\t\n\t\tTest peek = q.peek();\n\t\tSystem.out.println(\"First in queue: \" +peek);\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tint size = q.size();\n\t\tSystem.out.println(\"Size of queue: \" +size);\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(\"Queue now: \" +q);\n\n\t\tSystem.out.println();\n\t\tTest poll = q.poll();\n\t\tSystem.out.println(\"Head of queue:\"+ poll);\n\t\t\n\t}",
"@Test\n public void testRemove() throws Exception {\n this.queue = new HeapPriorityQueue<Person>(5);\n this.queue.add(new Person(\"Four\"), 4);\n this.queue.add(new Person(\"Six\"), 6);\n this.queue.add(new Person(\"Nine\"), 9);\n this.queue.add(new Person(\"Three\"), 3);\n this.queue.remove();\n \n String actualResult = this.queue.toString();\n\n String expectedResult = \"[(Nine, 9), (Four, 4), (Three, 3)]\"; \n assertEquals(expectedResult, actualResult);\n }",
"public static void main(String[] args) {\n\t\tQueue<Integer> q = new Queue<>(10);\n\t\tfor(int i=0; i<10; i++){\n\t\t\tq.enqueue(i);\n\t\t}\n\t\tSystem.out.println(q.isEmpty());\n\t}",
"@Test\n @DisplayName(\"Testing remove StringQueue\")\n public void testRemoveStringQueue() {\n queue.offer(\"Test\");\n assertEquals(queue.remove(), \"Test\");\n\n assertThrows(NoSuchElementException.class, () -> {\n queue.remove();\n });\n }",
"@Test(timeout = SECOND)\n public void testRemoveMinAndPeekMinCombo() {\n IPriorityQueue<Integer> testQ = makeInstance();\n for (int i = 1000; i > 0; i--) {\n testQ.insert(i);\n }\n int qSize = 1000;\n for (int i = 1; i <= 1000; i++) {\n int min = testQ.peekMin();\n assertEquals(i, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(--qSize, testQ.size());\n }\n // duplication test\n testQ.insert(2);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(2);\n\n for (int i = 5; i > 1; i--) {\n int min = testQ.peekMin();\n assertEquals(1, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(i, testQ.size());\n }\n for (int i = 1; i >= 0; i--) {\n int min = testQ.peekMin();\n assertEquals(2, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(i, testQ.size());\n }\n }",
"public void testFairEmptyFull() {\n SynchronousQueue q = new SynchronousQueue(true);\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }",
"public static void main(String[] args) {\n\t\tCreate_queue new_queue= new Create_queue();\n\t\tnew_queue.enqueu(12);\n\t\tnew_queue.enqueu(5);\n\t\tnew_queue.enqueu(36);\n\t\tnew_queue.enqueu(5);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(10);\n\t\tnew_queue.enqueu(8);\n\t\tnew_queue.enqueu(2);\n\t\tnew_queue.enqueu(14);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(32);\n\t\tnew_queue.enqueu(11);\n\t\tnew_queue.enqueu(21);\n\t\tnew_queue.enqueu(44);\n\t\tnew_queue.enqueu(46);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(50);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(100);\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue.peek());\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue.peek());\n\t\t\n\t\t\n\t}",
"@Test (expected = QueueEmptyException.class)\n public void testPeekOnEmpty() {\n this.iPQ.peek();\n this.sPQ.peek();\n }",
"private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }",
"public boolean isQueueEmpty(Queue objQueue){\r\n\t\treturn objQueue.getRare()==-1;\r\n\t}",
"private void workOnQueue() {\n }",
"@Test\n public void searchFalseTest() {\n assertThat(-1, is(this.queue.search(\"work5\")));\n }",
"public interface Queue {\n /***** Setting class functions *******/\n\n /* Add element to end of queue function\n * PRE: elem != null && queue != null\n * POST: queue[size] = elem && size` = size + 1 && other imutabled\n */\n void enqueue(Object elem);\n\n /* Delete and return first element in queue function\n * PRE: size > 0\n * POST: R = queue[0] && queue[i] = queue[i + 1] && size` = size - 1 && other imutabled\n */\n Object dequeue();\n\n /* Add element to begin of queue\n * PRE: elem != null\n * POST: queue[i] = queue[i - 1](size >= i > 0) && queue[0] = elem && size` = size + 1 && other imutabled\n */\n void push(Object elem);\n\n /* Delete and return last element in queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && size` = size - 1 && other imutabled\n */\n Object remove();\n\n /***** Getting class functions *******/\n\n /* Get first element of queue function\n * PRE: size > 0\n * POST: R = queue[0] && all elements imutabled\n */\n Object element();\n\n /* Get last element of queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && all elements imutabled\n */\n Object peek();\n\n /* Get size function\n * PRE: True\n * POST: R = size && all imutabled\n */\n int size();\n\n /* Check for empty queue function\n * PRE: True\n * POST: R = (size == 0) && all imutabled\n */\n boolean isEmpty();\n\n /* Delete all elements from queue function\n * PRE: True\n * POST: size = 0\n */\n void clear();\n\n /******* Modification *******/\n /* Create queue with elements like predicate\n * PRE: correct predicate && queue != null\n * POST: all imutabled && R = {R[0]...R[new_size] : new_size <= size && predicate(R[i]) = 1 && R - the same type of queue}\n * : && exist sequence i[0] ... i[k] (i[0] < ... < i[k]) : R[it] = queue[i[it]](0 <= it < k) && k - max\n */\n Queue filter(Predicate predicate);\n\n /* Create queue with elements like predicate\n * PRE: correct function && queue != null\n * POST: all imutabled && R = {y[i] | y[i] = function(queue[i])} size(R) = size(queue) && R is the same type of queue\n */\n Queue map(Function function);\n}",
"public void testAdd() {\n\ttry {\n SynchronousQueue q = new SynchronousQueue();\n assertEquals(0, q.remainingCapacity());\n q.add(one);\n shouldThrow();\n } catch (IllegalStateException success){\n\t}\n }",
"@Test\n public void searchTrueTest() {\n assertThat(4, is(this.queue.search(\"work4\")));\n assertThat(1, is(this.queue.search(\"work1\")));\n }",
"@Test\n public void totalOfSinglePersonWaiting(){\n // Arrange\n QueueOfPeople queueOfPeople = new QueueOfPeople(Arrays.asList(new Person(\"Dude McGuyson\")));\n // Act\n // Assert\n assertEquals(1.0, queueOfPeople.getAmountOfPeopleWaiting(), 0.0);\n }",
"public abstract int getQueueLength();",
"myQueue(int size){\n }",
"public boolean isFull() { return front == (rear + 1) % MAX_QUEUE_SIZE; }",
"public int getQueuePosition();",
"public static void main(String[] args) {\n\n\n QueueClass queueClass = new QueueClass();\n\n queueClass.addToQueue(33);\n queueClass.addToQueue(44);\n queueClass.addToQueue(24);\n queueClass.addToQueue(68);\n\n System.out.println(\"_________\");\n queueClass.showFirstNumber();\n System.out.println(\"_________\");\n queueClass.removeFromQueue();\n System.out.println(\"_________\");\n queueClass.showSize();\n System.out.println(\"_________\");\n queueClass.isItEmpty();\n\n }",
"public static void main(String[] args) {\n\t\t\n\t\tQueue queue = new Queue();\n\t\t\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Testing Queue.isEmpty() -> Is the list empty? - \" + queue.isEmpty());\n\n\t\t\tqueue.enqueue(\"Number 1\");\n\t\t\tqueue.enqueue(\"Number 2\");\n\t\t\tqueue.enqueue(\"Number 3\");\n\t\t\tqueue.enqueue(\"Number 4\");\n\t\t\t\n\t\t\tSystem.out.println(\"Testing Queue.enqueue() and Queue.size() -> Size after enqueued three objects = \" + queue.size());\n\t\t\tSystem.out.println(\"Testing Queue.dequeue() and Queue.size() -> Size after dequeued \" + queue.dequeue() + \" = \" + queue.size());\n\t\t\tSystem.out.println(\"Testing Queue.first() -> The first object in the list is: \" + queue.first());\n\t\t\tSystem.out.println(\"Testing Queue.last() -> The last object in the list is: \" + queue.last());\n\t\t\tSystem.out.println(\"Testing Queue.contains() -> Does the object 'Number 2' \" + \"exist? - \" + queue.contains(\"Number 2\"));\n\t\t\tSystem.out.print(\"Testing Queue.iterator() -> The list contains the following objects: \");\n\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tIterator iterator = queue.iterator();\n\t\t\t\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tSystem.out.print(iterator.next());\n\t\t\t}\n\t\t\t\n\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"@Test (timeout=5000)\n public void testQueue() throws IOException {\n File f = null;\n try {\n f = writeFile();\n\n QueueManager manager = new QueueManager(f.getCanonicalPath(), true);\n manager.setSchedulerInfo(\"first\", \"queueInfo\");\n manager.setSchedulerInfo(\"second\", \"queueInfoqueueInfo\");\n Queue root = manager.getRoot();\n assertThat(root.getChildren().size()).isEqualTo(2);\n Iterator<Queue> iterator = root.getChildren().iterator();\n Queue firstSubQueue = iterator.next();\n assertEquals(\"first\", firstSubQueue.getName());\n assertEquals(\n firstSubQueue.getAcls().get(\"mapred.queue.first.acl-submit-job\")\n .toString(),\n \"Users [user1, user2] and members of the groups [group1, group2] are allowed\");\n Queue secondSubQueue = iterator.next();\n assertEquals(\"second\", secondSubQueue.getName());\n assertThat(secondSubQueue.getProperties().getProperty(\"key\"))\n .isEqualTo(\"value\");\n assertThat(secondSubQueue.getProperties().getProperty(\"key1\"))\n .isEqualTo(\"value1\");\n // test status\n assertThat(firstSubQueue.getState().getStateName())\n .isEqualTo(\"running\");\n assertThat(secondSubQueue.getState().getStateName())\n .isEqualTo(\"stopped\");\n\n Set<String> template = new HashSet<String>();\n template.add(\"first\");\n template.add(\"second\");\n assertEquals(manager.getLeafQueueNames(), template);\n\n // test user access\n\n UserGroupInformation mockUGI = mock(UserGroupInformation.class);\n when(mockUGI.getShortUserName()).thenReturn(\"user1\");\n String[] groups = { \"group1\" };\n when(mockUGI.getGroupNames()).thenReturn(groups);\n assertTrue(manager.hasAccess(\"first\", QueueACL.SUBMIT_JOB, mockUGI));\n assertFalse(manager.hasAccess(\"second\", QueueACL.SUBMIT_JOB, mockUGI));\n assertFalse(manager.hasAccess(\"first\", QueueACL.ADMINISTER_JOBS, mockUGI));\n when(mockUGI.getShortUserName()).thenReturn(\"user3\");\n assertTrue(manager.hasAccess(\"first\", QueueACL.ADMINISTER_JOBS, mockUGI));\n\n QueueAclsInfo[] qai = manager.getQueueAcls(mockUGI);\n assertThat(qai.length).isEqualTo(1);\n // test refresh queue\n manager.refreshQueues(getConfiguration(), null);\n\n iterator = root.getChildren().iterator();\n Queue firstSubQueue1 = iterator.next();\n Queue secondSubQueue1 = iterator.next();\n // tets equal method\n assertThat(firstSubQueue).isEqualTo(firstSubQueue1);\n assertThat(firstSubQueue1.getState().getStateName())\n .isEqualTo(\"running\");\n assertThat(secondSubQueue1.getState().getStateName())\n .isEqualTo(\"stopped\");\n\n assertThat(firstSubQueue1.getSchedulingInfo())\n .isEqualTo(\"queueInfo\");\n assertThat(secondSubQueue1.getSchedulingInfo())\n .isEqualTo(\"queueInfoqueueInfo\");\n\n // test JobQueueInfo\n assertThat(firstSubQueue.getJobQueueInfo().getQueueName())\n .isEqualTo(\"first\");\n assertThat(firstSubQueue.getJobQueueInfo().getState().toString())\n .isEqualTo(\"running\");\n assertThat(firstSubQueue.getJobQueueInfo().getSchedulingInfo())\n .isEqualTo(\"queueInfo\");\n assertThat(secondSubQueue.getJobQueueInfo().getChildren().size())\n .isEqualTo(0);\n // test\n assertThat(manager.getSchedulerInfo(\"first\")).isEqualTo(\"queueInfo\");\n Set<String> queueJobQueueInfos = new HashSet<String>();\n for(JobQueueInfo jobInfo : manager.getJobQueueInfos()){\n \t queueJobQueueInfos.add(jobInfo.getQueueName());\n }\n Set<String> rootJobQueueInfos = new HashSet<String>();\n for(Queue queue : root.getChildren()){\n \t rootJobQueueInfos.add(queue.getJobQueueInfo().getQueueName());\n }\n assertEquals(queueJobQueueInfos, rootJobQueueInfos);\n // test getJobQueueInfoMapping\n assertThat(manager.getJobQueueInfoMapping().get(\"first\").getQueueName())\n .isEqualTo(\"first\");\n // test dumpConfiguration\n Writer writer = new StringWriter();\n\n Configuration conf = getConfiguration();\n conf.unset(DeprecatedQueueConfigurationParser.MAPRED_QUEUE_NAMES_KEY);\n QueueManager.dumpConfiguration(writer, f.getAbsolutePath(), conf);\n String result = writer.toString();\n assertTrue(result\n .indexOf(\"\\\"name\\\":\\\"first\\\",\\\"state\\\":\\\"running\\\",\\\"acl_submit_job\\\":\\\"user1,user2 group1,group2\\\",\\\"acl_administer_jobs\\\":\\\"user3,user4 group3,group4\\\",\\\"properties\\\":[],\\\"children\\\":[]\") > 0);\n\n writer = new StringWriter();\n QueueManager.dumpConfiguration(writer, conf);\n result = writer.toString();\n assertTrue(result.contains(\"{\\\"queues\\\":[{\\\"name\\\":\\\"default\\\",\\\"state\\\":\\\"running\\\",\\\"acl_submit_job\\\":\\\"*\\\",\\\"acl_administer_jobs\\\":\\\"*\\\",\\\"properties\\\":[],\\\"children\\\":[]},{\\\"name\\\":\\\"q1\\\",\\\"state\\\":\\\"running\\\",\\\"acl_submit_job\\\":\\\" \\\",\\\"acl_administer_jobs\\\":\\\" \\\",\\\"properties\\\":[],\\\"children\\\":[{\\\"name\\\":\\\"q1:q2\\\",\\\"state\\\":\\\"running\\\",\\\"acl_submit_job\\\":\\\" \\\",\\\"acl_administer_jobs\\\":\\\" \\\",\\\"properties\\\":[\"));\n assertTrue(result.contains(\"{\\\"key\\\":\\\"capacity\\\",\\\"value\\\":\\\"20\\\"}\"));\n assertTrue(result.contains(\"{\\\"key\\\":\\\"user-limit\\\",\\\"value\\\":\\\"30\\\"}\"));\n assertTrue(result.contains(\"],\\\"children\\\":[]}]}]}\"));\n // test constructor QueueAclsInfo\n QueueAclsInfo qi = new QueueAclsInfo();\n assertNull(qi.getQueueName());\n\n } finally {\n if (f != null) {\n f.delete();\n }\n }\n }",
"public void testGetQueue() throws NoSuchMethodException {\n DebianTestService debianTestService = new DebianTestService();\n Method asyncMethod = debianTestService.getClass().getMethod(\"calculateDebianMetadataInternalAsync\");\n Method syncMethod = debianTestService.getClass().getMethod(\"calculateDebianMetadataInternalSync\");\n Method mvnMethod = debianTestService.getClass().getMethod(\"calculateMavenMetadataAsync\");\n\n AsyncWorkQueueServiceImpl workQueueService = new AsyncWorkQueueServiceImpl();\n // request workqueue for both methods, expecting both to return the same queue object\n WorkQueue<WorkItem> asyncQueue = workQueueService.getWorkQueue(asyncMethod, debianTestService);\n WorkQueue<WorkItem> syncQueue = workQueueService.getWorkQueue(syncMethod, debianTestService);\n WorkQueue<WorkItem> mvnQueue = workQueueService.getWorkQueue(mvnMethod, debianTestService);\n // the comparision should not be by the content, but by the reference!\n assertTrue(asyncQueue == syncQueue);\n // make sure the maven queue is not the same as the debian\n assertTrue(asyncQueue != mvnQueue);\n\n // validate the queues map content\n Map<String, WorkQueue<WorkItem>> queues = workQueueService.getExistingWorkQueues();\n assertEquals(queues.size(), 3);\n assertNotEquals(queues.get(\"calculateDebianMetadataInternalAsync\"), null);\n // the comparision should not be by the content, but by the reference! we expect the queue to have two keys, each key points on the same object\n assertTrue(queues.get(\"calculateDebianMetadataInternalAsync\") == queues.get(\"calculateDebianMetadataInternalSync\"));\n // make sure the maven queue is not the same as the debian\n assertTrue(queues.get(\"mvnQueue\") != queues.get(\"calculateDebianMetadataInternalAsync\"));\n }",
"public static String deQueue(Queue q){ \n String front = q.names[0]; //Store the front element to be returned and printed if wanted \n if (q.queuesize != 0){ //IF the queue is not empty \n for (int i = 0; i < q.queuesize; i++){ //For the all of the non zero elements in the queue\n q.names[i] = q.names[i+1]; // Overwrite the first element to get rid of it and shove all of the others up 1\n }\n q.queuesize -=1; //Decrease the size by 1 as someone left \n }\n else{\n System.out.print(\"Empty Queue\"); //State the queue is empty and nothing can be removed\n }\n return front; //Return the element that was once in front - This can be printed \n }",
"public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}",
"public void printQueue();",
"@Test\n public void test0() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1115,\"org.apache.commons.collections4.queue.AbstractQueueDecoratorEvoSuiteTest.test0\");\n PriorityQueue<Integer> priorityQueue0 = new PriorityQueue<Integer>();\n Queue<Integer> queue0 = UnmodifiableQueue.unmodifiableQueue((Queue<Integer>) priorityQueue0);\n boolean boolean0 = priorityQueue0.addAll((Collection<? extends Integer>) queue0);\n assertEquals(false, boolean0);\n }",
"@Test\n\tpublic void testModifyingQueues() throws IOException, InvalidHeaderException, InterruptedException, ExecutionException {\n\t\tfinal String[] names = { \"queue 1\", \"queue 2\", \"queue 3\", \"queue 4\", \"queue 5\", \"queue 6\" };\n\t\tfinal Status[] results = { Status.SUCCESS, Status.SUCCESS, Status.SUCCESS, Status.QUEUE_NOT_EMPTY, Status.QUEUE_EXISTS, \n\t\t\t\tStatus.QUEUE_NOT_EXISTS };\n\t\t\n\t\tFuture<Boolean> result = service.submit(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < names.length; i ++) {\n\t\t\t\t\tboolean result = i > 2 ? false : true; \n\t\t\t\t\t\n\t\t\t\t\tif (i % 2 == 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tassertEquals(result, client.CreateQueue(names[i]));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tfail(\"Exception was thrown\");\n\t\t\t\t\t\t} \n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tassertEquals(result, client.DeleteQueue(names[i]));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tfail(\"Exception was thrown\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, Boolean.TRUE);\n\t\t\n\t\tQueueModificationRequest request;\n\t\t// Get the request\n\t\tfor (int i = 0; i <names.length; i++) {\n\t\t\trequest = (QueueModificationRequest) this.getMessage(channel);\n\t\t\tassertEquals(names[i], request.getQueueName());\n\t\t\tthis.sendMessage(new RequestResponse(results[i]), channel);\n\t\t}\n\t\t\n\t\t\n\t\tresult.get();\n\t}",
"public static void main(String[] args) {\n\t\tQueue<Integer> queue = new LinkedList<>();\r\n\r\n for (int i=0;i<5;i++) {\r\n \tqueue.add(i);\r\n }\r\n \r\n System.out.println(\"Elements in queue: \" + queue);\r\n\r\n int objectRemoved = queue.remove();\r\n System.out.println(\"Removed Object from the Queue: \" + objectRemoved);\r\n\r\n \r\n int headQueue = queue.peek();\r\n System.out.println(\"Head of queue: \" + headQueue);\r\n\r\n int queueSize = queue.size();\r\n System.out.println(\"Size of queue: \" + queueSize);\t\r\n\r\n\t\t \r\n\t}",
"protected static NotificationTypes notQueueCheck() {\n return !notQueue.isEmpty() ? notQueue.remove(0) : NotificationTypes.NIL;\n }",
"public boolean isQueueFull(Queue objQueue){\r\n\t\treturn objQueue.getRare()==objQueue.getArrOueue().length;\r\n\t}",
"public static void main(String args[]) {\r\n /* Create a queue with items 1 2 3 */\r\n Queue q = new Queue();\r\n q.stack1 = new Stack<>();\r\n q.stack2 = new Stack<>();\r\n enQueue(q, 1);\r\n enQueue(q, 2);\r\n enQueue(q, 3);\r\n\r\n /* Dequeue items */\r\n System.out.print(deQueue(q) + \" \");\r\n System.out.print(deQueue(q) + \" \");\r\n System.out.println(deQueue(q) + \" \");\r\n }",
"private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}",
"public static void main(String[] args) {\n\t\tQueueLL q=new QueueLL();\n\t\tq.enqueue(1);\n\t\tq.enqueue(2);\n\t\tq.enqueue(3);\n\t\t\n\t\tSystem.out.println(q.isEmpty());\n\t\tSystem.out.println(q.dequeue());\n\t\tSystem.out.println(q.dequeue());\n\t\tSystem.out.println(q.dequeue());\n\t\tSystem.out.println(q.isEmpty());\n\n\t}",
"public interface QueueInterface {\r\n Object dequeue() throws QueueUnderflowException;\r\n // Throws QueueUnderflowException if this queue is empty,\r\n // otherwise removes top element from this queue.\r\n \r\n \r\n boolean isEmpty();\r\n // Returns true if this queuea is empty, otherwise returns false.\r\n\r\n}",
"@DISPID(112)\r\n\t// = 0x70. The runtime will prefer the VTID if present\r\n\t@VTID(107)\r\n\tjava.lang.String queue();",
"@Test\r\n\tpublic void permutationsTestSize2() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tassertEquals(\"Permutations output\",\"[[1, 2], [2, 1]]\",\tbq.permutations().toString());\r\n\t}",
"@Test\r\n\tpublic void permutationsTestSize5() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tbq.enqueue(3);\r\n\t\tbq.enqueue(4);\r\n\t\tbq.enqueue(5);\r\n\t\tbq.permutations();\r\n\t}",
"@Test\n public void testQueueCodeExamples() throws Exception {\n logger.info(\"Beginning testQueueCodeExamples()...\");\n\n // Allocate an empty queue\n Queue<Integer> queue = new Queue<>(256); // capacity of 256 elements\n\n // Start up some consumers\n Consumer consumer1 = new Consumer(queue);\n new Thread(consumer1).start();\n Consumer consumer2 = new Consumer(queue);\n new Thread(consumer2).start();\n\n // Start up a producer\n Producer producer = new Producer(queue);\n new Thread(producer).start();\n\n // Wait for them to process the messages\n Thread.sleep(200);\n\n logger.info(\"Completed testQueueCodeExamples().\\n\");\n }",
"public static boolean testInsertWaitingProcessQueue() {\r\n\t\tWaitingProcessQueue queue = new WaitingProcessQueue();\r\n\t\tCustomProcess process1 = new CustomProcess(10);\r\n\t\tCustomProcess process2 = new CustomProcess(2);\r\n\t\tCustomProcess process3 = new CustomProcess(5);\r\n\t\tCustomProcess process4 = new CustomProcess(3);\r\n\t\tCustomProcess process5 = new CustomProcess(1);\r\n\t\tqueue.insert(process1);\r\n\t\tqueue.insert(process2);\r\n\t\tqueue.insert(process3);\r\n\t\tqueue.insert(process4);\r\n\t\tqueue.insert(process5);\r\n\r\n\t\tif (queue.size() != 5)\r\n\t\t\treturn false;\r\n\t\tif (queue.peekBest() != process5)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}",
"public void dequeue() {\n\t\tObject ret_val = todequeue();\n\t\tif(ret_val == null)\n\t\t\tSystem.out.println(\"The queue is empty\");\n\t\telse\n\t\t\tSystem.out.println(\"Removed: \" + ret_val);\n\t}",
"public void testPoll() {\n SynchronousQueue q = new SynchronousQueue();\n\tassertNull(q.poll());\n }",
"int getQueueSize();",
"public static void main(String[] args) {\n Queue<Integer> q = new LinkedList<Integer>();\n q.add(10);\n q.add(5);\n q.add(15);\n System.out.println(q.peek());\n System.out.println(q.poll());\n System.out.println(q.peek());\n System.out.println(q.size());\n }",
"@Test\n\tpublic void testFetchingQueues() throws IOException, InvalidHeaderException, InterruptedException, ExecutionException {\n\t\tfinal String[][] results = new String[][] {\n\t\t\tnew String[] { \"queue 1\", \"queue 2\" },\n\t\t\tnew String[] { \"queue 3\" },\n\t\t\tnull\n\t\t};\n\t\t\n\t\tFuture<Boolean> result = service.submit(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < results.length; i ++) {\n\t\t\t\t\tArrayList<String> queues = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tqueues = (ArrayList<String>) client.GetWaitingQueues();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tfail(\"Exception was thrown.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (i == 2) assertEquals(results[i], queues);\n\t\t\t\t\telse {\n\t\t\t\t\t\tassertEquals(results[i].length, queues.size());\n\t\t\t\t\t\tfor (int j = 0; j < queues.size(); j++) {\n\t\t\t\t\t\t\tassertEquals(results[i][j], queues.get(j));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}, Boolean.TRUE);\n\t\t\n\t\t// Get the request\n\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\tassertTrue(this.getMessage(channel) instanceof GetQueuesRequest);\n\t\t\tthis.sendMessage(i == 2 \n\t\t\t\t\t? new RequestResponse(Status.EXCEPTION) \n\t\t\t\t\t: new GetQueuesResponse(Arrays.asList(results[i])), channel);\n\t\t}\t\t\n\t\t\n\t\tresult.get();\n\t}",
"public void test_4() throws Exception {\n\t\tBoundedSharedQueue theBSQ = new BoundedSharedQueue(MAX_CAPACITY);\n\n\t\ttry {\n\t\t\ttheBSQ.add(null); // null is not an accepted value\n\t\t\tfail(\"should throw an IllegalArgumentException\");\n\t\t}\n\t\tcatch(IllegalArgumentException ex) {\n\t\t\t// OK\n\t\t}\n\t}",
"public boolean isQueue() {\n return this == QUEUE;\n }",
"@Test\n public void testToString() throws Exception {\n this.queue = new HeapPriorityQueue<Person>(5); \n this.queue.add(new Person(\"Four\"), 4);\n this.queue.add(new Person(\"Five\"), 5);\n String actualResult = this.queue.toString();\n String expectedResult = \"[(Five, 5), (Four, 4)]\";\n assertEquals(expectedResult, actualResult);\n }",
"@Test\n\tpublic void queueListTest() throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\tif (Configuration.featureamp &&\n\t\t\t\tConfiguration.playengine &&\n\t\t\t\tConfiguration.choosefile &&\n\t\t\t\tConfiguration.mp3 &&\n\t\t\t\tConfiguration.gui &&\n\t\t\t\tConfiguration.skins &&\n\t\t\t\tConfiguration.light &&\n\t\t\t\tConfiguration.filesupport &&\n\t\t\t\tConfiguration.showtime &&\n\t\t\t\tConfiguration.tracktime &&\n\t\t\t\tConfiguration.progressbar &&\n\t\t\t\tConfiguration.saveandloadplaylist &&\n\t\t\t\tConfiguration.playlist && \n\t\t\t\tConfiguration.removetrack &&\n\t\t\t\tConfiguration.clearplaylist &&\n\t\t\t\tConfiguration.queuetrack\n\t\t\t\t) {\n\n\t\t\tstart();\n\n\t\t\tFile file = new File(\"p1.m3u\");\n\t\t\tdemo.menuItemWithPath(\"Datei\", \"Playlist laden\").click();\n\t\t\tdemo.fileChooser().setCurrentDirectory(new File(\"media/\"));\n\t\t\tdemo.fileChooser().selectFile(file);\n\t\t\tdemo.fileChooser().approveButton().click();\n\t\t\tdemo.list(\"p_list\").clickItem(1);\n\t\t\tdemo.button(\"right\").click();\n\t\t\t\n\t\t\tgui.skiptrack();\n\t\t\tdemo.list(\"p_list\").clickItem(0);\n\t\t\tdemo.list(\"p_list\").clickItem(0);\n\t\t\tdemo.button(\"right\").click();\n\t\t\tgui.skiptrack();\n\n\t\t\tdemo.list(\"queueLis\").clickItem(1);\n\t\t\tdemo.button(\"left\").click();\n\t\t\tgui.skiptrack();\n\n\t\t\tdemo.list(\"queueLis\").clickItem(0);\n\t\t\tdemo.button(\"left\").click();\n\t\t\tgui.skiptrack();\n\n\t\t}\n\t}",
"@Override\n public boolean isEmpty() {\n return queue.isEmpty();\n }",
"@Test\n public void testAutoCreateQueueAfterRemoval() throws Exception {\n startScheduler();\n\n createBasicQueueStructureAndValidate();\n\n // Under e, there's only one queue, so e1/e have same capacity\n CSQueue e1 = cs.getQueue(\"root.e-auto.e1-auto\");\n Assert.assertEquals(1 / 5f, e1.getAbsoluteCapacity(), 1e-6);\n Assert.assertEquals(1f, e1.getQueueCapacities().getWeight(), 1e-6);\n Assert.assertEquals(240 * GB,\n e1.getQueueResourceQuotas().getEffectiveMinResource().getMemorySize());\n\n // Check after removal e1.\n cs.removeQueue(e1);\n CSQueue e = cs.getQueue(\"root.e-auto\");\n Assert.assertEquals(1 / 5f, e.getAbsoluteCapacity(), 1e-6);\n Assert.assertEquals(1f, e.getQueueCapacities().getWeight(), 1e-6);\n Assert.assertEquals(240 * GB,\n e.getQueueResourceQuotas().getEffectiveMinResource().getMemorySize());\n\n // Check after removal e.\n cs.removeQueue(e);\n CSQueue d = cs.getQueue(\"root.d-auto\");\n Assert.assertEquals(1 / 4f, d.getAbsoluteCapacity(), 1e-6);\n Assert.assertEquals(1f, d.getQueueCapacities().getWeight(), 1e-6);\n Assert.assertEquals(300 * GB,\n d.getQueueResourceQuotas().getEffectiveMinResource().getMemorySize());\n\n // Check after removal d.\n cs.removeQueue(d);\n CSQueue c = cs.getQueue(\"root.c-auto\");\n Assert.assertEquals(1 / 3f, c.getAbsoluteCapacity(), 1e-6);\n Assert.assertEquals(1f, c.getQueueCapacities().getWeight(), 1e-6);\n Assert.assertEquals(400 * GB,\n c.getQueueResourceQuotas().getEffectiveMinResource().getMemorySize());\n\n // Check after removal c.\n cs.removeQueue(c);\n CSQueue b = cs.getQueue(\"root.b\");\n Assert.assertEquals(1 / 2f, b.getAbsoluteCapacity(), 1e-6);\n Assert.assertEquals(1f, b.getQueueCapacities().getWeight(), 1e-6);\n Assert.assertEquals(600 * GB,\n b.getQueueResourceQuotas().getEffectiveMinResource().getMemorySize());\n\n // Check can't remove static queue b.\n try {\n cs.removeQueue(b);\n Assert.fail(\"Can't remove static queue b!\");\n } catch (Exception ex) {\n Assert.assertTrue(ex\n instanceof SchedulerDynamicEditException);\n }\n // Check a.\n CSQueue a = cs.getQueue(\"root.a\");\n Assert.assertEquals(1 / 2f, a.getAbsoluteCapacity(), 1e-6);\n Assert.assertEquals(1f, a.getQueueCapacities().getWeight(), 1e-6);\n Assert.assertEquals(600 * GB,\n b.getQueueResourceQuotas().getEffectiveMinResource().getMemorySize());\n }",
"public boolean queueFull() {\r\n\t\tif (vehiclesInQueue.size() > maxQueueSize) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Test\n public void testRemove() {\n\tFileBackedBlockingQueue<String> queue = new FileBackedBlockingQueue.Builder<String>()\n\t\t.directory(TEST_DIR)\n\t\t.serializer(new StringSerializer())\n\t\t.segmentSize((TEST_STRING.length() + Segment.ENTRY_OVERHEAD_SIZE + 10) * 100)\n\t\t.build();\n\t// init\n\tfor (int i = 0; i < 2000; i++)\n\t queue.add(TEST_STRING + i);\n\t// remove some random data.\n\tfor (int i = 110; i < 221; i++)\n\t queue.remove(TEST_STRING + i);\n\t// test size\n\tAssert.assertEquals(queue.size(), 1889);\n\tfor (int i = 0; i < 2000; i++) {\n\t if (i >= 110 && i < 221)\n\t\tcontinue;\n\t // test if they are all equal.\n\t Assert.assertEquals(TEST_STRING + i, queue.poll());\n\t}\n }",
"public static void main(String[] args) {\n\t\tSQueue2 q = new SQueue2(5);\n\t\tQueue<Integer> q1 = new LinkedList<>();\n\t\t\n\t\ttry {\n\t\t\tq.enQueue('A');\n\t\t} catch (MyQueueException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tq.enQueue('B');\n\t\t} catch (MyQueueException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\ttry {\n\t\t\tq.enQueue('C');\n\t\t} catch (MyQueueException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tq.enQueue('D');\n\t\t} catch (MyQueueException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\tSystem.out.println(q.isFull());\n\t\tSystem.out.println(q.size());\n\t}",
"private Queue(){\r\n\t\tgenerateQueue();\r\n\t}",
"@Test\n public void testBigStack() {\n\n System.out.println(\"isEmpty\");\n\n int sizeTest = 500;\n\n List<String> elementList = new ArrayList();\n String tempString = \"\";\n\n for (int i = 0; i < sizeTest; i++) {\n\n tempString = tempString + \"z\";\n elementList.add(tempString);\n\n }\n\n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n for (String string : elementList) {\n instance.push(string);\n }\n\n int fourSize = instance.size();\n assertEquals(fourSize, sizeTest);\n assertEquals(instance.isEmpty(), false);\n\n for (int i = sizeTest; i > 0; i--) {\n\n String result = instance.pop();\n\n String expected = elementList.get(i - 1);\n\n assertEquals(expected, result);\n\n }\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }"
] |
[
"0.7379421",
"0.73079604",
"0.69958955",
"0.6954026",
"0.6874942",
"0.6818388",
"0.68063885",
"0.679165",
"0.6791395",
"0.6767204",
"0.67542356",
"0.6744393",
"0.66819984",
"0.667971",
"0.6659471",
"0.6646451",
"0.6644485",
"0.6624723",
"0.662447",
"0.66216266",
"0.6621514",
"0.6597806",
"0.6550051",
"0.6545313",
"0.6530745",
"0.6520867",
"0.6468251",
"0.6439658",
"0.643179",
"0.6430735",
"0.64222205",
"0.6413433",
"0.64029366",
"0.6383617",
"0.6362368",
"0.63554186",
"0.6352879",
"0.635012",
"0.6338461",
"0.63235134",
"0.6308428",
"0.6306951",
"0.63048184",
"0.6295031",
"0.62901944",
"0.6285092",
"0.62816423",
"0.6281142",
"0.6269165",
"0.62611127",
"0.6260911",
"0.6260276",
"0.6254479",
"0.6245601",
"0.62382036",
"0.62330526",
"0.62240505",
"0.6220272",
"0.621501",
"0.6214613",
"0.620408",
"0.6193446",
"0.6193214",
"0.6188285",
"0.6177722",
"0.6170626",
"0.6168904",
"0.61617166",
"0.61603326",
"0.6157946",
"0.6151285",
"0.61365896",
"0.613538",
"0.61349636",
"0.61034065",
"0.60959953",
"0.608039",
"0.6073366",
"0.60697305",
"0.6064214",
"0.6063112",
"0.60509324",
"0.60487163",
"0.60473055",
"0.6039106",
"0.603653",
"0.6021166",
"0.60186636",
"0.60147357",
"0.5993833",
"0.59841126",
"0.5980125",
"0.5978436",
"0.59738064",
"0.5972932",
"0.59686023",
"0.59665716",
"0.5965482",
"0.5956491",
"0.59551114"
] |
0.7161377
|
2
|
Create a list of dogs and cats
|
protected List<Animal> createCatsAndDogs() {
List<Animal> tempAnimals = new ArrayList<Animal>();
Date tempNow = new Date();
tempAnimals.add(new Animal(AnimalType.DOG,
new Date(tempNow.getTime() - 10*DAY_IN_MILLISECONDS)));
tempAnimals.add(new Animal(AnimalType.CAT,
new Date(tempNow.getTime() - 9*DAY_IN_MILLISECONDS)));
tempAnimals.add(new Animal(AnimalType.CAT,
new Date(tempNow.getTime() - 8*DAY_IN_MILLISECONDS)));
tempAnimals.add(new Animal(AnimalType.CAT,
new Date(tempNow.getTime() - 7*DAY_IN_MILLISECONDS)));
tempAnimals.add(new Animal(AnimalType.CAT,
new Date(tempNow.getTime() - 6*DAY_IN_MILLISECONDS)));
tempAnimals.add(new Animal(AnimalType.CAT,
new Date(tempNow.getTime() - 3*DAY_IN_MILLISECONDS)));
tempAnimals.add(new Animal(AnimalType.DOG,
tempNow));
return tempAnimals;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void addDog() {\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tString numID = id.get(i);\n\t\t\tString name = names.get(i);\n\t\t\tString breed = breeds.get(i);\n\t\t\tString dateBirth = date.get(i+1);\n\t\t\tString img = dogImg.get(i);\n\t\t\t\t\t\t\n\t\t\t//Adding the dogs to the list\n\t\t\tlistOfDogs.add(new Dog(app, numID, name, breed, dateBirth, img));\n\t\t}\t\t\n\t}",
"private void getSomeDogs(){\n try {\n ArrayList<Dog> dogs = new ArrayList<Dog>();\n dogs.add(createLabrador());\n dogs.add(createGolderRetriver());\n \n //Aggregation\n dogs\n .stream()\n .filter(\n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()))\n .map(p->p.getName())\n .forEach(name -> UtilityMethods.print(name));\n\n //lambda expressions\n Dog.getDogList(\n dogs, \n d -> (d.getIsRetriever()) \n && (d.getIsFriendly()), \n m -> m.getName(),\n o -> UtilityMethods.print(o)\n );\n\n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n }",
"private static List<Dog> dogArrayToList(Dog[] dogs) {\n return Arrays.asList(dogs);\n }",
"public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }",
"private void populatepets(){\r\n\t\tpets.add(new Cat(\"UnNamed\"));\r\n\t\tpets.add(new Cow(\"UnNamed\"));\r\n\t\tpets.add(new Dog(\"UnNamed\"));\r\n\t\tpets.add(new Rabbit(\"UnNamed\"));\r\n\t\tpets.add(new Rat(\"UnNamed\"));\r\n\t\tpets.add(new Velociraptor(\"UnNamed\"));\r\n\t}",
"private void buildBoats() {\n\t\tboats.add(new Boat(\"red\"));\n\t\tboats.add(new Boat(\"pink\"));\n\t\tboats.add(new Boat(\"blue\"));\n\t\tboats.add(new Boat(\"yellow\"));\n\t\tboats.add(new Boat(\"orange\"));\n\t\tboats.add(new Boat(\"green\"));\n\t\tboats.add(new Boat(\"purple\"));\n\t}",
"public ArrayList<Dog> dogsOfBreed(String breed){\n ArrayList<Dog> dogsOfBreed = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getBreed().equals(breed)){\n dogsOfBreed.add(d);\n }\n }\n\n return dogsOfBreed;\n }",
"public ArrayList<Dog> dogsOfSize(String size){\n ArrayList<Dog> dogsOfSize = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getSize().equals(size)){\n dogsOfSize.add(d);\n }\n }\n\n return dogsOfSize;\n }",
"public ArrayList<Dog> dogsSpayedOrNeutered(){\n ArrayList<Dog> dogsSpayedOrNeutered = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.isSpayedOrNeutered()){\n dogsSpayedOrNeutered.add(d);\n }\n }\n\n return dogsSpayedOrNeutered;\n }",
"public void createAnimals() {\n\t\tanimals = new Animal[noAnimals];\n\n\t\tfor (int i = 0; i < noAnimals; i++) {\n\t\t\tanimals[i] = new Animal(noAnimals);\n\t\t\tanimals[i].setDiffCo(diffCo[i]);\n\t\t\tanimals[i].setDiffusionRate(diffusionRate[i]);\n animals[i].initiateDensities(getIo().getNeighbours().length,getIo().getNeighbours()[0].length);\n\t\t}\n\t\n\t\t animals[0].setName(\"Hare\"); \n\t\t animals[1].setName(\"Puma\");\n\t}",
"public static void main(String[] args) {\n Dog testDog = new Dog(\"Molly\", \"123 Main St.\");\n int exampleWalks[] = { 1, 1, 2, 1, 1, 0, 0};\n testDog.setWalksPerDay(exampleWalks);\n\n Dog testDog2 = new Dog(\"Bob\", \"456 Hennepin Ave.\");\n int exampleWalks2[] = {0, 1, 1, 1, 0, 1, 1};\n testDog2.setWalksPerDay(exampleWalks2);\n \n \n //TODO put all Dogs in ArrayList\n\n for (int day = 0 ; day < 7 ; day++) {\n\n //TODO instead of working with each Dog individually, get dog information from your list of Dog objects.\n //So you'll need another loop here, to loop over the Dogs list\n System.out.println(testDog.getName());\n //String nameOfDay = dayLookup.get(day); ///get name of day from HashMap.\n System.out.println(\"On day \" + nameOfDay + \" walk dog this many times \"+ testDog.getNumberOfWalksForDay(day));\n\n\n }\n\n\n\n\n\n\n }",
"private List<String> createCategoryNames(List<CategoryDb> instances) {\n List<String> list = new ArrayList<>(0);\n for (CategoryDb categoryDb : instances) {\n list.add(categoryDb.getCategoryNameEn());\n }\n return list;\n }",
"private List<CategoryDb> createCategoryInstances(List<String> names) {\n List<CategoryDb> list = new ArrayList<>(0);\n for (String name : names) {\n CategoryDb categoryDb = new CategoryDb();\n categoryDb.setCategoryNameEn(name);\n categoryDb.setCategoryNameRu(new CategoryMapper().toRu(name));\n list.add(categoryDb);\n }\n return list;\n }",
"public void go() {\n Animal[] animals = {new Dog(), new Cat(), new Dog()};\n // Declare and create a Dog array, that holds only Dogs (the compiler won't let you put a Cat in)\n Dog[] dogs = {new Dog(), new Dog(), new Dog()};\n takeAnimals(animals);\n takeAnimals(dogs);\n }",
"public void printDogs(){\n System.out.println(\"Here are the dogs in the shelter:\");\n for(Dog d : dogs){\n d.printInfo();\n }\n }",
"Dog(){\n\t\t\n\t\t//I want to create a chemicals object. Inorder to do this, I have to first create a Cardiac obj, then a Cells obj, then a Chemicals object.\n\t\t//I have to create a Chemicals object, to get a chemicals constructor \n\t\tnew Cardiac().new Cells().new Chemicals();\n\t\t\n\t}",
"private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}",
"public ArrayList<Animal> createSwimmers() {\n ArrayList<Animal> swimmers = new ArrayList<>();\n if (getAnimals().size() > 0)\n swimmers = (ArrayList<Animal>) getAnimals().stream()\n .filter(animal -> animal instanceof Swimmer)\n .collect(Collectors.toList());\n return swimmers;\n }",
"public LiveData<List<Dog>> getDogs() {\n new InitializeDogsDataAsyncTask(dogDao, dataSource).execute();\n return dogDao.getAllDogs();\n }",
"public void printGodList(List<God> gods){\n int counter = 1;\n for(God god : gods){\n System.out.println(counter+\") \"+god.toString());\n counter++;\n }\n }",
"public ArrayList<Dog> dogsOfGender(String gender){\n ArrayList<Dog> dogsOfGender = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getGender().equals(gender)){\n dogsOfGender.add(d);\n }\n }\n\n return dogsOfGender;\n }",
"public ArrayList<ItemCategory> createItemCategoryList() {\n return categoryLines\n .stream()\n .map(this::writeLineNumber)\n .map(this::createItemList)\n .peek(this::addCategoryForFasterTesting)\n .collect(Collectors.toCollection(ArrayList::new));\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tDogAndCat dac=new DogAndCat();\r\n\t\tfor(int i=0;i<10;i++) {\r\n\t\t\tint c=(int) (Math.random()*100);\r\n\t\t\tif(c<50) {\r\n\t\t\t\tdac.add(new Dog());\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tdac.add(new Cat());\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!dac.isEmpty()) {\r\n\t\t\tSystem.out.print(dac.pollAll().getType()+\" \");\r\n\t\t}\r\n\r\n\t}",
"public static void addElementWildCardSuper( List < ? super Dog> dogs){\n dogs.add(new Kangal());\n dogs.add(new Dog());\n //dogs.add(new Animal());\n }",
"public void printSpayedOrNeutered(){\n System.out.println(\"Spayed or Neutered Dogs:\");\n ArrayList<Dog> dogsSpayedOrNeutered = dogsSpayedOrNeutered();\n for(Dog d : dogsSpayedOrNeutered){\n d.printInfo();\n }\n }",
"private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }",
"public void initialiseGodList() {\n PlayerCreator playerCreator = new PlayerCreator();\n for (int i = 0; i < playerCreator.getArrayGods().size(); i++)\n godListNames.add(playerCreator.getArrayGods().get(i).getGodName());\n }",
"public static void main(String[] args) throws IOException {\n AnimalFactory df = new DogFactory();\n AnimalFactory cf = new CatFactory();\n AnimalFactory bf = new BirdFactory();\n \n ArrayList<Dog> dogs = new ArrayList<>();\n ArrayList<Cat> cats = new ArrayList<>();\n ArrayList<Bird> birds = new ArrayList<>();\n \n Scanner reader = new Scanner(System.in);\n String input;\n do {\n System.out.println(\"===== Animal Kennel =====\"); \n System.out.println(\"1. Add animal.\");\n System.out.println(\"2. Talk to animals.\");\n System.out.println(\"0. Exit.\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n \n switch (Integer.parseInt(input)) {\n case 1:\n System.out.println(\"Types of animals to add: \");\n System.out.println(\"1 Dogs\");\n System.out.println(\"2 Cats\");\n System.out.println(\"3 Birds\");\n \n System.out.print(\"Selection: \");\n input = reader.nextLine();\n switch (Integer.parseInt(input)) {\n case 1:\n System.out.println(\"You can add: \");\n System.out.println(\"Labrador\\tPomeranian\\tShepherd\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Dog dog = df.createDog(input);\n if (dog != null) dogs.add(dog);\n break;\n case 2:\n System.out.println(\"You can add: \");\n System.out.println(\"Burmese\\tPersian\\tSiamese\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Cat cat = cf.createCat(input);\n if (cat != null) cats.add(cat);\n break;\n case 3:\n System.out.println(\"You can add: \");\n System.out.println(\"Owl\\tParrot\\tStork\");\n System.out.print(\"Select an option: \");\n input = reader.nextLine();\n Bird bird = bf.createBird(input);\n if (bird != null) birds.add(bird);\n break;\n default:\n break;\n }\n break;\n case 2:\n System.out.println(\"And then each of the animals spoke: \");\n dogs.forEach((dog) -> {\n dog.speak();\n });\n cats.forEach((cat) -> {\n cat.speak();\n });\n birds.forEach((bird) -> {\n bird.speak();\n });\n break;\n case 0:\n System.out.println(\"Exiting...\");\n System.exit(0);\n break;\n default:\n System.out.println(\"Choose something from the menu.\");\n break; \n }\n } while (true);\n }",
"public static List<Artist> makeChild1() {\n Artist q = new Artist(\"\", true);\n return Arrays.asList(q);\n }",
"public List<Object> getAnimals() {\n List<Object> allAnimals = new ArrayList<Object>();\n\n try(Connection con = DB.sql2o.open()) {\n String sqlAnimal = \"SELECT * FROM animals WHERE sightingId=:id AND type='notEndangered';\";\n List<Animal> animal = con.createQuery(sqlAnimal)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Animal.class);\n allAnimals.addAll(animal);\n\n String sqlEndangered = \"SELECT * FROM animals WHERE sightingId=:id AND type='endangered';\";\n List<Endangered> endangeredAnimal = con.createQuery(sqlEndangered)\n .addParameter(\"id\", this.id)\n \t\t\t\t.throwOnMappingFailure(false)\n .executeAndFetch(Endangered.class);\n allAnimals.addAll(endangeredAnimal);\n }\n\n return allAnimals;\n }",
"public void creatList()\n\t{\n\t\tbowlers.add(new Bowler(\"A\",44));\n\t\tbowlers.add(new Bowler(\"B\",25));\n\t\tbowlers.add(new Bowler(\"C\",2));\n\t\tbowlers.add(new Bowler(\"D\",10));\n\t\tbowlers.add(new Bowler(\"E\",6));\n\t}",
"private List<Card> createDeck(){\n List<Card> newDeck= new ArrayList<Card>();\n for (int i =0;i<CardSet.ALL_CARDS.size(); ++i ) {\n newDeck.add(CardSet.ALL_CARDS.get(i));\n }\n return newDeck;\n }",
"public void popularDoctores(){\n doctores = new ArrayList<>();\r\n doctores.add(new Doctor(22, \"Victor\", \"Gonzalez\", \"Romero\"));\r\n doctores.add(new Doctor(38, \"Jose\", \"Ramirez\", \"Bagarin\"));\r\n doctores.add(new Doctor(15, \"Patricio\", \"Arellano\", \"Vega\"));\r\n }",
"private void createArmy(int size)\n {\n for(int i = 0; i < size; i++)\n {\n int rando = Randomizer.nextInt(10) + 1;\n if(rando < 6 )\n {\n army1.add(new Human());\n } \n else if(rando < 8)\n {\n army1.add(new Dwarf());\n \n }\n else if (rando < 10)\n {\n army1.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army1.add(new Demon()); \n }\n else if(rando == 2)\n {\n army1.add(new CyberDemon());\n }\n else\n {\n army1.add(new Balrog());\n }\n }\n \n rando = Randomizer.nextInt(10) + 1;\n if(rando < 6)\n {\n army2.add(new Human());\n }\n else if (rando < 8)\n {\n army2.add(new Dwarf());\n }\n else if (rando < 10)\n {\n army2.add(new Elf());\n }\n else\n {\n rando = Randomizer.nextInt(3) + 1;\n if (rando ==1)\n {\n army2.add(new Demon()); \n }\n else if(rando == 2)\n {\n army2.add(new CyberDemon());\n }\n else\n {\n army2.add(new Balrog());\n }\n } \n }\n \n \n \n \n \n }",
"public static ArrayList<Neighbourhood> generateNeighbourhoods() {\n People p1 = new People(\"Peter\", \"Smith\");\n People p2 = new People(\"Anna\", \"Hunter\");\n ArrayList<People> people = new ArrayList<People>();\n people.add(p1); people.add(p2);\n\n Post post1 = new Post(p1,\"Babysitter needed\",\"Hi we need a Babysitter for next Friday. Please send me a private message if you are interested. Pay is 5 pound per hour\");\n Post post2 = new Post(p1,\"Car for sale\");\n Post post3 = new Post(p2,\"Looking for plumber\");\n Post post4 = new Post(p2,\"Free beer\");\n\n ArrayList<Post> posts = new ArrayList<Post>();\n posts.add(post1);posts.add(post2);posts.add(post3);posts.add(post4);\n\n\n Neighbourhood n1 = new Neighbourhood(\"Partick\");\n n1.setPosts(posts);\n n1.setMembers(people);\n Neighbourhood n2 = new Neighbourhood(\"West End\");\n n2.setPosts(posts);\n n2.setMembers(people);\n ArrayList<Neighbourhood> neighbourhoods = new ArrayList<Neighbourhood>();\n neighbourhoods.add(n1);\n neighbourhoods.add(n2);\n return neighbourhoods;\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate static List<Dog> listAllDogs(EntityManager em) {\n\t\tQuery query = em.createQuery(\"select d from Dog d\", Dog.class);\n\n\t\treturn query.getResultList();\n\t}",
"public static List<Artist> makeChild2() {\n Artist q = new Artist(\"\", true);\n return Arrays.asList(q);\n }",
"static List DuplicateElements(List<Character> characters){\r\n\t\tList newlist=new ArrayList<>();\r\n\t\tfor(char c:characters)\r\n\t\t{\r\n\t\t\tnewlist.add(Collections.nCopies(2,c ));\r\n\t\r\n\t\t}\r\n\tSystem.out.println(newlist);\r\n\treturn newlist;\r\n\t}",
"public static List<List<Object>> getDefaultDstDrugs() {\r\n \tList<List<Object>> drugs = new LinkedList<List<Object>>();\r\n \t\r\n \tString defaultDstDrugs = Context.getAdministrationService().getGlobalProperty(\"mdrtb.defaultDstDrugs\");\r\n \t\r\n \tif(StringUtils.isNotBlank(defaultDstDrugs)) {\r\n \t\t// split on the pipe\r\n \t\tfor (String drugString : defaultDstDrugs.split(\"\\\\|\")) {\r\n \t\t\t\r\n \t\t\t// now split into a name and concentration \r\n \t\t\tString drug = drugString.split(\":\")[0];\r\n \t\t\tString concentration = null;\r\n \t\t\tif (drugString.split(\":\").length > 1) {\r\n \t\t\t\tconcentration = drugString.split(\":\")[1];\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\t// see if this is a concept id\r\n \t\t\t\tInteger conceptId = Integer.valueOf(drug);\r\n \t\t\t\tConcept concept = Context.getConceptService().getConcept(conceptId);\r\n \t\t\t\t\r\n \t\t\t\tif (concept == null) {\r\n \t\t\t\t\tlog.error(\"Unable to find concept referenced by id \" + conceptId);\r\n \t\t\t\t}\r\n \t\t\t\t// add the concept/concentration pair to the list\r\n \t\t\t\telse {\r\n \t\t\t\t\taddDefaultDstDrugToMap(drugs, concept, concentration);\r\n \t\t\t\t}\r\n \t\t\t} \t\r\n \t\t\tcatch (NumberFormatException e) {\r\n \t\t\t\t// if not a concept id, must be a concept map\r\n \t\t\t\tConcept concept = Context.getService(MdrtbService.class).getConcept(drug);\r\n \t\t\t\t\r\n \t\t\t\tif (concept == null) {\r\n \t\t\t\t\tlog.error(\"Unable to find concept referenced by \" + drug);\r\n \t\t\t\t}\r\n \t\t\t\t// add the concept to the list\r\n \t\t\t\telse {\r\n \t\t\t\t\taddDefaultDstDrugToMap(drugs, concept, concentration);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn drugs;\r\n }",
"public static List<Artist> makeChild4() {\n Artist q = new Artist(\"\", true);\n\n return Arrays.asList(q);\n }",
"public static List<Artist> makeChild3() {\n Artist q = new Artist(\"\", true);\n return Arrays.asList(q);\n }",
"private void generateRecipeList(List<Match> recipeDataList, int ingredients) {\n allMatches.clear();\n // Produces numerical score for each recipe\n weightedSearchByIngredients(recipeDataList, ingredients);\n allMatches.addAll(recipeDataList);\n adapter = new IngredientSearchAdapter(allMatches);\n recyclerView.setAdapter(adapter);\n for (Match recipe : recipeDataList){\n System.out.println(\"Recipe: \" + recipe.getRecipeName()\n + \"| Weight: \" + recipe.getWeight()\n + \"| Ingredients: \" + recipe.getIngredients().size());\n }\n }",
"public ArrayList<ArrayList<Dog>> getVetSchedule() {\n\t\t\tint initialCapacity = 10;\r\n\t\t\tArrayList<ArrayList<Dog>> list = new ArrayList<ArrayList<Dog>>(initialCapacity); //list to put in lists of dogs\r\n\t\t\t//intialize ArrayList with size ArrayList\r\n\t\t\tlist.add(new ArrayList<Dog>());\r\n\t\t\t/*for(int i=0; i<=10; i++){\r\n\t\t\t\tlist.add(new ArrayList<Dog>());\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t\tDogShelterIterator iterator = new DogShelterIterator();\r\n\t\t\twhile(iterator.hasNext()){\r\n\t\t\t\tDog nextDog = iterator.next();\r\n\t\t\t\tint index = nextDog.getDaysToNextVetAppointment()/7;\r\n\t\t\t\tif(index < list.size())list.get(index).add(nextDog);\r\n\t\t\t\telse{\r\n\t\t\t\t\t//index out of range --> create larger list\r\n\t\t\t\t\tArrayList<ArrayList<Dog>> newList = new ArrayList<ArrayList<Dog>>(index+1);\r\n\t\t\t\t\tnewList.addAll(list); //add all lists from the old list\r\n\t\t\t\t\tfor(int i=0; i<(index+1)-list.size(); i++){ //initialize the other half with new ArrayLists\r\n\t\t\t\t\t\tnewList.add(new ArrayList<Dog>());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlist = newList; //update list to the larger newList\r\n\t\t\t\t\tlist.get(index).add(nextDog);\r\n\t\t\t\t}\r\n\t\t\t}\r\n return list;\r\n\t\t}",
"@Override\n\tpublic List<AnimalCategory> findCategory() {\n\t\tList<AnimalCategory> list = animaldao.findCategory();\n\t\treturn list;\n\t}",
"public void addAnimals() throws IOException {\n\t\tint b = 0;\n\t\tint c = 0;\n\t\tint a = 0;\n\t\tArrayList<GameObjects> animals = new ArrayList<GameObjects>();\n\t\tRandom rand = new Random();\n\t\twhile(b<bigFish) {\n\t\t\tanimals.add(new BigFish(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth/2))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tb+=1;\n\t\t}\n\t\twhile(c<crab) {\n\t\t\tanimals.add(new Crab(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\tc+=1;\n\t\t}\n\t\twhile(a<algae) {\n\t\t\tanimals.add(new Algae(frameWidth, frameHeight, (int)(frameWidth/6 + rand.nextInt((int)(frameWidth - frameWidth/3))), (int)(frameHeight/4 + frameHeight/10 + rand.nextInt((int)(frameHeight - frameHeight/2)))));\n\t\t\ta+=1;\n\t\t}\n\n\t\tanimals.add(new BigFish(frameWidth, frameHeight));\n\t\tanimals.add(new Crab(frameWidth, frameHeight));\n\t\tanimals.add(new Algae(frameWidth, frameHeight));\n\n\t\tthis.objects = animals;\n\t}",
"public void setAnimals(ArrayList<Animal> animals) { this.animals = animals; }",
"public List<CatMovie> getAllCatMovies() throws DalException\n {\n ArrayList<CatMovie> allCatMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n // SQL code. \n String sql = \"SELECT * FROM CatMovie;\";\n // Create statement.\n Statement statement = con.createStatement();\n // Attempts to execute the statement.\n ResultSet rs = statement.executeQuery(sql);\n while (rs.next())\n {\n // Add all to a list\n CatMovie catMovie = new CatMovie();\n catMovie.setCategoryId(rs.getInt(\"categoryId\"));\n catMovie.setMovieId(rs.getInt(\"movieId\"));\n\n allCatMovies.add(catMovie);\n }\n //Return\n return allCatMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(CatMovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Can´t do that\");\n }\n }",
"private static <Item extends Comparable> List<Item> catenate(List<Item> q1, List<Item> q2) {\n List<Item> catenated = new ArrayList<>();\n for (Item item : q1) {\n catenated.add(item);\n }\n for (Item item: q2) {\n catenated.add(item);\n }\n return catenated;\n }",
"private static void seachCats(String maybeCat) {\n\t\tSystem.out.println(\"List of \" + maybeCat + \" movies\");\n\t\tSystem.out.println(\"===============================\");\n\t\tint i;\n\t\tint x = 0;\n\t\tfor (i = 0; i < movList.size(); i++) {\n\t\t\tif (movList.get(i).isCat(maybeCat)) {\n\t\t\t\tSystem.out.println(movList.get(i));\n\t\t\t\tx++;\n\t\t\t}\n\t\t}\n\t\tif (x == 0) {\n\t\t\tSystem.out.println(\"Sorry, there are no movies in that category.\");\n\t\t}\n\t}",
"public List<Animal> listAnimals() {\n\t\tList<Animal> theAnimals = new ArrayList<Animal>();\n\t\tint contador = 0;\n\t\ttry {\t\n\t\t\tString sql = \"SELECT * FROM animals \"; \t\t\t\n\t\t\tPreparedStatement prep = JDBCManager.c.prepareStatement(sql);\t\n\t\t\tResultSet rs = prep.executeQuery();\n\t\t\n\t\twhile (rs.next()) { \n\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\n\t\t\tDate enterDate = Date.valueOf(rs.getString(\"enterDate\"));\n\t\t\tInteger habitat_id = rs.getInt(\"habitat_id\");\n\t\t\t\n\t\t\tDate lastBath = null;\n\t\t\tif (rs.getString(\"lastBath\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastBathString = rs.getString(\"lastBath\");\n\t\t\t\tlastBath = Date.valueOf(lastBathString);\n\t\t\t}\n\t\t\t\n\t\t\tDate lastFed = Date.valueOf(rs.getString(\"lastFed\"));\n\t\t\t\n\t\t\tDate lastDrug = null;\n\t\t\tif (rs.getString(\"lastDrug\") == null) {\n\t\t\t} else {\n\t\t\t\tString lastDrugString = rs.getString(\"lastDrug\");\n\t\t\t\tlastDrug = Date.valueOf(lastDrugString);\n\t\t\t}\n\t\t\t\n\t\t\tDate deathDate = null;\n\t\t\tif (rs.getString(\"deathDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString deathDateString = rs.getString(\"deathDate\");\n\t\t\t\tdeathDate = Date.valueOf(deathDateString);\n\t\t\t}\n\t\t\t\n\t\t\tDate freedomDate = null;\n\t\t\tif (rs.getString(\"freedomDate\") == null) {\n\t\t\t} else {\n\t\t\t\tString freedomDateString = rs.getString(\"freedomDate\");\n\t\t\t\tfreedomDate = Date.valueOf(freedomDateString);\n\t\t\t}\n\t\t\t\n\t\t\tint type_id = rs.getInt(\"type_id\");\n\t\t\tString name = rs.getString(\"name\");\n\t\t\t\n\t\t\tAnimal unAnimal = new Animal(id,enterDate, habitat_id, lastBath, lastFed, lastDrug, deathDate, freedomDate, type_id, name);\n\t\t\t\n\t\t\ttheAnimals.add(unAnimal);\n\t\t\t//System.out.print(\"tam:\"+theAnimals.size());\n\t\t\n\t\t}\n\n\t\tprep.close();\n\t\trs.close();\n\t\t\n\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn theAnimals;\n\t\t\t\n\t}",
"private void createClinicList(){\n\n ArrayList<Clinic> clinics = LogIn.clinicDAO.getAllClinics();\n for(Clinic cn : clinics){\n double avgRating = LogIn.rateDAO.getAvgRating(cn.getClinicID());\n clinicList.add(new ClinicItem(cn.getClinicName(), drawable.clinic_logo, \"Singapore\", Double.toString(avgRating)));\n }\n }",
"public static void main(String[] args) {\n Dog[] dogPark={new Dog(),new Dog(),new Dog(),new Dog(),new Dog()};\n //0 1 2 3 4\n\n for (int i = 0; i <= dogPark.length-1 ; i++) {\n dogPark[i].getDogInfo();\n\n }\n System.out.println(\"====================================\");\n dogPark[0].setDogInfo(\"Karaoglan\", \"German Shepperd\", \"Medium\", 6, \"Black\");\n dogPark[1].setDogInfo(\"Red\", \"Golden\", \"Medium\", 4, \"Yellow\");\n dogPark[2].setDogInfo(\"Akbas\", \"Anatolian Sheppard\", \"Large\", 2, \"White\");\n dogPark[3].setDogInfo(\"mike\",\"Poodle\",\"Big\",8,\"brown\");\n dogPark[4].setDogInfo(\"Grizzly\",\"BoxerPitt\",\"Large\",3,\"Mix\");\n\n for (int i = 0; i <= dogPark.length-1 ; i++) {\n dogPark[i].getDogInfo();\n }\n\n System.out.println(\"=============================================================\");\n for (Dog eachdog:dogPark) {\n eachdog.getDogInfo();\n }\n\n System.out.println(\"=============================================================\");\n String food=\"treat\";\n for (Dog eachdog:dogPark) {\n eachdog.eat(food);\n }\n\n System.out.println(\"=============================================================\");\n String drink=\"milk\";\n for (Dog eachdog:dogPark) {\n eachdog.drink(drink);\n }\n\n\n System.out.println(\"=============================================================\");\n //play\n for (Dog eachdog:dogPark) {\n eachdog.sleep();\n }\n\n System.out.println(\"=============================================================\");\n //sleep\n for (Dog eachdog:dogPark) {\n eachdog.sleep();\n }\n }",
"public ArrayList<Dog> dogsOfAge(int ageLower, int ageUpper){\n ArrayList<Dog> dogsOfAge = new ArrayList<Dog>();\n\n for(Dog d : dogs){\n if(d.getAge() >= ageLower && d.getAge() <= ageUpper){\n dogsOfAge.add(d);\n }\n }\n\n return dogsOfAge;\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tDog dog1 = new Dog();\r\n//\t\tdog1.bark(); //we need to have created method bark().\r\n\t\tdog1.name = \"Tinito\";\r\n\t\t\r\n/*____________________________________________________________*/\t\t\r\n\t\t\r\n\t\t//Now make a Dog array.\r\n\t\t\r\n\t\tDog[] myDogs = new Dog[3];\r\n\t\tmyDogs[0] = new Dog(); //instantiates dog object referenced to by myDog[0]. \r\n\t\tmyDogs[1] = new Dog(); \r\n\t\tmyDogs[2] = dog1;\r\n/*____________________________________________________________*/\t\t\r\n\r\n\t\t//Now access the dogs using the array references\r\n\t\t\r\n\t\tmyDogs[0].name = \"Fred\";\r\n\t\tmyDogs[1].name = \"Merge\";\r\n\t\t//Note that you can't say dog1.name = \"Tinito.\"\r\n/*____________________________________________________________*/\t\t\r\n\t\t\r\n\t\t//Hmmmm....what myDogs[2] name?\r\n\t\tSystem.out.print(\"Last dog's name is \");\r\n\t\tSystem.out.println(myDogs[2].name);// Also accessed thru array ref.\r\n/*______________________________________________________________*/\t\t\r\n\t\r\n\t\t//Now loop through the array and tell all dogs to bark.\r\n\t\tint i = 0;\r\n\t\twhile(i < myDogs.length) {\r\n//\t\t\tmyDogs[i].bark;\r\n\t\t\ti = i +1;\r\n/*______________________________________________________________*/\t\t\t\r\n\t\t\t\r\n\t\t//Up to now the dogs don't know how to bark. We create method bark.\t\r\n\t\t\r\n//\t\t\tpublic void bark(){\t\t//Not sure why method rejected.\r\n\t\t\tSystem.out.println(name + \"says Ruff Ruff!\");\r\n\t\t}\r\n\t\t\r\n/*____________________________________________________________*/\r\n//\t //Similarly u can command the dogs to eat, chaseCat etc.\t\t\r\n//\t\t\tpublic void eat() { }\r\n//\t\t\tpublic void chaseCat() { }\r\n//\t\t\t\r\n//\t\t}\r\n\t}",
"public static void main(String[] args) {\n AnimalBp turtle = new AnimalBp(); \n AnimalBp dog = new AnimalBp();\n AnimalBp cat = new AnimalBp();\n \n \n \n turtle .setType(\"Reptile\");\n String turtleType = turtle.getType();\n \n \n System.out.println(turtleType);\n \n turtle.setnumberOfFeet(4);\n int turtlenumberOfFeet = turtle.getnumberOfFeet();\n \n System.out.println(turtlenumberOfFeet);\n \n turtle.setColor(\"Green\");\n String turtleColor = turtle.getColor();\n \n System.out.println(turtleColor);\n \n turtle.setlaysAnEgg(true);\n boolean turtlelaysAnEgg = turtle.getLaysAnEgg();\n \n System.out.println(turtlelaysAnEgg);\n \n \n dog .setType(\"Mammal\");\n String dogType = dog.getType();\n \n System.out.println(dogType);\n \n dog.setnumberOfFeet(4);\n int dognumberOfFeet = dog.getnumberOfFeet();\n \n System.out.println(dognumberOfFeet);\n \n dog.setColor(\"Brown and White\");\n String dogColor = dog.getColor();\n \n System.out.println(dogColor);\n \n dog.setlaysAnEgg(false);\n boolean doglaysAnEgg = dog.getLaysAnEgg();\n \n System.out.println(doglaysAnEgg);\n \n cat .setType(\"Mammal\");\n String catType = cat.getType();\n \n \n System.out.println(catType);\n \n cat.setnumberOfFeet(4);\n int catnumberOfFeet = cat.getnumberOfFeet();\n \n System.out.println(catnumberOfFeet);\n \n cat.setColor(\"gray\");\n String catColor = cat.getColor();\n \n System.out.println(catColor);\n \n cat.setlaysAnEgg(false);\n boolean catlaysAnEgg = cat.getLaysAnEgg();\n \n System.out.println(catlaysAnEgg);\n }",
"@Override\n\tpublic List<Categories> getListCat() {\n\t\treturn categoriesDAO.getListCat();\n\t}",
"private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }",
"public void printDogsOfSize(String size){\n System.out.println(\"Here are the \" + size + \" dogs in the shelter:\");\n ArrayList<Dog> smallDogs = dogsOfSize(size);\n for(Dog d : smallDogs){d.printInfo();}\n }",
"public List<String> getCategoryList(String cat) {\n ArrayList<String> ls = new ArrayList<String>();\n String[] keys = sortedStringKeys();\n\n for (String s : keys) {\n if (s.startsWith(cat)) { ls.add(getProperty(s)); }\n }\n return ls;\n }",
"public void printDogsOfBreed(String breed){\n System.out.println(\"Here are the \" + breed + \" dogs in the shelter:\");\n ArrayList<Dog> specificDogs = dogsOfBreed(breed);\n for(Dog d : specificDogs){d.printInfo();}\n }",
"@Test\n public void testAddAllCapaibilty(){\n\n List<Object> pets = new ArrayList<>();\n pets.add(new Cat(\"Diago\"));\n pets.add(new Mouse(\"Minnie\"));\n pets.add(new Pet(\"Pappy\"));\n List<Object> hamsters = Arrays.asList(new Hamster());\n //List<Object> hamsters = new ArrayList<>();\n // hamsters.add(new Hamster(\"Chinkie\"));\n pets.addAll(1,hamsters);\n for(Object pet : pets){\n System.out.println(((Pet)pet).name);\n }\n boolean exceptionCaught = false;\n try{\n hamsters.add(pets);\n }catch(UnsupportedOperationException e){\n exceptionCaught = true;\n }\n assertTrue(exceptionCaught);\n }",
"public List<List<Die>> getCollections (){\n List<List<Die>> dieList = new ArrayList<>();\n for(int i = 1; i<getRound(); i++) {\n dieList.add(new ArrayList<>());\n dieList.get(i - 1).addAll(getDice(i));\n }\n return dieList;\n }",
"public static void main(String[] args) {\n BMW bmw = new BMW();\n Tesla tesla = new Tesla();\n Toyota toyota = new Toyota();\n Jeep jeep = new Jeep();\n\n bmw.start();\n tesla.start();\n toyota.start();\n jeep.start();\n\n // create an arraylist of car, and store 3 toyota objetc, 3 bmw objects and 3 Tesla objects\n\n Car car1 = new BMW();\n Car car2 = new Tesla();\n Car car3 = new Toyota();\n Car car4 = new Jeep();\n\n ArrayList<Car> cars = new ArrayList<>();\n cars.addAll(Arrays.asList(car1, car2, car3, car4, bmw, tesla, toyota, jeep));\n\n System.out.println();\n\n }",
"public List<Plant> initPlantList(final FieldPlant species)\n {\n final List<Plant> plantList = new ArrayList<>();\n\n if( species == FieldPlant.MORE )\n {\n final int randomCount = new Random().nextInt(25) + 25;\n for( int i = 0; i < randomCount; i++ )\n {\n plantList.add(new More(new Random().nextFloat() * 70));\n }\n }\n else if( species == FieldPlant.WHEAT )\n {\n final int randomCount = new Random().nextInt(25) + 25;\n for( int i = 0; i < randomCount; i++ )\n {\n plantList.add(new Wheat(new Random().nextFloat() * 70));\n }\n }\n else\n {\n LOG.warn(\"unauthorized entry - no data passed on\");\n }\n\n return plantList;\n }",
"private void populateData() {\n animals.add(new Animal(\"Bear Arlan\", 10, true, \"Student\",\n \"Watch cartoons\", R.drawable.bear));\n animals.add(new Animal(\"Marten Chrisst\", 15, true, \"McDonald employee\",\n \"Play video games\", R.drawable.marten));\n animals.add(new Animal(\"Octopus Tenta\", 18, false, \"Ink producer\",\n \"Camouflage and attack jellyfish\", R.drawable.octopus));\n animals.add(new Animal(\"Ostrich Mellow\", 19, false, \"Zoo runner\",\n \"Peck other animals\", R.drawable.ostrich));\n animals.add(new Animal(\"Raccoon Garack\", 21, true, \"Office worker\",\n \"Build diagrams for statistics\", R.drawable.racoon));\n animals.add(new Animal(\"Rooster Billo\", 16, true, \"Early waker\",\n \"Fly and chirp in morning\", R.drawable.rooster));\n animals.add(new Animal(\"Seagull Ranch\", 23, false, \"Scout\",\n \"Practice carrying water in mouth\", R.drawable.seagull));\n animals.add(new Animal(\"Seal Arlan\", 25, true, \"Security\",\n \"Work on belly muscles\", R.drawable.seal));\n animals.add(new Animal(\"Tiger Stitch\", 30, false, \"Hunter\",\n \"Make soup\", R.drawable.tiger));\n animals.add(new Animal(\"Zebra Dillian\", 6, true, \"Student\",\n \"Watch movies about zebras\", R.drawable.zebra));\n }",
"public List<CatVo> selectCat() {\n\t\treturn sqlSession.selectList(\"product.selectCat\");\n\t}",
"public List<Movie> getMoviesFromCats(Category chosenCat) throws DalException\n {\n\n ArrayList<Movie> categoryMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idCat = chosenCat.getId();\n // SQL code. \n String sql = \"SELECT * FROM Movie INNER JOIN CatMovie ON Movie.id = CatMovie.movieId WHERE categoryId=\" + idCat + \";\";\n\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(sql);\n\n while (rs.next())\n {\n // Add all to a list\n Movie movie = new Movie();\n movie.setId(rs.getInt(\"id\"));\n movie.setName(rs.getString(\"name\"));\n movie.setRating(rs.getDouble(\"rating\"));\n movie.setFilelink(rs.getString(\"filelink\"));\n movie.setLastview(rs.getDate(\"lastview\").toLocalDate());\n movie.setImdbRating(rs.getDouble(\"imdbrating\"));\n categoryMovies.add(movie);\n }\n //Return\n return categoryMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(MovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Nope can´t do\");\n }\n\n }",
"private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}",
"private static void addDefaultDstDrugToMap(List<List<Object>> drugs, Concept concept, String concentration) {\r\n \tList<Object> data = new LinkedList<Object>();\r\n \tdata.add(concept);\r\n \tdata.add(concentration);\r\n \tdrugs.add(data);\r\n }",
"@Override\r\n\tpublic List<BIrdBeans> birdList() throws Exception {\n\t\tList<BIrdBeans> birdList= new ArrayList<BIrdBeans>();\r\n\t\ttry{\r\n\t\t\tsession = sessionfactory.openSession();\r\n\t\t\tCriteria criteria = session.createCriteria(BIrd.class);\r\n\t\t\tbirdList = criteria.addOrder(Order.asc(\"category\")).list();\r\n\t\t\tSystem.out.println(birdList);\r\n\t\t\tsession.close();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\treturn birdList;\r\n\t}",
"ArrayList<RecipeObject> getRecipes();",
"public List<Dog> findAllDogsByOwner(int id) {\n\t\t\n\t\tList<Dog> dogs = dogRep.findDogByOwner_OwnerId(id);\n\t\treturn dogs;\n\t}",
"public static LinkedList<Card> produceCards ()\n {\n LinkedList<Card> list = new LinkedList<> ();\n\n for (int i = 0; i < 10; i++)\n {\n if (i == 0)\n {\n list.add (new NumericCard (Color.BLUE,i));\n list.add (new NumericCard (Color.RED,i));\n list.add (new NumericCard (Color.GREEN,i));\n list.add (new NumericCard (Color.YELLOW,i));\n }\n else\n {\n for (int j = 0; j < 2; j++)\n {\n list.add (new NumericCard (Color.BLUE,i));\n list.add (new NumericCard (Color.RED,i));\n list.add (new NumericCard (Color.GREEN,i));\n list.add (new NumericCard (Color.YELLOW,i));\n }\n }\n }\n return list;\n }",
"private void initFruits() {\n\t\tthis.fruits.clear();\n\t\tGraphFruit fruit = new GraphFruit();\n\t\tList<String> f = game.getFruits();\n\t\tfor(String s : f) {\n\t\t\tfruit.initFruit(s);\n\t\t\tthis.fruits.add(fruit);\n\t\t}\n\t}",
"public static List<Artist> makeChild5() {\n Artist q = new Artist(\"\", true);\n return Arrays.asList(q);\n }",
"public List<TilePojo> getCategoryCharacterList() {\n\t\tLOGGER.info(\"GetCategoryCharacterList -> Start\");\n\t\tcategoryCharacterList = new LinkedList<>();\n\n\t\tTagManager tagManager = resource.getResourceResolver().adaptTo(TagManager.class);\n\t\tif (galleryCategory != null && tagManager != null) {\n\t\t\tTag galleryTag = tagManager.resolve(galleryCategory[0]);\n\t\t\tString galleryTagId = galleryTag.getTagID();\n\t\t\tList<TilePojo> charList = tileGalleryAndLandingService.getTilesByDate(homePagePath, galleryFor,\n\t\t\t\t\tgalleryTagId, resource.getResourceResolver(), true);\n\t\t\tcategoryCharacterList = getFixedNumberChar(charList, 12);\n\t\t}\n\t\tLOGGER.info(\"GetCategoryCharacterList -> End\");\n\t\treturn categoryCharacterList;\n\t}",
"static ArrayList<Ingredient> getIngredients() {\n\t\tArrayList<Ingredient> Ingredients = new ArrayList<Ingredient>();\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\taddIngredient(Ingredients, ing);\n\t\t\t}\n\t\t}\n\t\treturn Ingredients;\n\t}",
"public static List<Artist> makeChild6() {\n Artist q = new Artist(\"\", true);\n return Arrays.asList(q);\n }",
"@Override\n public String toString() {\n return \"Dog [name=\" + name + \"]\";\n }",
"public static void main(String[] args) {\n Dog dog = new Dog(true, true, \"big\");\n System.out.println(\" \");\n Kat kat = new Kat(true, 2,true, 123, true, true, \"yes\");\n// System.out.println(dog.makeSound() + kat.makeSound());\n\n\n System.out.println(kat.catYears());\n\n System.out.println(dog.dogYears());\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"public List<TipoAnimalEntity> obtenerTipoAnimal(){\n List<TipoAnimalEntity> tipoAnimal = persistence.findall();\n return tipoAnimal;\n }",
"public List<PkgCategory<AndroidVersion>> getFilteredApiCategories(List<PkgCategory<AndroidVersion>> cats) {\r\n\t\tif (!isFilterOn())\r\n\t\t\treturn cats;\r\n\t\tList<PkgCategory<AndroidVersion>> selectCategories = new ArrayList<>();\r\n\t\tfor (PkgCategory<AndroidVersion> cat: cats) {\r\n\t\t\tCategoryKeyType catKeyType = cat.getKeyType();\r\n\t\t\tswitch(catKeyType) {\r\n\t\t\tcase TOOLS:\r\n\t\t\tcase TOOLS_PREVIEW: \r\n\t\t\t\tif (selectTools)\r\n\t\t\t\t\tselectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tcase API: \r\n\t\t\tcase EARLY_API: \r\n\t\t\t\tif (selectApi)\r\n\t\t\t\t\tselectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tcase EXTRA: \r\n\t\t\t\tif (selectExtra)\r\n\t\t\t\t\tselectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tcase GENERIC: \r\n\t\t\t\tif (selectGeneric)\r\n\t\t\t\t selectCategories.add(cat);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selectCategories;\r\n\t}",
"@Override\r\n\tpublic List<BIrdBeans> birdListByCatId(int categoryId) throws Exception {\n\t\tList<BIrdBeans> getBirdImageListbyBirdId = new ArrayList<BIrdBeans>();\r\n List temp=null;\r\n try\r\n {\r\n session = sessionfactory.openSession();\r\n transaction = session.beginTransaction();\r\n String sql = \"SELECT BirdName,BirdImage,CatId,BirdId FROM tbl_bird WHERE CatId = \"+categoryId;\r\n Query query = session.createSQLQuery(sql);\r\n temp=query.list();\r\n if(temp != null && temp.size()!=0){\r\n \tfor(Object obj:temp){\r\n \t\tObject[] img = (Object[]) obj;\r\n \t\tBIrdBeans bean=new BIrdBeans();\r\n \t\tbean.setBirdName((String) img[0]);\r\n \t\tbean.setBrdImage((String) img[1]);\r\n \t\tbean.setCatId((int) img[2]);\r\n \t\tbean.setBirdId((int) img[3]);\r\n \t\tgetBirdImageListbyBirdId.add(bean);\r\n \t}\r\n }\r\n }\r\n catch(HibernateException e){\r\n e.printStackTrace();\r\n }finally{\r\n \tif(session!=null){\r\n \t\tsession.close();\r\n \t}\r\n }\r\n return getBirdImageListbyBirdId;\r\n\t}",
"public static List<Categorias> obtenerCategorias(){\n List<Categorias> categorias = new ArrayList<>();\n \n Categorias c = new Categorias();\n \n c.conectar();\n \n c.crearQuery(\"select * from categoria_libro\");\n \n ResultSet informacion = c.getResultSet();\n \n try {\n while (informacion.next())\n categorias.add(new Categorias(informacion));\n } catch (Exception error) {}\n \n c.desconectar();\n \n return categorias;\n }",
"@Override\r\n\tpublic void fill(List<Category> list) {\n\t\tfor(Category category : list) {\r\n\t\t\tfill(category);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public static List<Category> getCategories(Context context) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getReadableDatabase();\r\n\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID, CategoryTable.COLUMN_NAME_CATEGORY_NAME},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0\",\r\n null,\r\n null,\r\n null,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" ASC\"\r\n );\r\n\r\n List<Category> categories = new ArrayList<>();\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(CategoryTable._ID));\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }",
"public static ArrayList<Recipe> getAllRecipes() {\n allRecipes.add(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients2\"));\n allRecipes.add(new Recipe(\"Pasta\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n\n return allRecipes;\n }",
"public static void main(String[] args) {Dog dog1 = new Dog();\n//\t\tdog1.name=\"Bubbly\";\n//\t\tdog1.age=5;\n//\t\tdog1.breed=\"Poodle\";\n//\t\tdog1.color=\"White\";\n//\t\t\n//\t\tSystem.out.println(dog1.name + \":\" + dog1.age + \":\" + dog1.breed + \":\" + dog1.color);\n//\t\t\n//\t\tdog1.bark();\n//\t\tdog1.eat();\n//\t\tdog1.wagTail();\n//\t\t\n//\t\tSystem.out.println(\"--------------\");\n\t\t\n\t\t\n//\t\tDog2 dog = new Dog2();\n//\t\tSystem.out.println(dog.name + \":\" + dog.age + \":\" + dog.breed + \":\" + dog.color);\n//\t\t\n\t\tDog2 dog2=new Dog2();\n\t\tSystem.out.println(dog2.name + \":\" + dog2.age + \":\" + dog2.breed + \":\" + dog2.color);\n\t\t\n//\t\tDog2 dog3=new Dog2(\"Rusty\",20,\"Bulldog\",\"Black\");\n//\t\tSystem.out.println(dog3.name + \":\" + dog3.age + \":\" + dog3.breed + \":\" + dog3.color);\n\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n String[] animals = {\"Cat\", \"Dog\", \"Dog\", \"Bird\", \"Fish\", \"Cat\"};\n\n ArrayList<String> animalsList = new ArrayList<>(Arrays.asList(animals));\n System.out.println(animalsList);\n\n /*\n Remove Cat elements and print your ArrayList again\n\n EXPECTED RESULT:\n [Dog, Bird, Fish]\n */\n\n System.out.println(\"\\n---Removing-Cat-1st way creating a new list---\\n\");\n ArrayList<String> animalsWithoutCats = new ArrayList<>(); // empty at this line\n\n for(String element: animalsList){\n if(!element.equalsIgnoreCase(\"cat\")) animalsWithoutCats.add(element);\n }\n\n System.out.println(\"List after removing cats = \" + animalsWithoutCats);\n\n\n System.out.println(\"\\n---Removing-Dog-2nd way using iterator---\\n\");\n\n Iterator<String> myIterator = animalsList.iterator();\n\n while(myIterator.hasNext()){\n if(myIterator.next().equalsIgnoreCase(\"dog\")) myIterator.remove();\n }\n\n System.out.println(\"List after removing dogs = \" + animalsList);\n }",
"public List<VehicleCategoryMasterBean> categoryList() throws Exception;",
"public Dog(String name, int size, int weight, int eyes, int legs, int tail, int teeth, String coat) {\n //super means to call a constructor from the class we are extending\n //can set values or call in the above constructor, your choice\n super(name, 1, 1, size, weight);\n //these are for the strictly dog paramters\n this.eyes = eyes;\n this.legs = legs;\n this.tail = tail;\n this.teeth = teeth;\n this.coat = coat;\n }",
"public void returnDogs(Nursery nursery);",
"public final List<String> getCategories() {\n return new ArrayList<>(questionGeneratorStrategyFactory.createPracticeQuestionStrategy().generateQuestions().keySet());\n }",
"@NonNull\n @Override\n public listaCachorrosRecycleViewAdapter.DogViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {\n View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.fragment_perfil_dogs, viewGroup, false);\n // view holder para aquele item da lista\n DogViewHolder viewHolder = new DogViewHolder(view);\n return viewHolder;\n }",
"public ArrayList<Categoria> listarCategorias();",
"public static void carlist() {\n Cars xx = new Cars();\n System.out.println(\"You have \" + String.valueOf(listcars.size())+ \" cars\");\n System.out.println(\"List of all your cars \");\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n System.out.println(xx.getBrand()+ \" \"+ xx.getModel()+ \" \"+ xx.getReference()+ \" \"+ xx.getYear()+ \" \");\n }\n }",
"public List<ZStringBuilder> generateVariations(String symbol) {\n\t\tList<ZStringBuilder> r = new ArrayList<ZStringBuilder>();\n\t\tZStringBuilder sym = new ZStringBuilder(symbol);\n\t\taddAdditions(r,sym,true);\n\t\taddDeletes(r,sym,true);\n\t\taddSwitches(r,sym,true);\n\t\taddReplacements(r,sym,true);\n\t\taddCases(r,sym,true);\n\t\treturn r;\n\t}",
"private void fillFruitList()\n\t{\n\t\tfruitList.add(\"apple\");\n\t\tfruitList.add(\"kiwi\");\n\t\tfruitList.add(\"coconut\");\n\t\tfruitList.add(\"orange\");\n\t\tfruitList.add(\"pineapple\");\n\t\tfruitList.add(\"pear\");\n\t\tfruitList.add(\"banana\");\n\t\tfruitList.add(\"papaya\");\n\t\tfruitList.add(\"blueberry\");\n\t}",
"public List<Cvcategory> findAllCvcategories();",
"@Override\r\n\tpublic List<Animal> getAllAnimals() {\n\t\treturn dao.findAll();\r\n\t}"
] |
[
"0.68228966",
"0.6579438",
"0.6284097",
"0.619074",
"0.6134438",
"0.5884055",
"0.58211184",
"0.57114226",
"0.5706547",
"0.5604395",
"0.5601677",
"0.5587428",
"0.5578302",
"0.55570215",
"0.55384976",
"0.54994094",
"0.5487159",
"0.5482521",
"0.54782254",
"0.54727787",
"0.5440712",
"0.5405933",
"0.534378",
"0.53069824",
"0.52729565",
"0.5266438",
"0.52630544",
"0.5228644",
"0.5210346",
"0.52063996",
"0.5201788",
"0.5165485",
"0.51581347",
"0.5150501",
"0.51306313",
"0.5127251",
"0.5123027",
"0.5100482",
"0.5097764",
"0.50917006",
"0.5087518",
"0.5059449",
"0.50503767",
"0.5046315",
"0.50381845",
"0.50354856",
"0.5033421",
"0.50303614",
"0.50303006",
"0.5025568",
"0.5022328",
"0.5018789",
"0.50019515",
"0.49962485",
"0.49829158",
"0.49758497",
"0.49714157",
"0.49640355",
"0.49627733",
"0.49614882",
"0.49613252",
"0.49590993",
"0.49533546",
"0.49496767",
"0.49404824",
"0.49345332",
"0.49313796",
"0.4926197",
"0.49254563",
"0.49238175",
"0.49007937",
"0.48831007",
"0.48768032",
"0.4861872",
"0.4859463",
"0.48554608",
"0.48531213",
"0.48435882",
"0.4842741",
"0.48373726",
"0.48343393",
"0.47982386",
"0.47940394",
"0.47931987",
"0.47919878",
"0.47891837",
"0.47884828",
"0.47791588",
"0.47781333",
"0.4771784",
"0.47698492",
"0.4768685",
"0.4768273",
"0.4760703",
"0.4756009",
"0.4749942",
"0.4746867",
"0.4742222",
"0.473492",
"0.47337934"
] |
0.78543305
|
0
|
Service provider framework sketch / Service interface
|
public interface Service {
// Service-specific methods go here
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface Provider {\n Service newService();\n }",
"public interface Provider{\n Service newService();\n}",
"private static interface Service {}",
"public interface Provider {\n //Connection connect(String url, java.util.Properties info)\n Service newService();\n}",
"public interface Provider {\n Service newService();\n}",
"public interface Provider {\n Service newService();\n}",
"public interface ProviderService\n{\n /**\n * Get all service provider.\n *\n * @return All service provider artifacts currently available or an empty\n * set if no service providers are available.\n */\n Set<ServiceProducer> getAllServiceProviders();\n\n /**\n * Get a service provider.\n *\n * @param id The id of the service provider to get.\n * @return The service artifact that represents the service provider or\n * <code>null</code> if no Service Producer was found with that id.\n */\n ServiceProducer getServiceProvider(int id);\n}",
"public interface ServiceProvider {\n\n /**\n * This method allows to define a priority for a registered ServiceProvider instance. When multiple providers are\n * registered in the system the provider with the highest priority value is taken.\n *\n * @return the provider's priority (default is 0).\n */\n int getPriority();\n\n /**\n * Access a list of services, given its type. The bootstrap mechanism should\n * order the instance for precedence, hereby the most significant should be\n * first in order. If no such services are found, an empty list should be\n * returned.\n *\n * @param serviceType the service type.\n * @return The instance to be used, never {@code null}\n */\n <T> List<T> getServices(Class<T> serviceType);\n\n /**\n * Access a single service, given its type. The bootstrap mechanism should\n * order the instance for precedence, hereby the most significant should be\n * first in order and returned. If no such services are found, null is\n * returned.\n *\n * @param serviceType the service type.\n * @return The instance, (with highest precedence) or {@code null}, if no such service is available.\n */\n default <T> T getService(Class<T> serviceType) {\n return getServices(serviceType).stream().findFirst().orElse(null);\n }\n}",
"public interface Service {\n\n}",
"public interface Service {\n\n}",
"public interface HelloService extends IProvider{\n void sayHello(String name);\n}",
"public interface SmartCultureFarmService extends Service<SmartCultureFarm> {\n\n}",
"public interface MineService {\n}",
"public interface TearcherInfoService extends Service<TearcherInfo> {\n\n}",
"public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"public interface HelloService {\n\n String greet (String userName);\n\n}",
"public interface LearningSpaceServices {\n\n\n}",
"public interface HelloService {\n\n String sayHello(String name);\n\n}",
"public interface DemoService {\n\n String sayHello(String name);\n}",
"public interface DemoService {\n String sayHello(String name);\n\n public List getUsers();\n}",
"public interface EzService {\n}",
"public interface DemoService {\n String sayHello(String name);\n}",
"public interface ServiceManagerInterface {\n\n /**\n * add a Service\n * @param servicePackage the service package to register\n * @param configuration The configuration of the client\n * @param profile the client profile\n * @return The added service description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription addService(\n AGServicePackageDescription servicePackage,\n AGParameter[] configuration,\n ClientProfile profile)\n throws IOException, SoapException;\n\n /**\n * gets the service manager description\n * @return service manager description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceManagerDescription getDescription()\n throws IOException, SoapException;\n\n /**\n * gets the url of the node service\n * @return url of node service\n * @throws IOException\n * @throws SoapException\n */\n String getNodeServiceUrl()\n throws IOException, SoapException;\n\n /**\n * gets the available services\n * @return a vector of available services\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription[] getServices()\n throws IOException, SoapException;\n\n /**\n * test whether the service manager is valid\n * @return the 'valid' state\n * @throws IOException\n * @throws SoapException\n */\n int isValid() throws IOException, SoapException;\n\n /**\n * removes a service from the service manager\n * @param serviceDescription the description of the service to be removed\n * @throws IOException\n * @throws SoapException\n */\n void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;\n\n /**\n * removes all services from the service manager\n * @throws IOException\n * @throws SoapException\n */\n void removeServices() throws IOException, SoapException;\n\n /**\n * sets the url for node service\n * @param nodeServiceUri\n * @throws IOException\n * @throws SoapException\n */\n void setNodeServiceUrl(String nodeServiceUri)\n throws IOException, SoapException;\n\n /**\n * shuts down the service manager\n * @throws IOException\n * @throws SoapException\n */\n void shutdown() throws IOException, SoapException;\n\n /**\n * stops all services on service manager\n * @throws IOException\n * @throws SoapException\n */\n void stopServices() throws IOException, SoapException;\n\n /**\n * gets the version number of the service manager\n * @return string with version of service manager\n * @throws IOException\n * @throws SoapException\n */\n String getVersion() throws IOException, SoapException;\n\n\n /**\n * Requests to join a bridge\n * @param bridgeDescription The description of the bridge\n * @throws IOException\n * @throws SoapException\n */\n void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;\n\n /**\n * Sets the streams of this service manager\n *\n * @param streamDescriptionList a vector of stream descriptions\n * @throws IOException\n * @throws SoapException\n */\n void setStreams(StreamDescription[] streamDescriptionList)\n throws IOException, SoapException;\n /**\n * adds a stream\n * @param argname stream description of new stream\n * @throws IOException\n * @throws SoapException\n */\n void addStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Removes a stream\n * @param argname The stream to remove\n * @throws IOException\n * @throws SoapException\n */\n void removeStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Sets the point of reference for network traffic\n * @param url The url of the point of reference server\n * @throws IOException\n * @throws SoapException\n */\n void setPointOfReference(String url)\n throws IOException, SoapException;\n\n /**\n * Sets the encryption\n * @param encryption The encryption\n * @throws IOException\n * @throws SoapException\n */\n void setEncryption(String encryption)\n throws IOException, SoapException;\n /**\n * Instructs the client to run automatic bridging\n * @throws IOException\n * @throws SoapException\n */\n void runAutomaticBridging()\n throws IOException, SoapException;\n\n /**\n * Determines if a service is enabled\n * @param service The service to get the status of\n * @return True if enabled, false otherwise\n * @throws IOException\n * @throws SoapException\n */\n boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;\n\n /**\n * Enables or disables a service\n * @param service The service to control\n * @param enabled True to enable, false to disable\n * @throws IOException\n * @throws SoapException\n */\n void enableService(AGServiceDescription service, boolean enabled)\n throws IOException, SoapException;\n\n /**\n * Gets the configuration parameters of a service\n * @param service The service to get the configuration of\n * @return The parameters\n * @throws IOException\n * @throws SoapException\n */\n AGParameter[] getServiceConfiguration(AGServiceDescription service)\n throws IOException, SoapException;\n /**\n * Sets the configuration parameters for a service\n * @param service The service to configure\n * @param config The new parameters\n * @throws IOException\n * @throws SoapException\n */\n void setServiceConfiguration(AGServiceDescription service,\n AGParameter[] config)\n throws IOException, SoapException;\n\n /**\n * Sets the client profile\n * @param profile The new profile\n * @throws IOException\n * @throws SoapException\n */\n void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;\n}",
"public interface ProductService {\n /**\n * Returns all the products\n *\n * @return a list with all the products\n */\n List<Product> retrieveProducts();\n\n /***\n * Service to store the products\n * @param product the product to be stored\n * @return the stored product\n */\n Product storeProduct(Product product);\n}",
"public interface HelloService {\n\n String sayHello(String name);\n}",
"public interface HelloService {\n\n String hello(String userName);\n}",
"java.lang.String getService();",
"java.lang.String getService();",
"java.lang.String getService();",
"interface Services {\n\tpublic int addEmployee(Connection conn, String empDesignation);\n\n\tpublic void promote(Connection conn);\n\n\tpublic void deleteEmployee(Connection conn, int empId);\n\n\tpublic void changeSupervisor(Connection conn);\n\n\t// public void showEmployeesUnderMe(Map<Integer, Employee> employees, int\n\t// empId);\n}",
"public interface DemoService {\n\n String query(String name, String age);\n}",
"public interface ServiceContext {\r\n /**\r\n * @return configuration for the service.\r\n */\r\n ServiceConfigurable service();\r\n}",
"public interface WeighInService {\n}",
"public interface HelloService {\n String hello(String name);\n}",
"public interface APIService {\n}",
"public void service() {\n\t}",
"public interface HelloService {\n\n void sayHello(String name);\n}",
"public interface HelloService {\n\n void sayHello(String name);\n}",
"public interface PaTaskItemPointViewService extends Service<PaTaskItemPointView> {\n\n}",
"public interface HelloService {\n\n public void sayHello(String name);\n}",
"public interface HelloService {\n String hello(User user);\n}",
"public interface ServiceIface {\n void service();\n}",
"public interface PredictsService extends Service<Predicts> {\n\n}",
"public interface ConsumerService extends AbstractService<Consumer> {\n String sayHello(String name);\n}",
"public interface CommunityPostItemService extends Service<CommunityPostItem> {\n\n}",
"public interface OfferService extends SimpleService<Offer> {\n List<Offer> getMyOffers();\n}",
"public interface ApiService {\n\n\n}",
"public interface MVCService {\n // Return if the service has been loaded.\n public boolean isServiceReady();\n\n // Begin loading the service from persistent storage.\n public void beginLoadingService(MVCCallback<MVCService> onServiceLoadedCallback);\n\n // Begin saving the service to persistent storage.\n public void saveService();\n}",
"public interface AnotherService {\n\n String getAnotherExample();\n}",
"Service newService();",
"public interface UserService {\n}",
"public interface UserService {\n}",
"public Object getService(String serviceName);",
"public interface SerService {\n\n List<SService> findwithPageInfo(Integer pageNo, Integer pageSize);\n\n PageInfo<SService> getPageInfo(Integer pageSize);\n\n SService findById(Integer id);\n\n void modi(SService sService);\n\n void add(SService sService, String samePasswd);\n\n void setStateS(Integer id);\n\n void delS(Integer id);\n\n\n List<SService> findS(String osUsername, String unixHost, String status, Integer accountId);\n\n void updateCost(SService sService);\n}",
"ServiceEntity getService();",
"public interface HotelInfoService extends IProvider {\n HotelInfo getInfo();\n}",
"Object getService(String serviceName);",
"public interface SponsorService {\n public Sponsor addSponsor(Sponsor sponsor) throws BaseException;\n\n public Integer updateSponsor(Sponsor sponsor) throws BaseException;\n\n public Integer updateSponsorStatusByID(Map<String,String> params) throws BaseException;\n\n public Sponsor findSponsorByID(Map<String,String> params) throws BaseException;\n\n public Page<Sponsor> findSponsorList(Map<String,String> params,PaginationParameters paginationParameters) throws BaseException;\n}",
"public interface HaService {\n\n String ha();\n}",
"public interface IHelloservice {\n public String sayHello(String name);\n}",
"public interface ApiService {\n\n}",
"public interface JanDanApiService {\n\n\n}",
"public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}",
"public interface QAService {\n}",
"public interface UserService\n{\n}",
"public interface UserInfoService extends Service<UserInfo> {\n float getHistoryRate(int userId, int day);\n\n String getEncryPhotoUrl(int userId);\n String getEncryPayPassword(String payPasswor);\n int selectByIdAndPayPassword(String userId,String payPassword);\n int computeAge(String IdNO);\n String computeSex(String IdNo);\n UserInfo anonymousUserInfo(UserInfo userInfo);\n\n List<UserInfo> findFriendByUserId(String userId);\n\n List<UserInfo> findIsAddingFriend(String userId);\n\n Boolean lockPayPassword(int uid);\n\n ErrorEnum addLockPayPassword(int uid);\n\n List<LikePeopleJoinUserInfoVo> findLikePeople(String userId);\n\n}",
"public interface PersonService {\n void addPerson(Context context, Person person);\n void updatePerson(Context context, Person person);\n}",
"public interface OrderedProductService extends Service<OrderedProduct> {\n}",
"public interface ApiService {\n\n\n\n}",
"public interface ServiceService {\n void createServices() throws IOException, TemplateException;\n\n void createService(String table) throws IOException, TemplateException;\n\n void createServiceImpls() throws IOException, TemplateException;\n\n void createServiceImpl(String table) throws IOException, TemplateException;\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService {\n void sayName();\n}",
"public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}",
"public interface BusDistributorService extends Services<BusDistributor,Long> {\r\n}",
"public interface ControllcurveService extends Service<Controllcurve> {\n\n}",
"public interface TypeOperationService {\n\n\n}",
"public interface PersonService {\n public List geAllPerson();\n public void addPerson(Person p1, Person p2);\n}",
"public interface CartService extends Service<Cart> {\n\n}",
"public interface IMaintenanceEngineerService {\n\n void post(MaintenanceEngineerPayload payload, IErrorCallback callback);\n\n void get(Long id, IErrorCallback errorCallback);\n}",
"public interface LibraryService {\n}",
"public interface ZqhDiaryService {\n int insert(ZqhDiary zqhDiary);\n\n int save(ZqhDiary zqhDiary);\n\n List<ZqhDiary> selectAll();\n\n String getToken(String appId);\n}",
"@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}",
"public interface ProductService {\n /**\n * 查询所有产品\n */\n List<Product> getAllProduct();\n\n /**\n * 添加\n * @param product\n */\n void saveProduct(Product product);\n\n /**\n * 删除\n * @param id\n */\n void deleteProduct(Integer id);\n}",
"public interface ApplicationService {\n ResourceList build(CloudBlueprint cloudBlueprint);\n List<Server> getServers(String environment);\n Map<String, JsonBall> getServerDetail(String serverName);\n}",
"public interface ServiceCallHandler {\r\n\r\n\t/**\r\n\t * Method responsible for handling a service call in the appropriate instance driver\r\n\t * \r\n\t * @param serviceCall ServiceCall message Received.\r\n\t * @return serviceResponse returned from the service.\r\n\t */\r\n\tpublic Response handleServiceCall(Call serviceCall, CallContext messageContext) throws DriverManagerException;\r\n}",
"public interface SeatService extends Service {\r\n\t/**\r\n\t * gets all seats with their states by film session id\r\n\t * \r\n\t * @param filmSessionId\r\n\t * film session id\r\n\t * @return list of seats with their states\r\n\t */\r\n\tList<Seat> getSeatsWithState(int filmSessionId);\r\n\r\n\t/**\r\n\t * check is seat free\r\n\t * \r\n\t * @param seatId\r\n\t * checking seat id\r\n\t * @param filmSessionId\r\n\t * film session id\r\n\t * @return {@code true} if seat free, {@code false} otherwise\r\n\t */\r\n\tboolean isSeatFree(int seatId, int filmSessionId);\r\n\r\n\t/**\r\n\t * gets seat by id\r\n\t * \r\n\t * @param seatId\r\n\t * seat id\r\n\t * @return found seat\r\n\t */\r\n\tSeat getSeat(int seatId);\r\n\r\n}",
"public interface IPersonService {\n List<Person> list();\n Person show(int id);\n void add(Person p);\n void update(Person p);\n void destory(int id);\n}",
"public interface GoodStyleService extends Service<GoodStyle> {\n\n}",
"public interface UserInfoService extends IService {\n String getUserId();\n String getUserToken();\n}",
"public interface ProducerService {\n}",
"public interface ReviewServiceFactory extends ServiceFactory {\n}",
"public interface Service {\n /**\n * Processes a query, returning result as a string.\n */\n String processQuery(String query);\n }",
"public interface UserService extends BaseService {\n\n ServiceResultHander getPage(int pn, String name);\n\n ServiceResultHander insert(User user);\n\n ServiceResultHander update(Integer id, String name, Integer age);\n\n ServiceResultHander delete(Integer id);\n}",
"public interface FeatureService {\n /**\n * 添加\n */\n public Integer addFeature(WebParam map);\n\n /**\n * 根据主键查找\n */\n public WebResultMap getFeatureByKey(WebParam map);\n\n /**\n * 根据主键批量查找\n */\n public List<WebResultMap> getFeaturesByKeys(WebParam map);\n\n /**\n * 根据主键删除\n */\n public Integer deleteByKey(WebParam map);\n\n /**\n * 根据主键批量删除\n */\n public Integer deleteByKeys(WebParam map);\n\n /**\n * 根据主键更新\n */\n public Integer updateFeatureByKey(WebParam map);\n\n /**\n * 分页查询\n */\n public Pagination getFeatureListWithPage(WebParam map);\n\n /**\n * 集合查询\n */\n public List<WebResultMap> getFeatureList(WebParam map);\n\n /**\n * 总条数\n */\n public int getFeatureListCount(WebParam map);\n}",
"public interface GoodsTypeService {\n /**\n * 更新商品类型\n *\n * @param gtn\n * @return\n */\n public int updateGoodsTypeTN(GoodsType gtn);\n /**\n * 添加商品规格关系\n * @param goodsType\n * @return\n */\n public int addGoodsType(GoodsType goodsType);\n}"
] |
[
"0.78527856",
"0.7670521",
"0.765948",
"0.7653952",
"0.75823206",
"0.75823206",
"0.75753504",
"0.7523657",
"0.7477271",
"0.7477271",
"0.7446253",
"0.72904825",
"0.7281658",
"0.72537994",
"0.72422093",
"0.7184709",
"0.7184709",
"0.7184709",
"0.7179703",
"0.7177975",
"0.717201",
"0.71674687",
"0.7166424",
"0.7161173",
"0.71471536",
"0.7127566",
"0.7113697",
"0.7106261",
"0.71030307",
"0.7090484",
"0.7090484",
"0.7090484",
"0.7076907",
"0.7075296",
"0.70702624",
"0.70653266",
"0.7050813",
"0.70386547",
"0.7038421",
"0.70340633",
"0.70340633",
"0.701125",
"0.70097363",
"0.6998834",
"0.6995415",
"0.6984347",
"0.6981267",
"0.6977744",
"0.69755065",
"0.6939831",
"0.69270074",
"0.69247025",
"0.69229794",
"0.69199574",
"0.69199574",
"0.6915218",
"0.6903",
"0.6902272",
"0.690027",
"0.68913287",
"0.6890075",
"0.6885149",
"0.68796444",
"0.6873724",
"0.6871854",
"0.68605685",
"0.68586594",
"0.68575406",
"0.6821532",
"0.6815051",
"0.6806824",
"0.68049085",
"0.68048817",
"0.6794671",
"0.6794671",
"0.6794671",
"0.6791365",
"0.67867625",
"0.6783236",
"0.67802954",
"0.6770425",
"0.67700964",
"0.6767089",
"0.676171",
"0.67603505",
"0.67558926",
"0.67531776",
"0.67499053",
"0.6748368",
"0.6746749",
"0.67461514",
"0.6735073",
"0.673496",
"0.67330235",
"0.67320323",
"0.67304045",
"0.6729663",
"0.6727751",
"0.67254174",
"0.67211974"
] |
0.77340025
|
1
|
/ Service provider interface
|
public interface Provider {
Service newService();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface Provider{\n Service newService();\n}",
"public interface Provider {\n //Connection connect(String url, java.util.Properties info)\n Service newService();\n}",
"public interface Provider {\n Service newService();\n}",
"public interface Provider {\n Service newService();\n}",
"public interface ProviderService\n{\n /**\n * Get all service provider.\n *\n * @return All service provider artifacts currently available or an empty\n * set if no service providers are available.\n */\n Set<ServiceProducer> getAllServiceProviders();\n\n /**\n * Get a service provider.\n *\n * @param id The id of the service provider to get.\n * @return The service artifact that represents the service provider or\n * <code>null</code> if no Service Producer was found with that id.\n */\n ServiceProducer getServiceProvider(int id);\n}",
"private static interface Service {}",
"public interface ServiceProvider {\n\n /**\n * This method allows to define a priority for a registered ServiceProvider instance. When multiple providers are\n * registered in the system the provider with the highest priority value is taken.\n *\n * @return the provider's priority (default is 0).\n */\n int getPriority();\n\n /**\n * Access a list of services, given its type. The bootstrap mechanism should\n * order the instance for precedence, hereby the most significant should be\n * first in order. If no such services are found, an empty list should be\n * returned.\n *\n * @param serviceType the service type.\n * @return The instance to be used, never {@code null}\n */\n <T> List<T> getServices(Class<T> serviceType);\n\n /**\n * Access a single service, given its type. The bootstrap mechanism should\n * order the instance for precedence, hereby the most significant should be\n * first in order and returned. If no such services are found, null is\n * returned.\n *\n * @param serviceType the service type.\n * @return The instance, (with highest precedence) or {@code null}, if no such service is available.\n */\n default <T> T getService(Class<T> serviceType) {\n return getServices(serviceType).stream().findFirst().orElse(null);\n }\n}",
"public interface Service {\n // Service-specific methods go here\n }",
"public interface HelloService extends IProvider{\n void sayHello(String name);\n}",
"public IProvider provider();",
"public interface Service {\n\n}",
"public interface Service {\n\n}",
"protected Provider() {}",
"public interface LearningSpaceServices {\n\n\n}",
"Provider createProvider();",
"public interface HotelInfoService extends IProvider {\n HotelInfo getInfo();\n}",
"public interface TearcherInfoService extends Service<TearcherInfo> {\n\n}",
"public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }",
"java.lang.String getService();",
"java.lang.String getService();",
"java.lang.String getService();",
"public interface MineService {\n}",
"public interface ApiService {\n\n\n}",
"public interface ServiceContext {\r\n /**\r\n * @return configuration for the service.\r\n */\r\n ServiceConfigurable service();\r\n}",
"public interface APIService {\n}",
"public interface CommunityPostItemService extends Service<CommunityPostItem> {\n\n}",
"public interface SmartCultureFarmService extends Service<SmartCultureFarm> {\n\n}",
"public interface ProductService {\n /**\n * Returns all the products\n *\n * @return a list with all the products\n */\n List<Product> retrieveProducts();\n\n /***\n * Service to store the products\n * @param product the product to be stored\n * @return the stored product\n */\n Product storeProduct(Product product);\n}",
"public interface MainProvider extends IProvider {\n void providerMain(Context context);\n}",
"public void service() {\n\t}",
"public interface EzService {\n}",
"public interface DemoService {\n String sayHello(String name);\n\n public List getUsers();\n}",
"public interface DemoService {\n\n String query(String name, String age);\n}",
"public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}",
"public interface PaTaskItemPointViewService extends Service<PaTaskItemPointView> {\n\n}",
"public interface HelloService {\n\n String greet (String userName);\n\n}",
"public interface ServiceManagerInterface {\n\n /**\n * add a Service\n * @param servicePackage the service package to register\n * @param configuration The configuration of the client\n * @param profile the client profile\n * @return The added service description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription addService(\n AGServicePackageDescription servicePackage,\n AGParameter[] configuration,\n ClientProfile profile)\n throws IOException, SoapException;\n\n /**\n * gets the service manager description\n * @return service manager description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceManagerDescription getDescription()\n throws IOException, SoapException;\n\n /**\n * gets the url of the node service\n * @return url of node service\n * @throws IOException\n * @throws SoapException\n */\n String getNodeServiceUrl()\n throws IOException, SoapException;\n\n /**\n * gets the available services\n * @return a vector of available services\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription[] getServices()\n throws IOException, SoapException;\n\n /**\n * test whether the service manager is valid\n * @return the 'valid' state\n * @throws IOException\n * @throws SoapException\n */\n int isValid() throws IOException, SoapException;\n\n /**\n * removes a service from the service manager\n * @param serviceDescription the description of the service to be removed\n * @throws IOException\n * @throws SoapException\n */\n void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;\n\n /**\n * removes all services from the service manager\n * @throws IOException\n * @throws SoapException\n */\n void removeServices() throws IOException, SoapException;\n\n /**\n * sets the url for node service\n * @param nodeServiceUri\n * @throws IOException\n * @throws SoapException\n */\n void setNodeServiceUrl(String nodeServiceUri)\n throws IOException, SoapException;\n\n /**\n * shuts down the service manager\n * @throws IOException\n * @throws SoapException\n */\n void shutdown() throws IOException, SoapException;\n\n /**\n * stops all services on service manager\n * @throws IOException\n * @throws SoapException\n */\n void stopServices() throws IOException, SoapException;\n\n /**\n * gets the version number of the service manager\n * @return string with version of service manager\n * @throws IOException\n * @throws SoapException\n */\n String getVersion() throws IOException, SoapException;\n\n\n /**\n * Requests to join a bridge\n * @param bridgeDescription The description of the bridge\n * @throws IOException\n * @throws SoapException\n */\n void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;\n\n /**\n * Sets the streams of this service manager\n *\n * @param streamDescriptionList a vector of stream descriptions\n * @throws IOException\n * @throws SoapException\n */\n void setStreams(StreamDescription[] streamDescriptionList)\n throws IOException, SoapException;\n /**\n * adds a stream\n * @param argname stream description of new stream\n * @throws IOException\n * @throws SoapException\n */\n void addStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Removes a stream\n * @param argname The stream to remove\n * @throws IOException\n * @throws SoapException\n */\n void removeStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Sets the point of reference for network traffic\n * @param url The url of the point of reference server\n * @throws IOException\n * @throws SoapException\n */\n void setPointOfReference(String url)\n throws IOException, SoapException;\n\n /**\n * Sets the encryption\n * @param encryption The encryption\n * @throws IOException\n * @throws SoapException\n */\n void setEncryption(String encryption)\n throws IOException, SoapException;\n /**\n * Instructs the client to run automatic bridging\n * @throws IOException\n * @throws SoapException\n */\n void runAutomaticBridging()\n throws IOException, SoapException;\n\n /**\n * Determines if a service is enabled\n * @param service The service to get the status of\n * @return True if enabled, false otherwise\n * @throws IOException\n * @throws SoapException\n */\n boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;\n\n /**\n * Enables or disables a service\n * @param service The service to control\n * @param enabled True to enable, false to disable\n * @throws IOException\n * @throws SoapException\n */\n void enableService(AGServiceDescription service, boolean enabled)\n throws IOException, SoapException;\n\n /**\n * Gets the configuration parameters of a service\n * @param service The service to get the configuration of\n * @return The parameters\n * @throws IOException\n * @throws SoapException\n */\n AGParameter[] getServiceConfiguration(AGServiceDescription service)\n throws IOException, SoapException;\n /**\n * Sets the configuration parameters for a service\n * @param service The service to configure\n * @param config The new parameters\n * @throws IOException\n * @throws SoapException\n */\n void setServiceConfiguration(AGServiceDescription service,\n AGParameter[] config)\n throws IOException, SoapException;\n\n /**\n * Sets the client profile\n * @param profile The new profile\n * @throws IOException\n * @throws SoapException\n */\n void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;\n}",
"public interface UserService extends IProvider {\n\n User getUser();\n\n int insert(User user);\n}",
"public interface JanDanApiService {\n\n\n}",
"public interface ApiService {\n\n}",
"public interface HelloService {\n\n String sayHello(String name);\n\n}",
"public interface LibraryService {\n}",
"interface Services {\n\tpublic int addEmployee(Connection conn, String empDesignation);\n\n\tpublic void promote(Connection conn);\n\n\tpublic void deleteEmployee(Connection conn, int empId);\n\n\tpublic void changeSupervisor(Connection conn);\n\n\t// public void showEmployeesUnderMe(Map<Integer, Employee> employees, int\n\t// empId);\n}",
"public interface ApiService {\n\n\n\n}",
"public interface IWarnHistoryService {\n}",
"public interface HelloService {\n\n String hello(String userName);\n}",
"public interface AnotherService {\n\n String getAnotherExample();\n}",
"public interface Service {\n /**\n * Processes a query, returning result as a string.\n */\n String processQuery(String query);\n }",
"private ServiceLocator(){}",
"public interface UserService {\n}",
"public interface UserService {\n}",
"public ServiceProvider() {\n super();\n setContent(\"\");\n }",
"public interface UserInfoService extends IService {\n String getUserId();\n String getUserToken();\n}",
"public interface DataDictionaryService {\n}",
"public interface DemoService {\n\n String sayHello(String name);\n}",
"public interface QAService {\n}",
"public interface OfferService extends SimpleService<Offer> {\n List<Offer> getMyOffers();\n}",
"public interface TypeOperationService {\n\n\n}",
"public interface ConsumerService extends AbstractService<Consumer> {\n String sayHello(String name);\n}",
"public interface HelloService {\n\n String sayHello(String name);\n}",
"public interface DemoService {\n String sayHello(String name);\n}",
"public interface WeighInService {\n}",
"public interface ServiceFactory\n{\n /**\n * Retrieves a service instance. Is provided for extensibility beyond the core service\n * set.\n *\n * @param type The class name of the service to be retrieved.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n <T extends Service> T getService(Class<T> type)\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a WorkflowService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n WorkflowService getWorkflowService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a UserService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n UserService getUserService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns an AdministrationService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n AdministrationService getAdministrationService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a QueryService.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n QueryService getQueryService()\n throws ServiceNotAvailableException, LoginFailedException;\n\n /**\n * Returns a document management service.\n *\n * @throws ServiceNotAvailableException In case the (possible remote) service could not\n * be reached.\n * @throws LoginFailedException In case the authentication to the service fails.\n *\n * @return An instance of the requested service.\n */\n DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;;\n\n /**\n * Provides explicit service resource management. May be used to release resources\n * associated with a service (like connection handles or locked instances) early.\n * <p />\n * Explicitly releasing a service may be help conserving resources but is not necessary\n * as the <code>ServiceFactory</code> provides automatic resource cleanup.\n *\n * @param service The service to be released.\n *\n * @see #close()\n */\n void release(Service service);\n\n /**\n * Releases all resources hold by the service factory and its single services. All\n * services retrieved from this ServiceFactory will be closed too.\n */\n void close();\n\n void setCredentials(Map credentials);\n\n void setProperties(Map properties);\n\n /**\n * Gets the user session id\n * @return the user session id - may be null\n */\n String getSessionId();\n}",
"public interface HelloService {\n String hello(String name);\n}",
"private RecipleazBackendService() {\n }",
"public interface MetaInformationService extends BasicEcomService{\n\n public String listMetaInformationTypesForPage(String page);\n public Integer getTotalPagesForMetaInformationTypes();\n public Integer getTotalPagesForSearchedMetaInformationTypes(String metaType);\n public String listSearchedMetaInformationTypesForPage(String metaType,String page);\n\n\n}",
"public interface IHouseVideoRealtimeService {\r\n /**\r\n * 直播列表\r\n * @param params\r\n * @return\r\n * @throws Exception\r\n */\r\n String liveList(String params) throws Exception;\r\n\r\n /**\r\n * 直播添加\r\n * @param params\r\n * @return\r\n * @throws Exception\r\n */\r\n String liveCreate(String params) throws Exception;\r\n\r\n /**\r\n * 直播详情\r\n * @param params\r\n * @return\r\n * @throws Exception\r\n */\r\n String liveDetail(String params)throws Exception;\r\n\r\n /**\r\n * 直播修改\r\n * @param params\r\n * @return\r\n * @throws Exception\r\n */\r\n String liveUpdate(String params) throws Exception;\r\n\r\n /**\r\n * 直播删除\r\n * @param params\r\n * @return\r\n * @throws Exception\r\n */\r\n String liveDelete(String params) throws Exception;\r\n}",
"public interface ChauffeurService {\n void addChauffeur(Context context, Chauffeur chauffeur);\n void resetChauffeur(Context context);\n}",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"go.micro.runtime.RuntimeOuterClass.Service getService();",
"public interface SysOperateLogProvider extends BaseProvider<SysOperateLog> {\n\n /**\n * 分页查询\n * @param map\n * @return\n */\n List<SysOperateLog> getPageInfo(Map<String,Object> map);\n\n long getCount(Map<String,Object> map);\n\n\n int addSysOperateLog(SysOperateLog sysOperateLog);\n\n List<SysOperateLog> findByIp(String operateIp);\n\n}",
"public interface OrderedProductService extends Service<OrderedProduct> {\n}",
"public interface OfficialWebsiteHistoryService extends Service<OfficialWebsiteHistory> {\n\n}",
"public ProviderService() {\r\n super(TAG, SASOCKET_CLASS);\r\n }",
"public interface HelloService {\n String hello(User user);\n}",
"public interface IApiManager {\n public BoatitService getSERVICE();\n}",
"public interface UserService\n{\n}",
"public interface CartService extends Service<Cart> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface UserService extends Service<User> {\n\n}",
"public interface SysPermissionService {\n}",
"public interface IContractMgtService {\n\n}",
"public interface ProducerService {\n}",
"public interface HelloService {\n\n void sayHello(String name);\n}",
"public interface HelloService {\n\n void sayHello(String name);\n}",
"Service newService();",
"ServiceEntity getService();",
"public interface ServiceCallHandler {\r\n\r\n\t/**\r\n\t * Method responsible for handling a service call in the appropriate instance driver\r\n\t * \r\n\t * @param serviceCall ServiceCall message Received.\r\n\t * @return serviceResponse returned from the service.\r\n\t */\r\n\tpublic Response handleServiceCall(Call serviceCall, CallContext messageContext) throws DriverManagerException;\r\n}",
"public interface ConfigService {\n\n\n /**\n * eureka配置\n *\n * @param sb\n * @param addr\n */\n void eureka(StringBuilder sb, String addr);\n\n /**\n * redis配置\n *\n * @param sb\n * @param addr\n */\n void redis(StringBuilder sb, String addr);\n\n\n /**\n * 数据源配置\n *\n * @param sb\n */\n void thymeleafAndDatasource(StringBuilder sb);\n\n\n /**\n * 关于mybatis的配置\n *\n * @param sb\n * @param packages\n */\n void mybatis(StringBuilder sb, String packages);\n\n\n /**\n * 分页插件配置\n *\n * @param sb\n */\n void pagehelper(StringBuilder sb);\n\n /**\n * 生成application.yml\n *\n * @param name\n */\n void application(String name);\n\n\n /**\n * 生成application-xxx.yml\n *\n * @param branch\n * @param packages\n */\n void applicationBranch(String branch, String packages);\n\n\n /**\n * log文件\n *\n */\n void logBack();\n}",
"public interface MVCService {\n // Return if the service has been loaded.\n public boolean isServiceReady();\n\n // Begin loading the service from persistent storage.\n public void beginLoadingService(MVCCallback<MVCService> onServiceLoadedCallback);\n\n // Begin saving the service to persistent storage.\n public void saveService();\n}",
"public interface ISteamProvider {\n}",
"public interface BancoProvider extends Provider<String>{\n\n}",
"public interface IPersonService {\n List<Person> list();\n Person show(int id);\n void add(Person p);\n void update(Person p);\n void destory(int id);\n}",
"public interface ServiceIface {\n void service();\n}",
"public interface SerService {\n\n List<SService> findwithPageInfo(Integer pageNo, Integer pageSize);\n\n PageInfo<SService> getPageInfo(Integer pageSize);\n\n SService findById(Integer id);\n\n void modi(SService sService);\n\n void add(SService sService, String samePasswd);\n\n void setStateS(Integer id);\n\n void delS(Integer id);\n\n\n List<SService> findS(String osUsername, String unixHost, String status, Integer accountId);\n\n void updateCost(SService sService);\n}",
"public interface ProductService {\n /**\n * 查询所有产品\n */\n List<Product> getAllProduct();\n\n /**\n * 添加\n * @param product\n */\n void saveProduct(Product product);\n\n /**\n * 删除\n * @param id\n */\n void deleteProduct(Integer id);\n}",
"public interface HelloService {\n\n public void sayHello(String name);\n}",
"@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}"
] |
[
"0.7691906",
"0.7670568",
"0.76046085",
"0.76046085",
"0.7584388",
"0.75819415",
"0.7508866",
"0.7460124",
"0.73341495",
"0.7291436",
"0.7227657",
"0.7227657",
"0.70444256",
"0.7043399",
"0.70363986",
"0.7035569",
"0.69967484",
"0.69203967",
"0.6918586",
"0.6918586",
"0.6918586",
"0.69111073",
"0.6882587",
"0.68438023",
"0.6843645",
"0.68398505",
"0.6833337",
"0.68250513",
"0.6824681",
"0.68009084",
"0.67952186",
"0.6792868",
"0.6780928",
"0.6777336",
"0.67695546",
"0.676009",
"0.6743025",
"0.6736184",
"0.6734291",
"0.6720099",
"0.67187417",
"0.671269",
"0.670574",
"0.66982645",
"0.6681885",
"0.66767913",
"0.6671115",
"0.6670299",
"0.66681504",
"0.66674614",
"0.66674614",
"0.666622",
"0.66655725",
"0.6661649",
"0.66559595",
"0.66498995",
"0.6648417",
"0.6644205",
"0.66422784",
"0.6637704",
"0.66350424",
"0.66299605",
"0.66175836",
"0.65941626",
"0.6592399",
"0.65886986",
"0.6586619",
"0.6577464",
"0.65768844",
"0.65768844",
"0.65768844",
"0.65758806",
"0.65757936",
"0.65730566",
"0.6572148",
"0.6570347",
"0.65674204",
"0.6566803",
"0.6563011",
"0.6560367",
"0.6560367",
"0.6560367",
"0.65570784",
"0.65567136",
"0.6554285",
"0.6553346",
"0.6553346",
"0.65512073",
"0.6550265",
"0.6549781",
"0.65484154",
"0.65482974",
"0.65463907",
"0.6541713",
"0.65394455",
"0.65380675",
"0.6527969",
"0.6525454",
"0.65245646",
"0.6523527"
] |
0.79806745
|
0
|
TODO: Warning this method won't work in the case the id fields are not set
|
@Override
public boolean equals(Object object) {
if (!(object instanceof Customer)) {
return false;
}
Customer other = (Customer) object;
if ((this.cusId == null && other.cusId != null) || (this.cusId != null && !this.cusId.equals(other.cusId))) {
return false;
}
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public int getId(){ return id; }",
"public int getId() {return id;}",
"public int getId() {return Id;}",
"public int getId(){return id;}",
"public void setId(long id) {\n id_ = id;\n }",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId(){return id;}",
"public int id() {return id;}",
"public long getId(){return this.id;}",
"public int getId(){\r\n return this.id;\r\n }",
"@Override public String getID() { return id;}",
"public Long id() { return this.id; }",
"public Integer getId() { return id; }",
"@Override\n\tpublic Integer getId() {\n return id;\n }",
"@Override\n public Long getId () {\n return id;\n }",
"@Override\n public long getId() {\n return id;\n }",
"public Long getId() {return id;}",
"public Long getId() {return id;}",
"public String getId(){return id;}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public Integer getId() { return this.id; }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public int getId() {\n return id;\n }",
"public long getId() { return _id; }",
"public int getId() {\n/* 35 */ return this.id;\n/* */ }",
"public long getId() { return id; }",
"public long getId() { return id; }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public Long getId() {\n return id;\n }",
"public long getId() { return this.id; }",
"public int getId()\n {\n return id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}",
"protected abstract String getId();",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public int getID() {return id;}",
"public int getID() {return id;}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getId ()\r\n {\r\n return id;\r\n }",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"public int getId(){\r\n return localId;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n public Integer getId() {\n return id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"public int getId()\r\n {\r\n return id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"final protected int getId() {\n\t\treturn id;\n\t}",
"public abstract Long getId();",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"@Override\n public long getId() {\n return this.id;\n }",
"public String getId(){ return id.get(); }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public Long getId() \n {\n return id;\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public int getID(){\n return id;\n }",
"public int getId()\n {\n return id;\n }",
"public String getID(){\n return Id;\n }"
] |
[
"0.6896886",
"0.6838461",
"0.67056817",
"0.66419715",
"0.66419715",
"0.6592331",
"0.6579151",
"0.6579151",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.6574321",
"0.65624106",
"0.65624106",
"0.65441847",
"0.65243006",
"0.65154546",
"0.6487427",
"0.6477893",
"0.6426692",
"0.6418966",
"0.6416817",
"0.6401561",
"0.63664836",
"0.63549376",
"0.63515353",
"0.6347672",
"0.6324549",
"0.6319196",
"0.6301484",
"0.62935394",
"0.62935394",
"0.62832105",
"0.62710917",
"0.62661785",
"0.6265274",
"0.6261401",
"0.6259253",
"0.62559646",
"0.6251244",
"0.6247282",
"0.6247282",
"0.6245526",
"0.6238957",
"0.6238957",
"0.6232451",
"0.62247443",
"0.6220427",
"0.6219304",
"0.6211484",
"0.620991",
"0.62023336",
"0.62010616",
"0.6192621",
"0.61895776",
"0.61895776",
"0.61893976",
"0.61893976",
"0.61893976",
"0.6184292",
"0.618331",
"0.61754644",
"0.6173718",
"0.6168409",
"0.6166131",
"0.6161708",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.6157667",
"0.61556244",
"0.61556244",
"0.61430943",
"0.61340135",
"0.6128617",
"0.6127841",
"0.61065215",
"0.61043483",
"0.61043483",
"0.6103568",
"0.61028486",
"0.61017346",
"0.6101399",
"0.6098963",
"0.6094214",
"0.6094",
"0.6093529",
"0.6093529",
"0.6091623",
"0.60896",
"0.6076881",
"0.60723215",
"0.6071593",
"0.6070138",
"0.6069936",
"0.6069529"
] |
0.0
|
-1
|
OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory(); // with the default reasoner OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory(); // with HermiT reasoner
|
public static void verify(OWLOntology ont) throws OWLOntologyCreationException{
OWLReasonerFactory reasonerFactory = new ElkReasonerFactory(); // with ELK reasoner
LogManager.getLogger("org.semanticweb.elk").setLevel(Level.OFF); // Level.ERROR
//LogManager.getLogger("org.semanticweb.elk.reasoner.indexing").setLevel(Level.ERROR);
OWLReasoner reasoner = reasonerFactory.createReasoner(ont);
boolean consistent = reasoner.isConsistent();
System.out.println("\n\nOntology consistency : " + consistent);
/** Now print out any unsatisfiable classes*/
//System.out.println("\nUnsatisfiable classes : ");
int i=0;
for (OWLClass cls : ont.getClassesInSignature()) {
if (!reasoner.isSatisfiable(cls)) {
i++;
//System.out.println(i+"/. "+ cls.getIRI().getFragment());
}
}
// Another method for extracting unsatisfiable classes
/**
System.out.println("\nUnsatisfiable classes : ");
int j=0;
for(OWLClass cls : reasoner.getUnsatisfiableClasses()){
if(!insatis.isOWLNothing()){
j++;
System.out.println(j+ "/. "+ cls.getIRI().getFragment());
}
}
*/
// Another method for extracting unsatisfiable classes
/**
System.out.println("\nUnsatisfiable classes : ");
Node<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();
// This node contains owl:Nothing and all the classes that are
// equivalent to owl:Nothing - i.e. the unsatisfiable classes. We just
// want to print out the unsatisfiable classes excluding owl:Nothing,
// and we can used a convenience method on the node to get these
int k=0;
for (OWLClass cls : bottomNode.getEntitiesMinusBottom()) {
k++;
System.out.println(k+"/. "+ cls.getIRI().getFragment());
}
*/
//System.out.println("\nOntology consistency : " + consistent);
System.out.println("Number of unsatisfiable classes : " + i);
reasoner.dispose();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void shouldUseReasoner() throws Exception {\n // Create our ontology manager in the usual way.\n OWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n OWLOntology ont = load(manager);\n\n //df = manager.getOWLDataFactory();\n // We need to create an instance of OWLReasoner. An OWLReasoner provides\n // the basic query functionality that we need, for example the ability\n // obtain the subclasses of a class etc. To do this we use a reasoner\n // factory. Create a reasoner factory. In this case, we will use HermiT,\n // but we could also use FaCT++ (http://code.google.com/p/factplusplus/)\n // or Pellet(http://clarkparsia.com/pellet) Note that (as of 03 Feb\n // 2010) FaCT++ and Pellet OWL API 3.0.0 compatible libraries are\n // expected to be available in the near future). For now, we'll use\n // HermiT HermiT can be downloaded from http://hermit-reasoner.com Make\n // sure you get the HermiT library and add it to your class path. You\n // can then instantiate the HermiT reasoner factory: Comment out the\n // first line below and uncomment the second line below to instantiate\n // the HermiT reasoner factory. You'll also need to import the\n // org.semanticweb.HermiT.Reasoner package.\n OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory();\n // OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory();\n // We'll now create an instance of an OWLReasoner (the implementation\n // being provided by HermiT as we're using the HermiT reasoner factory).\n // The are two categories of reasoner, Buffering and NonBuffering. In\n // our case, we'll create the buffering reasoner, which is the default\n // kind of reasoner. We'll also attach a progress monitor to the\n // reasoner. To do this we set up a configuration that knows about a\n // progress monitor. Create a console progress monitor. This will print\n // the reasoner progress out to the console.\n // ConsoleProgressMonitor progressMonitor = new\n // ConsoleProgressMonitor();\n // Specify the progress monitor via a configuration. We could also\n // specify other setup parameters in the configuration, and different\n // reasoners may accept their own defined parameters this way.\n // OWLReasonerConfiguration config = new SimpleConfiguration(\n // progressMonitor);\n // Create a reasoner that will reason over our ontology and its imports\n // closure. Pass in the configuration.\n // OWLReasoner reasoner = reasonerFactory.createReasoner(ont, config);\n OWLReasoner reasoner = reasonerFactory.createReasoner(ont);\n // Ask the reasoner to do all the necessary work now\n reasoner.precomputeInferences();\n // We can determine if the ontology is actually consistent (in this\n // case, it should be).\n boolean consistent = reasoner.isConsistent();\n System.out.println(\"Consistent: \" + consistent);\n // We can easily get a list of unsatisfiable classes. (A class is\n // unsatisfiable if it can't possibly have any instances). Note that the\n // getUnsatisfiableClasses method is really just a convenience method\n // for obtaining the classes that are equivalent to owl:Nothing.\n Node<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();\n // This node contains owl:Nothing and all the classes that are\n // equivalent to owl:Nothing - i.e. the unsatisfiable classes. We just\n // want to print out the unsatisfiable classes excluding owl:Nothing,\n // and we can used a convenience method on the node to get these\n Set<OWLClass> unsatisfiable = bottomNode.getEntitiesMinusBottom();\n if (!unsatisfiable.isEmpty()) {\n System.out.println(\"The following classes are unsatisfiable: \");\n for (OWLClass cls : unsatisfiable) {\n System.out.println(\" \" + cls);\n }\n } else {\n System.out.println(\"There are no unsatisfiable classes\");\n }\n // Now we want to query the reasoner for all descendants of Marsupial.\n // Vegetarians are defined in the ontology to be animals that don't eat\n // animals or parts of animals.\n OWLDataFactory fac = manager.getOWLDataFactory();\n // Get a reference to the vegetarian class so that we can as the\n // reasoner about it. The full IRI of this class happens to be:\n // <http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Marsupials>\n OWLClass marsupials = fac.getOWLClass(IRI.create(\n \"http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Marsupials\"));\n // Now use the reasoner to obtain the subclasses of Marsupials. We can\n // ask for the direct subclasses or all of the (proper)\n // subclasses. In this case we just want the direct ones\n // (which we specify by the \"true\" flag).\n NodeSet<OWLClass> subClses = reasoner.getSubClasses(marsupials, true);\n // The reasoner returns a NodeSet, which represents a set of Nodes. Each\n // node in the set represents a subclass of Marsupial. A node of\n // classes contains classes, where each class in the node is equivalent.\n // For example, if we asked for the subclasses of some class A and got\n // back a NodeSet containing two nodes {B, C} and {D}, then A would have\n // two proper subclasses. One of these subclasses would be equivalent to\n // the class D, and the other would be the class that is equivalent to\n // class B and class C. In this case, we don't particularly care about\n // the equivalences, so we will flatten this set of sets and print the\n // result\n Set<OWLClass> clses = subClses.getFlattened();\n for (OWLClass cls : clses) {\n System.out.println(\" \" + cls);\n }\n // We can easily\n // retrieve the instances of a class. In this example we'll obtain the\n // instances of the class Marsupials.\n NodeSet<OWLNamedIndividual> individualsNodeSet = reasoner.getInstances(marsupials, false);\n // The reasoner returns a NodeSet again. This time the NodeSet contains\n // individuals. Again, we just want the individuals, so get a flattened\n // set.\n Set<OWLNamedIndividual> individuals = individualsNodeSet.getFlattened();\n for (OWLNamedIndividual ind : individuals) {\n System.out.println(\" \" + ind);\n }\n // Again, it's worth noting that not all of the individuals that are\n // returned were explicitly stated to be marsupials. Finally, we can ask\n // for the property values (property assertions in OWL speak) for a\n // given\n // individual and property.\n // Let's get all properties for all individuals\n for (OWLNamedIndividual i : ont.getIndividualsInSignature()) {\n for (OWLObjectProperty p : ont.getObjectPropertiesInSignature()) {\n NodeSet<OWLNamedIndividual> individualValues = reasoner.getObjectPropertyValues(i, p);\n System.out.println(\"Vazio: \"+individualValues.isEmpty());\n Set<OWLNamedIndividual> values = individualValues.getFlattened();\n System.out.println(\"The property values for \"+p+\" for individual \"+i+\" are: \");\n for (OWLNamedIndividual ind : values) {\n System.out.println(\" \" + ind);\n }\n }\n }\n // Finally, let's print out the class hierarchy.\n Node<OWLClass> topNode = reasoner.getTopClassNode();\n print(topNode, reasoner, 0);\n\n\n }",
"private OWLReasoner createDLReasoner(OWLOntology o) {\n return new ReasonerFactory().createReasoner(o);\n //return new ElkReasonerFactory().createReasoner(o);\n }",
"public void test_afs_01() {\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Class rdf:about='http://example.org/foo#A'>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n String sourceA =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' \"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <rdf:Description rdf:about='http://example.org/foo#x'>\"\n + \" <rdf:type rdf:resource='http://example.org/foo#A' />\"\n + \" </rdf:Description>\"\n + \"</rdf:RDF>\";\n \n Model tBox = ModelFactory.createDefaultModel();\n tBox.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n Model aBox = ModelFactory.createDefaultModel();\n aBox.read(new ByteArrayInputStream(sourceA.getBytes()), \"http://example.org/foo\");\n \n Reasoner reasoner = ReasonerRegistry.getOWLReasoner();\n reasoner = reasoner.bindSchema(tBox);\n \n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM_RULE_INF);\n spec.setReasoner(reasoner);\n \n OntModel m = ModelFactory.createOntologyModel(spec, aBox);\n \n List inds = new ArrayList();\n for (Iterator i = m.listIndividuals(); i.hasNext();) {\n inds.add(i.next());\n }\n \n assertTrue(\"x should be an individual\", inds.contains(m.getResource(\"http://example.org/foo#x\")));\n \n }",
"public void initReasoner() throws IllegalConfigurationException, OWLOntologyCreationException {\n\t\tOntopSQLOWLAPIConfiguration config = (OntopSQLOWLAPIConfiguration) OntopSQLOWLAPIConfiguration.defaultBuilder()\n .nativeOntopMappingFile(_obdaFile)\n .ontologyFile(_owlFile)\n .propertyFile(_propertyFile)\n .enableTestMode()\n .build();\n\t\tOntopOWLFactory factory = OntopOWLFactory.defaultFactory();\n\t\t_reasoner = factory.createReasoner(config);\n\t}",
"public void test_hk_01() {\n // synthesise a mini-document\n String base = \"http://jena.hpl.hp.com/test#\";\n String doc =\n \"<rdf:RDF\"\n + \" xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Ontology rdf:about=\\\"\\\">\"\n + \" <owl:imports rdf:resource=\\\"http://www.w3.org/2002/07/owl\\\" />\"\n + \" </owl:Ontology>\"\n + \"</rdf:RDF>\";\n \n // read in the base ontology, which includes the owl language\n // definition\n // note OWL_MEM => no reasoner is used\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.getDocumentManager().setMetadataSearchPath( \"file:etc/ont-policy-test.rdf\", true );\n m.read(new ByteArrayInputStream(doc.getBytes()), base);\n \n // we need a resource corresponding to OWL Class but in m\n Resource owlClassRes = m.getResource(OWL.Class.getURI());\n \n // now can we see this as an OntClass?\n OntClass c = (OntClass) owlClassRes.as(OntClass.class);\n assertNotNull(\"OntClass c should not be null\", c);\n \n //(OntClass) (ontModel.getProfile().CLASS()).as(OntClass.class);\n \n }",
"public interface MyOntologyService {\n\n OWLOntology readMyOntology(OWLOntologyManager ontManager, String owlFilePath);\n\n OWLNamedIndividual applyClassAssertionFromObject(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n Object obj,\n String indName);\n\n void applyObjectPropertyAssertion(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_obj,\n String objectPropertyName,\n OWLNamedIndividual ind_field_obj);\n\n OWLObjectPropertyAssertionAxiom getObjectPropertyAssertionAxiom(\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n OWLNamedIndividual ind_object);\n\n void applyDataPropertyAssertion(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_obj,\n String dataPropertyName,\n Object data);\n\n OWLDataPropertyAssertionAxiom getDataPropertyAssertionAxiom(\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n Object data);\n\n OWLObjectProperty getObjectProperty(\n String propName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n OWLDataProperty getDataProperty(\n String propName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n OWLNamedIndividual getNamedIndividual(\n String indName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n boolean isObjectPropEntailed(\n PelletReasoner reasoner,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n OWLNamedIndividual ind_object);\n\n boolean isDataPropEntailed(\n PelletReasoner reasoner,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n Object data);\n\n// void createRuleObjectForTest(\n// OWLOntologyManager ontManager,\n// OWLDataFactory factory,\n// OWLOntology myOntology,\n// PrefixOWLOntologyFormat pm\n// );\n\n // Dilara's method\n //This method is to use OWL API and create rule from our own Rule object.\n SWRLRule getOWLRepresentation(RuleForPrinego rule);\n\n RuleForPrinego SWRLtoRule(SWRLRule swl);\n\n List<SWRLRule> listRules(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm\n );\n\n boolean createRule(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n SWRLRule rule\n );\n\n boolean deleteRule(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n SWRLRule rule\n );\n\n}",
"public OWLModel getKnowledgeBase();",
"SWRLRule getOWLRepresentation(RuleForPrinego rule);",
"public void initWithPelletReasoner()\r\n\t{\r\n\t\tcredits();\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);\t\r\n\t}",
"public void test_sf_945436() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <C rdf:ID='x'>\" +\n \" <rdfs:label xml:lang=''>a_label</rdfs:label>\" +\n \" </C>\" +\n \" <owl:Class rdf:ID='C'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n Individual x = m.getIndividual( \"http://jena.hpl.hp.com/test#x\" );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( null) );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( \"\" ) );\n assertSame( \"fr label on resource x\", null, x.getLabel( \"fr\" ) );\n }",
"public void test_der_02() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='hasPublications'>\" +\n \" <rdfs:domain>\" +\n \" <owl:Class>\" +\n \" <owl:unionOf rdf:parseType='Collection'>\" +\n \" <owl:Class rdf:about='#Project'/>\" +\n \" <owl:Class rdf:about='#Task'/>\" +\n \" </owl:unionOf>\" +\n \" </owl:Class>\" +\n \" </rdfs:domain>\" +\n \" <rdfs:domain rdf:resource='#Dummy' />\" +\n \" <rdfs:range rdf:resource='#Publications'/>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:Class rdf:ID='Dummy'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n String NS = \"http://jena.hpl.hp.com/test#\";\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream( SOURCE.getBytes()), NS );\n \n OntClass dummy = m.getOntClass( NS + \"Dummy\" );\n // assert commented out - bug not accepted -ijd\n //TestUtil.assertIteratorValues( this, dummy.listDeclaredProperties(), \n // new Object[] {m.getObjectProperty( NS+\"hasPublications\")} );\n }",
"public static void main( String[] args ) {\n\n Model m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);\n\n\n FileManager.get().readModel( m, owlFile );\n String myOntologyName = \"http://www.w3.org/2002/07/owl#\";\n String myOntologyNS = \"http://www.w3.org/2002/07/owl#\";\n////\n////\n// String rdfPrefix = \"PREFIX rdf: <\"+RDF.getURI()+\">\" ;\n// String myOntologyPrefix = \"PREFIX \"+myOntologyName+\": <\"+myOntologyNS+\">\" ;\n// String myOntologyPrefix1 = \"PREFIX \"+myOntologyName ;\n String myOntologyPrefix2 = \"prefix pizza: <http://www.w3.org/2002/07/owl#> \";\n//\n//\n//// String queryString = myOntologyPrefix + NL\n//// + rdfPrefix + NL +\n//// \"SELECT ?subject\" ;\n \n String queryString = rdfPrefix + myOntologyPrefix2 +\n// \t\t \"prefix pizza: <http://www.w3.org/2002/07/owl#> \"+ \n \t\t \"prefix rdfs: <\" + RDFS.getURI() + \"> \" +\n \t\t \"prefix owl: <\" + OWL.getURI() + \"> \" +\n// \t\t \"select ?o where {?s ?p ?o}\";\n \n//\t\t\t\t\t\t\"select ?s where {?s rdfs:label \"苹果\"@zh}\";\n \n// \"SELECT ?label WHERE { ?subject rdfs:label ?label }\" ;\n// \"SELECT DISTINCT ?predicate ?label WHERE { ?subject ?predicate ?object. ?predicate rdfs:label ?label .}\";\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"Italy\\\"@en}\" ;\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"苹果\\\"@zh}\" ;\n// \"SELECT DISTINCT ?s WHERE\" +\n// \"{?object rdfs:label \\\"水果\\\"@zh.\" +\n// \"?subject rdfs:subClassOf ?object.\" +\n// \"?subject rdfs:label ?s}\";\n //星号是转义字符,分号是转义字符\n\t\t\t\t\"SELECT DISTINCT ?e ?s WHERE {?entity a ?subject.?subject rdfs:subClassOf ?object.\"+\n \"?object rdfs:label \\\"富士苹果\\\"@zh.?entity rdfs:label ?e.?subject rdfs:label ?s}ORDER BY ?s\";\n \t\t\n\n \n \t\tcom.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \t\tQueryExecution qe = QueryExecutionFactory.create(query, m);\n \t\tcom.hp.hpl.jena.query.ResultSet results = qe.execSelect();\n\n \t\tResultSetFormatter.out(System.out, results, query);\n \t\tqe.close();\n\n// Query query = QueryFactory.create(queryString) ;\n\n query.serialize(new IndentedWriter(System.out,true)) ;\n System.out.println() ;\n\n\n\n QueryExecution qexec = QueryExecutionFactory.create(query, m) ;\n\n try {\n\n ResultSet rs = qexec.execSelect() ;\n\n\n for ( ; rs.hasNext() ; ){\n QuerySolution rb = rs.nextSolution() ;\n RDFNode y = rb.get(\"person\");\n System.out.print(\"name : \"+y+\"--- \");\n Resource z = (Resource) rb.getResource(\"person\");\n System.out.println(\"plus simplement \"+z.getLocalName());\n }\n }\n finally{\n qexec.close() ;\n }\n }",
"public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }",
"public void initWithOutReasoner()\r\n\t{\r\n\t\tcredits();\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM);\r\n\t}",
"public interface Ontology {\n\n /**\n * Load an array URIs which resolve to ontology resources.\n *\n * @param urls a {@link java.lang.String} containing ontology URIs.\n */\n public void load(String[] urls);\n\n /**\n * Load a collection of default ontology resources.\n */\n public void load() ;\n\n /**\n * merge relevant ontology subgraphs into a new subgraph which can\n * be used within Mudrod\n *\n * @param o an ontology to merge with the current ontology held\n * within Mudrod.\n */\n public void merge(Ontology o);\n\n /**\n * Retreive all subclasses for a particular entity provided within the\n * search term e.g.subclass-based query expansion.\n *\n * @param entitySearchTerm an input search term\n * @return an {@link java.util.Iterator} object containing subClass entries.\n */\n public Iterator<String> subclasses(String entitySearchTerm);\n\n /**\n * Retreive all synonyms for a particular entity provided within the\n * search term e.g.synonym-based query expansion.\n *\n * @param queryKeyPhrase a phrase to undertake synonym expansion on.\n * @return an {@link java.util.Iterator} object containing synonym entries.\n */\n public Iterator<String> synonyms(String queryKeyPhrase);\n\n}",
"public void test_sf_969475() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='p0'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q0' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:ObjectProperty rdf:ID='p1'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q1' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n \n ObjectProperty p0 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#p0\");\n Object invP0 = p0.getInverseOf();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#q0\"), invP0 );\n assertTrue( \"Should be an ObjectProperty facet\", invP0 instanceof ObjectProperty );\n \n ObjectProperty q1 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#q1\");\n Object invQ1 = q1.getInverse();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#p1\"), invQ1 );\n assertTrue( \"Should be an ObjectProperty facet\", invQ1 instanceof ObjectProperty );\n }",
"public void test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }",
"@Test\n\tpublic void testSparqlQuery() throws OWLOntologyCreationException,\n\t\t\tIOException {\n\t\tInputStream ontStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/university0-0.owl\");\n\t\tOWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n\t\tOWLOntology ontology = manager\n\t\t\t\t.loadOntologyFromOntologyDocument(ontStream);\n\n\t\tInputStream queryStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/lubm-query4.sparql\");\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tqueryStream));\n\t\tString line;\n\t\tString queryText = \"\";\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tqueryText = queryText + line + \"\\n\";\n\t\t}\n\n\t\tQuery query = QueryFactory.create(queryText, Syntax.syntaxARQ);\n\t\tLDLPReasoner reasoner = new LDLPReasoner(ontology);\n\t\tList<Literal> results = reasoner.executeQuery(query);\n\t\tSystem.out.println(results.size() + \" answers :\");\n\t\tfor (Literal result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tLDLPCompilerManager m = LDLPCompilerManager.getInstance();\n\n\t\t// m.dump();\n\n\t}",
"public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }",
"public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}",
"public void test_dn_0() {\n OntModel schema = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM_RULES_INF, null );\n \n schema.read( \"file:doc/inference/data/owlDemoSchema.xml\", null );\n \n int count = 0;\n for (Iterator i = schema.listIndividuals(); i.hasNext(); ) {\n //Resource r = (Resource) i.next();\n i.next();\n count++;\n /* Debugging * /\n for (StmtIterator j = r.listProperties(RDF.type); j.hasNext(); ) {\n System.out.println( \"ind - \" + r + \" rdf:type = \" + j.nextStatement().getObject() );\n }\n System.out.println(\"----------\"); /**/\n }\n \n assertEquals( \"Expecting 6 individuals\", 6, count );\n }",
"public ExquisiteOWLReasoner(DiagnosisModel<OWLLogicalAxiom> dm,\r\n OWLReasonerFactory reasonerFactory)\r\n throws OWLOntologyCreationException {\r\n this(dm, reasonerFactory, null);\r\n }",
"public static void main(String []args){\n\t\tString format = \"TURTLE\";\n\t\tInputStream is = Thread.currentThread().getContextClassLoader().\n\t\t\t\tgetResourceAsStream(\"test_ontologies/cp-11.ttl\");\n\t\tOntDocumentManager dm = OntDocumentManager.getInstance();\n\t\tdm.setProcessImports(false);\n\t\tOntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_DL_MEM);\n\t\tspec.setDocumentManager(dm); \n\t\t//spec.setReasoner(reasoner);\n\t\tOntModel ontModel = ModelFactory.createOntologyModel( spec, null );\n\t\tontModel.read(is,\"\",format);\n\t\ttry {\n\t\t\tStmtIterator it = ontModel.listStatements();\n\t\t\tSystem.out.println(\"STATEMENTS\");\n\t\t\tStatement st;\n\t\t\twhile(it.hasNext()){\n\t\t\t\tst = it.next();\n\t\t\t\tif(st.getSubject().isAnon() || st.getObject().isAnon()){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(it.next());\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(\"REIFIED STATEMENTS\");\n\t\t\tRSIterator it2 = ontModel.listReifiedStatements();\n\t\t\twhile(it2.hasNext()){\n\t\t\t\tSystem.out.println(it2.next());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e);\n\t\t}\n\n\t}",
"public OWLReasoner createReasoner(OWLOntology ontology, boolean verbose, boolean showGraph) {\n\t\treturn new DMTReasoner(ontology, verbose, showGraph);\n\t}",
"public Main() {\r\n\t\t\t// TODO Auto-generated constructor stub\r\n\t OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\r\n\r\n\t // we have a local copy of the wine ontology\r\n/*\t m.getDocumentManager().addAltEntry( \"http://www.w3.org/2001/sw/WebOnt/guide-src/wine\",\r\n\t \"file:testing/reasoners/bugs/wine.owl\" );\r\n\t m.getDocumentManager().addAltEntry( \"http://www.w3.org/2001/sw/WebOnt/guide-src/food\",\r\n\t \"file:testing/reasoners/bugs/food.owl\" );*/\r\n\r\n//\t m.read( \"http://www.w3.org/2001/sw/WebOnt/guide-src/wine\" );\r\n\t m = loadOntModelFromOwlFile(\"C:\\\\Documents and Settings\\\\Administrador\\\\Escritorio\\\\Tesis\\\\Ontologias\\\\turismo2.owl\");\r\n\t ClassHierarchy classh = new ClassHierarchy();\r\n\t classh.showHierarchy2( System.out, m );\r\n\t classh.creoInd(m);\r\n\t classh.showHierarchy( System.out, m );\r\n\t\t}",
"public void test_sb_01() {\n OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null);\n \n Resource result= null;\n Resource nullValueForResourceType= null;\n \n result= model.createOntResource( OntResource.class, nullValueForResourceType, \"http://www.somewhere.com/models#SomeResourceName\" );\n assertNotNull( result );\n }",
"public void setResourceOWL(String value)\r\n {\r\n getSemanticObject().setProperty(swb_resourceOWL, value);\r\n }",
"public void test_anon_0() {\n String NS = \"http://example.org/foo#\";\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:ex='http://example.org/foo#'\"\n + \" xmlns:owl='http://www.w3.org/2002/07/owl#'>\"\n + \" <owl:ObjectProperty rdf:about='http://example.org/foo#p' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#A' />\"\n + \" <ex:A rdf:about='http://example.org/foo#x' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#B'>\"\n + \" <owl:equivalentClass>\"\n + \" <owl:Restriction>\" \n + \" <owl:onProperty rdf:resource='http://example.org/foo#p' />\" \n + \" <owl:hasValue rdf:resource='http://example.org/foo#x' />\" \n + \" </owl:Restriction>\"\n + \" </owl:equivalentClass>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n OntClass B = m.getOntClass( NS + \"B\");\n Restriction r = B.getEquivalentClass().asRestriction();\n HasValueRestriction hvr = r.asHasValueRestriction();\n RDFNode n = hvr.getHasValue();\n \n assertTrue( \"Should be an individual\", n instanceof Individual );\n }",
"public void test_hk_02() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG);\n ontModel.createAllDifferent();\n assertTrue(ontModel.listAllDifferent().hasNext());\n AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next();\n //allDifferent.setDistinct(ontModel.createList());\n assertFalse(allDifferent.listDistinctMembers().hasNext());\n }",
"UMLDomainConcept createUMLDomainConcept();",
"public interface SubstPred extends Reason {\r\n\r\n /**\r\n * Get this reason.\r\n *\r\n * @return This reason.\r\n */\r\n public SubstPred getSubstPred();\r\n\r\n /**\r\n * Get reference to already proven formula.\r\n *\r\n * @return Reference to previously proved formula.\r\n */\r\n public String getReference();\r\n\r\n /**\r\n * Get predicate variable (with subject variables as parameters) that should be replaced.\r\n *\r\n * @return Reference to previously proved formula.\r\n */\r\n public Element getPredicateVariable();\r\n\r\n /**\r\n * Get substitute formula. Must contain the subject variables from\r\n * {@link #getPredicateVariable()}.\r\n *\r\n * @return Replacement term.\r\n */\r\n public Element getSubstituteFormula();\r\n\r\n}",
"public String getDescription() {\n return \"repair terms from an ontology\";\n }",
"@rdf(FOAF.SPATIALTHING)\npublic interface SpatialThing extends Thing {\n}",
"@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }",
"private void createOntologyResources(String conceptName, String conditionName, \r\n\t\t\t\t\t\t\t\t\t\tVector<String> syndromeSensDefNames, Vector<String> syndromeSpecDefNames, \r\n\t\t\t\t\t\t\t\t\t\tString relation, String inclusionKeywords, String exclusionKeywords, \r\n\t\t\t\t\t\t\t\t\t\tVector<Coding> codes) throws Exception{\n\t\tOWLDatatypeProperty codeIDProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODE_ID);\r\n\t\tOWLDatatypeProperty codeTitleProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODE_TITLE);\r\n\t\tOWLDatatypeProperty codingSystemProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODESYSTEM_NAME);\r\n\t\tOWLDatatypeProperty nameProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_HAS_NAME);\r\n\t\tOWLObjectProperty externalCodingsProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_EXTERNAL_CODES);\r\n\r\n\t\tOWLNamedClass newConcept = null;\r\n\t\tif (conceptName == null) {\r\n\t\t\t// We need to have at least one concept associated with a condition (exact concept),\r\n\t\t\t// so if there isn't one, we need to create it.\r\n\t\t\tSystem.out.println(\"WARNING: Missing concept for condition \" + conditionName + \". A concept with the same name will be created.\");\r\n\r\n\t\t\tconceptName = conditionName.toLowerCase();\r\n\t\t\trelation = \"concept name\";\r\n\t\r\n\t\t\t// check if such concept already exists:\r\n\t\t\tnewConcept = owlModel.getOWLNamedClass(conceptName.replace(' ', '_'));\r\n\t\t}\r\n\t\t\r\n\t\tif (newConcept == null) {\r\n\t\t\t\r\n\t\t\t// 1. Create new subclass(instance) of Concept:\r\n\t\t\tOWLNamedClass conceptClass = owlModel.getOWLNamedClass(Constants.CLASS_CONCEPT);\r\n\t\t\tOWLNamedClass conceptMetaClass = owlModel.getOWLNamedClass(Constants.METACLASS_CONCEPT);\r\n\t\t\tnewConcept = (OWLNamedClass) conceptMetaClass.createInstance(conceptName.replace(' ', '_'));\r\n\t\t\tnewConcept.addSuperclass(conceptClass);\r\n\t\t\tnewConcept.removeSuperclass(owlModel.getOWLThingClass());\r\n\t\t\tnewConcept.setPropertyValue(nameProperty, conceptName);\r\n\t\t\t\r\n\t\t\t// 2. Add external codes:\r\n\t\t\tCoding c = null;\r\n\t\t\tString codeName = null;\r\n\t\t\tOWLIndividual code = null;\r\n\t\t\tOWLNamedClass codeClass = null;\r\n\r\n\t\t\tfor (int i=0; i<codes.size(); i++){\r\n\t\t\t\tc = codes.get(i);\r\n\t\t\t\tcodeName = c.system + \"_\" + c.codeID.trim().replace(' ', '_');\r\n\t\t\t\tcode = owlModel.getOWLIndividual(codeName);\r\n\t\t\t\tif (code == null) {\r\n\t\t\t\t\tcodeClass = owlModel.getOWLNamedClass(c.system);\r\n\t\t\t\t\tcode = codeClass.createOWLIndividual(codeName);\r\n\t\t\t\t\tcode.setPropertyValue(codingSystemProperty, c.system);\r\n\t\t\t\t\tcode.setPropertyValue(codeIDProperty, c.codeID);\r\n\t\t\t\t\tif (c.codeTitle != null) code.setPropertyValue(codeTitleProperty, c.codeTitle);\r\n\t\t\t\t}\r\n\t\t\t\tnewConcept.addPropertyValue(externalCodingsProperty, code);\r\n\t\t\t}\r\n\r\n\t\t\t// 3. Process keywords:\r\n\t\t\tprocessKeywordString(inclusionKeywords, newConcept, Constants.PROPERTY_HAS_INCLUSION_KEYWORDS);\r\n\t\t\tprocessKeywordString(exclusionKeywords, newConcept, Constants.PROPERTY_HAS_EXCLUSION_KEYWORDS);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"WARNING: Non-unique concept '\" + conceptName + \"' resulting from artificially creating an exact concept for a condition that did not have any associated concepts listed.\");\r\n\t\t}\r\n\t\t \t\t\r\n\t\t// 4. Check if ClinicalCondition exists, if not, create new subclass:\r\n\t\tOWLNamedClass conditionClass = owlModel.getOWLNamedClass(Constants.CLASS_CONDITION);\r\n\t\tOWLNamedClass conditionMetaClass = owlModel.getOWLNamedClass(Constants.METACLASS_CONDITION);\r\n\t\tOWLNamedClass condition = owlModel.getOWLNamedClass(conditionName.replace(' ', '_'));\r\n\r\n\t\tif (condition == null) {\r\n\t\t\tcondition = (OWLNamedClass) conditionMetaClass.createInstance(conditionName.replace(' ', '_'));\r\n\t\t\tcondition.addSuperclass(conditionClass);\r\n\t\t\tcondition.removeSuperclass(owlModel.getOWLThingClass());\r\n\t\t\tcondition.setPropertyValue(nameProperty, conditionName);\r\n\t\t\t\r\n\t\t\t// 5. Add new condition to syndrome definition(s):\r\n\t\t\tOWLObjectProperty sensitiveDefinitionProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SENSITIVE_DEFINITION);\r\n\t\t\tOWLObjectProperty specificDefinitionProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SPECIFIC_DEFINITION);\r\n\t\t\tOWLNamedClass syndromeSens = null; \r\n\t\t\tOWLNamedClass syndromeSpec = null; \r\n\t\t\tif (syndromeSensDefNames != null && syndromeSensDefNames.size() > 0) {\r\n\t\t\t\tfor (int i=0; i<syndromeSensDefNames.size(); i++){\r\n\t\t\t\t\tsyndromeSens = owlModel.getOWLNamedClass(syndromeSensDefNames.get(i));\r\n\t\t\t\t\tsyndromeSens.addPropertyValue(sensitiveDefinitionProperty, condition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (syndromeSpecDefNames != null && syndromeSpecDefNames.size() > 0) {\r\n\t\t\t\tfor (int i=0; i<syndromeSpecDefNames.size(); i++){\r\n\t\t\t\t\tsyndromeSpec = owlModel.getOWLNamedClass(syndromeSpecDefNames.get(i));\r\n\t\t\t\t\tsyndromeSpec.addPropertyValue(specificDefinitionProperty, condition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 6. Add Concept to one of the slots of ClinicalCondition\r\n\t\tOWLObjectProperty p = null;\r\n\t\tif (relation.equalsIgnoreCase(\"concept name\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_EXACT_CONCEPT);\r\n\t\t} \r\n\t\telse if (relation.substring(0, 7).equalsIgnoreCase(\"related\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_RELATED_CONCEPTS);\r\n\t\t} \r\n\t\telse if (relation.equalsIgnoreCase(\"synonym\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SYNONYMOUS_CONCEPTS);\r\n\t\t}\r\n\t\telse throw new Exception(\"Cannot determine the relation of a concept to clinical condition! Relation specified is '\" + relation + \"'.\");\r\n\t\tcondition.addPropertyValue(p, newConcept);\r\n\t}",
"public void visit(OWLOntology arg0) throws OWLException {\n\t\t\t\n\t\t}",
"public void xxtest_oh_01() {\n String NS = \"http://www.idi.ntnu.no/~herje/ja/\";\n Resource[] expected = new Resource[] {\n ResourceFactory.createResource( NS+\"reiseliv.owl#Reiseliv\" ),\n ResourceFactory.createResource( NS+\"hotell.owl#Hotell\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#Restaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteBadRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteDoRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#SkogRestaurant\" ),\n };\n \n test_oh_01scan( OntModelSpec.OWL_MEM, \"No inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, \"Mini rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, \"Full rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, \"Micro rule inf\", expected );\n }",
"public static void main(String[] args) throws Exception {\n\t\t\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/main/resources/example/ontologytemp.owl\"));\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"src/main/resources/example/test.owl\"));\n\t\t\n\t\t\n\t\t/*File owl = new File(\"/Users/user/Dropbox/Thesis/OntopCLIfiles/ontology5.owl\");\n File obda = new File(\"/Users/user/Dropbox/Thesis/OntopCLIfiles/ontology-conf.obda\");\n\t\tString baseUri = \"http://www.semanticweb.org/user/ontologies/\";\n\t\tString jdbcUrl = \"jdbc:mysql://localhost/conference10\";\n\t\tString jdbcUserName = \"root\";\n\t\tString jdbcPassword = \"root\";\n\t\tString jdbcDriverClass = \"com.mysql.jdbc.Driver\";\n\t\t\n\t\tDirectMappingBootstrapper dm = new DirectMappingBootstrapper(baseUri, jdbcUrl, jdbcUserName, jdbcPassword, jdbcDriverClass);\n\t\tOBDAModel model = dm.getModel();\n\t\tOWLOntology onto = dm.getOntology();\n\t\tModelIOManager mng = new ModelIOManager(model);\n\t\tmng.save(obda);\n onto.getOWLOntologyManager().saveOntology(onto,\n new FileDocumentTarget(owl));*/\n\t\t\n\t\t\n\t\t/*\n\t\tXFactoryBufferedImpl factory = new XFactoryBufferedImpl();\t\n\t\t\n\t\tXAttribute attr = factory.createAttributeLiteral(\"concept:name\", \"tracevalue\", null); // create attribute for trace\n\t\tXAttributeMap attrMapTrace = new XAttributeMapImpl(); // create a new map attribute\n\t\tattrMapTrace.put(\"concept:name\", attr);\t// put attribute to the map attribute\n\t\tXTrace xtrace = factory.createTrace(attrMapTrace); // create xtrace\n\t\t\n\t\tXAttributeMap attrMap = new XAttributeMapImpl(); // create a new map attribute\n\t\tattr = factory.createAttributeLiteral(\"key1\", \"value\", null); // create attribute\t\t\n\t\t//attr = factory.createAttributeLiteral(\"key2\", \"value\", null); // create attribute\n\t\tattrMap.put(\"key1\", attr); // put attribute to the map attribute\n\t\t//attrMap.put(\"key2\", attr);\n\t\tXEvent xevent = factory.createEvent(attrMap); // create xevent\n\t\txtrace.insertOrdered(xevent); // insert event in correct order in a trace\n\t\t\n\t\tattrMap = new XAttributeMapImpl(); // create a new map attribute\n\t\tattr = factory.createAttributeLiteral(\"key1\", \"value\", null); // create attribute\t\t\n\t\t//attr = factory.createAttributeLiteral(\"key2\", \"value\", null); // create attribute\n\t\tattrMap.put(\"key1\", attr); // put attribute to the map attribute\n\t\t//attrMap.put(\"key2\", attr);\n\t\tXEvent xevent2 = factory.createEvent(attrMap); // create xevent\n\t\t\n\t\tSystem.out.println(xtrace.contains(xevent2));\n\t\t*/\n\t}",
"public void test_hk_06() throws Exception {\n OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n ontModel.read(\"file:testing/ontology/bugs/test_hk_06/a.owl\");\n \n String NSa = \"http://jena.hpl.hp.com/2003/03/testont/a#\";\n String NSb = \"http://jena.hpl.hp.com/2003/03/testont/b#\";\n \n OntClass A = ontModel.getOntClass(NSa + \"A\");\n assertTrue(\"class A should be in the base model\", ontModel.isInBaseModel(A));\n \n OntClass B = ontModel.getOntClass(NSb + \"B\");\n assertFalse(\"class B should not be in the base model\", ontModel.isInBaseModel(B));\n \n assertTrue(\n \"A rdf:type owl:Class should be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(A, RDF.type, OWL.Class)));\n assertFalse(\n \"B rdf:type owl:Class should not be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(B, RDF.type, OWL.Class)));\n }",
"public void printOWLModel(){\n\t\tmodel.write(System.out, \"RDF/XML\");\t\t\n\t}",
"public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }",
"public void test_sf_978259() {\n OntModel md = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM );\n OntModel ml = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM );\n \n DataRange drd = md.createDataRange( md.createList( new Resource[] {OWL.Thing}) );\n \n assertNotNull( drd );\n \n HasValueRestriction hvrd = md.createHasValueRestriction( null, RDFS.seeAlso, OWL.Thing );\n \n assertNotNull( hvrd );\n }",
"@BeforeClass\n public static void setup() throws Exception{\n Observation systolic = new Observation();\n Observation dystolic = new Observation();\n Reference subject = new Reference().setReference(\"patient/p007\");\n systolic.setSubject(subject)\n .setCode(new CodeableConcept().addCoding(new Coding().setSystem(Constants.LOINCSYSTEM).setCode(\"8480-6\")))\n .setValue(new Quantity().setValue(150).setUnit(\"mmHg\"))\n .setInterpretation(new CodeableConcept().addCoding(new Coding().setSystem(Constants.V2OBSERVATIONINTERPRETATION).setCode(\"H\")));\n\n dystolic.setSubject(subject)\n .setCode(new CodeableConcept().addCoding(new Coding().setSystem(Constants.LOINCSYSTEM).setCode(\"8462-4\")))\n .setValue(new Quantity().setValue(100).setUnit(\"mmHg\"))\n .setInterpretation(new CodeableConcept().addCoding(new Coding().setSystem(Constants.V2OBSERVATIONINTERPRETATION).setCode(\"H\")));\n Observation.ObservationRelatedComponent related1 = new Observation.ObservationRelatedComponent();\n //related1.setTarget()\n\n Observation loincPanel = new Observation();\n loincPanel.setSubject(subject)\n .setCode(new CodeableConcept().addCoding(new Coding().setSystem(Constants.LOINCSYSTEM).setCode(\"35094-2\")))\n .setSubject(new Reference().setIdentifier(new Identifier().setSystem(\"org.jax\").setValue(\"Mouse Jerry\")));\n loincPanel.addRelated(related1);\n //.setInterpretation(new CodeableConcept().addCoding(new Coding().setSystem(\"http://hl7.org/fhir/v2/0078\").setCode(\"H\")));\n\n\n bpPanel = panelFactory.createFhirLoincPanel(new LoincId(\"35094-2\"));\n Map<LoincId, Observation> components = new HashMap<>();\n components.put(new LoincId(\"8480-6\"), systolic);\n components.put(new LoincId(\"8462-4\"), dystolic);\n bpPanel.addComponents(components);\n FhirObservationAnalyzer.init(resources.loincIdSet(), resources.annotationMap());\n FHIRLoincPanel.initResources(resources.loincIdSet(), resources.loincEntryMap(), resources.annotationMap());\n assertTrue(bpPanel.panelComponents().size() == 2);\n assertNotNull(resources.loincIdSet());\n assertTrue(resources.loincIdSet().size() > 5000);\n assertNotNull(resources.annotationMap());\n\n\n }",
"public void test_sf_927641() {\n String NS = \"http://example.org/test#\";\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n OntClass c0 = m0.createClass( NS + \"C0\" );\n OntClass c1 = m0.createClass( NS + \"C1\" );\n OntClass c2 = m0.createClass( NS + \"C2\" );\n OntClass c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 1: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 1: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 1: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 1: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n \n // second pass - with inference\n m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF );\n c0 = m0.createClass( NS + \"C0\" );\n c1 = m0.createClass( NS + \"C1\" );\n c2 = m0.createClass( NS + \"C2\" );\n c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 2: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 2: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 2: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 2: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n }",
"public void test_hk_04() {\n OntModel m = ModelFactory.createOntologyModel();\n m.getDocumentManager().addAltEntry(\n \"http://jena.hpl.hp.com/testing/ontology/relativenames\",\n \"file:testing/ontology/relativenames.rdf\");\n \n m.read(\"http://jena.hpl.hp.com/testing/ontology/relativenames\");\n assertTrue(\n \"#A should be a class\",\n m.getResource(\"http://jena.hpl.hp.com/testing/ontology/relativenames#A\").canAs(OntClass.class));\n assertFalse(\n \"file: #A should not be a class\",\n m.getResource(\"file:testing/ontology/relativenames.rdf#A\").canAs(OntClass.class));\n }",
"private static void demo_WordNetOps() throws Exception {\n\n RoWordNet r1, r2, result;\n Synset s;\n Timer timer = new Timer();\n String time = \"\";\n\n IO.outln(\"Creating two RoWN objects R1 and R2\");\n timer.start();\n r1 = new RoWordNet();\n r2 = new RoWordNet();\n\n // adding synsets to O1\n s = new Synset();\n s.setId(\"S1\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L1\"))));\n r1.addSynset(s, false); // adding synset S1 to O2;\n\n s = new Synset();\n s.setId(\"S2\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L2\"))));\n r1.addSynset(s, false); // adding synset S2 to O1;\n\n // adding synsets to O2\n s = new Synset();\n s.setId(\"S1\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L1\"))));\n r2.addSynset(s, false); // adding synset S1 to O2;\n\n s = new Synset();\n s.setId(\"S2\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L4\"))));\n r2.addSynset(s, false); // adding synset S2 to O2, but with literal L4\n // not L2;\n\n s = new Synset();\n s.setId(\"S3\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L3\"))));\n r2.addSynset(s, false); // adding synset S3 to O2;\n time = timer.mark();\n\n // print current objects\n IO.outln(\"\\n Object R1:\");\n for (Synset syn : r1.synsets) {\n IO.outln(syn.toString());\n }\n\n IO.outln(\"\\n Object R2:\");\n for (Synset syn : r2.synsets) {\n IO.outln(syn.toString());\n }\n IO.outln(\"Done: \" + time);\n\n // DIFFERENCE\n IO.outln(\"\\nOperation DIFFERENCE(R1,R2) (different synsets in R1 and R2 having the same id):\");\n timer.start();\n String[] diff = Operation.diff(r1, r2);\n time = timer.mark();\n\n for (String id : diff) {\n IO.outln(\"Different synset having the same id in both RoWN objects: \" + id);\n }\n\n IO.outln(\"Done: \" + time);\n\n // UNION\n IO.outln(\"\\nOperation UNION(R1,R2):\");\n timer.start();\n try {\n result = new RoWordNet(r1);// we copy-construct the result object\n // after r1 because the union and merge\n // methods work in-place directly on the\n // first parameter of the methods\n result = Operation.union(result, r2);\n IO.outln(\" Union object:\");\n for (Synset syn : result.synsets) {\n IO.outln(syn.toString());\n }\n } catch (Exception ex) {\n IO.outln(\"Union operation failed (as it should, as synset S2 is in both objects but has a different literal and are thus two different synsets having the same id that cannot reside in a single RoWN object). \\nException message: \" + ex\n .getMessage());\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // MERGE\n IO.outln(\"\\nOperation MERGE(R1,R2):\");\n\n result = new RoWordNet(r1);\n timer.start();\n result = Operation.merge(result, r2);\n time = timer.mark();\n\n IO.outln(\" Merged object (R2 overwritten on R1):\");\n for (Synset syn : result.synsets) {\n IO.outln(syn.toString());\n }\n IO.outln(\"Done: \" + time);\n\n // COMPLEMENT\n IO.outln(\"\\nOperation COMPLEMENT(R2,R1) (compares only synset ids):\");\n timer.start();\n String[] complement = Operation.complement(r2, r1);\n time = timer.mark();\n IO.outln(\" Complement ids:\");\n for (String id : complement) {\n IO.outln(\"Synset that is in R2 but not in R1: \" + id);\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // INTERSECTION\n IO.outln(\"\\nOperation INTERSECTION(R1,R2) (fully compares synsets):\");\n timer.start();\n String[] intersection = Operation.intersection(r1, r2);\n time = timer.mark();\n IO.outln(\" Intersection ids:\");\n for (String id : intersection) {\n IO.outln(\"Equal synset in both R1 and R2: \" + id);\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // IO.outln(((Synset) r1.getSynsetById(\"S1\")).equals((Synset)\n // r2.getSynsetById(\"S1\")));\n\n }",
"public void processOWLDefinition(ModuleItem pkg) throws SerializationException, IOException{\n ModelCompiler jarCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.JAR);\n JarModel compiledJarModel = (JarModel) jarCompiler.compile(ontoModel);\n byte[] jarBytes = compiledJarModel.buildJar().toByteArray();\n \n //Get the Working-Set from onto-model\n ModelCompiler wsCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.WORKSET);\n WorkingSetModel compiledWSModel = (WorkingSetModel) wsCompiler.compile(ontoModel);\n SemanticWorkingSetConfigData semanticWorkingSet = compiledWSModel.getWorkingSet();\n \n //Get the Fact Types DRL from onto-model\n ModelCompiler drlCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.DRL);\n DRLModel drlModel = (DRLModel)drlCompiler.compile(ontoModel);\n \n //Get the Fact Types XSD from onto-model\n ModelCompiler xsdCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.XSD);\n XSDModel xsdModel = (XSDModel)xsdCompiler.compile(ontoModel);\n \n //convert from semantic to guvnor model\n WorkingSetConfigData workingSetConfigData = this.convertSemanticWorkingSetConfigData(semanticWorkingSet);\n \n //create a second Working-Set for the Configuration (Cohort) Facts\n WorkingSetConfigData cohortWorkingSetConfigData = this.convertSemanticWorkingSetConfigData(\"Configuration Facts\", semanticWorkingSet);\n \n //create categories from working-set data\n this.createCategoryTreeFromWorkingSet(workingSetConfigData);\n \n //create the Jar Model\n this.createJarModelAsset(pkg, jarBytes);\n \n //create the working-set assets\n this.createWSAsset(pkg, workingSetConfigData);\n this.createWSAsset(pkg, cohortWorkingSetConfigData);\n \n //store the fact type drl as a generic resource\n this.storeFactTypeDRL(pkg, drlModel);\n \n //create and store the Fact Type Descriptor\n this.createFactTypeDescriptor(pkg, xsdModel);\n }",
"public SPARQL() {\n initComponents();\n \n model = ModelFactory.createOntologyModel(OntModelSpec.OWL_LITE_MEM_RDFS_INF);\n model.setDynamicImports(true);\n model.read(\"file:\"+\"data/ontologies/Papers_Ready.owl\", \"http://www.l3g.pl/ontologies/OntoBeef/Papers.owl\", \"N-TRIPLE\");\n model.loadImports();\n \n for (Individual i : model.listIndividuals(model.getOntClass(\"http://www.l3g.pl/ontologies/OntoBeef/Conceptualisation.owl#Category\")).toSet())\n {\n System.out.println(i.listLabels(null).toSet());\n }\n }",
"private Model getThisModel(String name, Model model) {\n\t\t\t\n\t\t\t Model modret=ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\t\t\t String text=dbs.getModel(name);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"TEXT\"+text+\"TEXT!!!\");\n\t\t\t\t if(text==null){\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t\treturn modret;\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t\t //read model \n\t\t\t\t\t InputStream input = new ByteArrayInputStream(text.getBytes());\n\t \n\t\t\t\t\t modret.read(input, null,\"RDF/JSON\");\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t }\n\t\t\t\t return modret;\n\t \n\t\t }",
"public ReasonerFactory getReasonerFactory() {\n return m_rFactory;\n }",
"Ontology getTargetOntology();",
"public Reasoner getReasoner() {\n if (m_reasoner == null && m_rFactory != null) {\n // we need to create the reasoner\n // create a new one on each call since reasoners aren't guaranteed to be reusable\n return m_rFactory.create( null );\n }\n\n return m_reasoner;\n }",
"@Test\n public void example10 () throws Exception {\n ValueFactory f = repo.getValueFactory();\n String exns = \"http://example.org/people/\";\n URI alice = f.createURI(exns, \"alice\");\n URI bob = f.createURI(exns, \"bob\");\n URI ted = f.createURI(exns, \"ted\"); \n URI person = f.createURI(\"http://example.org/ontology/Person\");\n URI name = f.createURI(\"http://example.org/ontology/name\");\n Literal alicesName = f.createLiteral(\"Alice\");\n Literal bobsName = f.createLiteral(\"Bob\");\n Literal tedsName = f.createLiteral(\"Ted\"); \n URI context1 = f.createURI(exns, \"cxt1\"); \n URI context2 = f.createURI(exns, \"cxt2\"); \n conn.add(alice, RDF.TYPE, person, context1);\n conn.add(alice, name, alicesName, context1);\n conn.add(bob, RDF.TYPE, person, context2);\n conn.add(bob, name, bobsName, context2);\n conn.add(ted, RDF.TYPE, person);\n conn.add(ted, name, tedsName);\n \n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(conn.getStatements(null, null, null, false, context1, context2)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false, null, context2)));\n \n // testing named graph query\n DatasetImpl ds = new DatasetImpl();\n ds.addNamedGraph(context1);\n ds.addNamedGraph(context2);\n TupleQuery tupleQuery = conn.prepareTupleQuery(\n QueryLanguage.SPARQL, \"SELECT ?s ?p ?o ?g WHERE { GRAPH ?g {?s ?p ?o . } }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(tupleQuery.evaluate()));\n \n ds = new DatasetImpl();\n ds.addDefaultGraph(null);\n tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, \"SELECT ?s ?p ?o WHERE {?s ?p ?o . }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(tupleQuery.evaluate()));\n }",
"BehaviorConcept createBehaviorConcept();",
"public ExquisiteOWLReasoner(DiagnosisModel<OWLLogicalAxiom> dm,\r\n OWLReasonerFactory reasonerFactory,\r\n ReasonerProgressMonitor monitor)\r\n throws OWLOntologyCreationException {\r\n super(dm);\r\n this.debuggingOntologyManager = OWLManager.createOWLOntologyManager();\r\n // use of an anonymous ontology as the debugging ontology\r\n this.debuggingOntology = this.debuggingOntologyManager.createOntology();\r\n if (monitor != null) {\r\n OWLReasonerConfiguration configuration = new SimpleConfiguration(monitor);\r\n this.reasoner = reasonerFactory.createReasoner(debuggingOntology, configuration);\r\n } else {\r\n this.reasoner = reasonerFactory.createReasoner(debuggingOntology);\r\n }\r\n checkDiagnosisModel();\r\n }",
"public static void main(String args[]) {\n Model model = ModelFactory.createDefaultModel(); \n\n//set namespace\n Resource NAMESPACE = model.createResource( relationshipUri );\n \tmodel.setNsPrefix( \"rela\", relationshipUri);\n \n// Create the types of Property we need to describe relationships in the model\n Property childOf = model.createProperty(relationshipUri,\"childOf\"); \n Property siblingOf = model.createProperty(relationshipUri,\"siblingOf\");\n Property spouseOf = model.createProperty(relationshipUri,\"spouseOf\");\n Property parentOf = model.createProperty(relationshipUri,\"parentOf\"); \n \n \n// Create resources representing the people in our model\n Resource Siddharth = model.createResource(familyUri+\"Siddharth\");\n Resource Dhvanit = model.createResource(familyUri+\"Dhvanit\");\n Resource Rekha = model.createResource(familyUri+\"Rekha\");\n Resource Sandeep = model.createResource(familyUri+\"Sandeep\");\n Resource Kanchan = model.createResource(familyUri+\"Kanchan\");\n Resource Pihu = model.createResource(familyUri+\"Pihu\");\n Resource DwarkaPrasad = model.createResource(familyUri+\"Dwarkesh\");\n Resource Shakuntala = model.createResource(familyUri+\"Shakuntala\");\n Resource Santosh = model.createResource(familyUri+\"Santosh\");\n Resource Usha = model.createResource(familyUri+\"Usha\");\n Resource Priyadarshan = model.createResource(familyUri+\"Priyadarshan\");\n Resource Sudarshan = model.createResource(familyUri+\"Sudarshan\");\n Resource Pragya = model.createResource(familyUri+\"Pragya\");\n Resource Shailendra = model.createResource(familyUri+\"Shailendra\");\n Resource Rajni = model.createResource(familyUri+\"Rajni\");\n Resource Harsh = model.createResource(familyUri+\"Harsh\");\n Resource Satendra = model.createResource(familyUri+\"Satendra\");\n Resource Vandana = model.createResource(familyUri+\"Vandana\");\n Resource Priyam = model.createResource(familyUri+\"Priyam\");\n Resource Darshan = model.createResource(familyUri+\"Darshan\");\n Resource Vardhan = model.createResource(familyUri+\"Vardhan\");\n \n List<Statement> list = new ArrayList(); \n list.add(model.createStatement(Dhvanit,spouseOf,Kanchan)); \n list.add(model.createStatement(Sandeep,spouseOf,Rekha)); \n list.add(model.createStatement(DwarkaPrasad,spouseOf,Shakuntala)); \n list.add(model.createStatement(Santosh,spouseOf,Usha)); \n list.add(model.createStatement(Shailendra,spouseOf,Rajni)); \n list.add(model.createStatement(Satendra,spouseOf,Vandana)); \n list.add(model.createStatement(Sandeep,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Sandeep,childOf,Shakuntala)); \n list.add(model.createStatement(Santosh,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Santosh,childOf,Shakuntala)); \n list.add(model.createStatement(Shailendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Shailendra,childOf,Shakuntala)); \n list.add(model.createStatement(Satendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Satendra,childOf,Shakuntala)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Sandeep)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Santosh)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Shailendra)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Satendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Sandeep)); \n list.add(model.createStatement(Shakuntala,parentOf,Santosh)); \n list.add(model.createStatement(Shakuntala,parentOf,Shailendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Satendra)); \n list.add(model.createStatement(Sandeep,parentOf,Siddharth)); \n list.add(model.createStatement(Sandeep,parentOf,Dhvanit)); \n list.add(model.createStatement(Rekha,parentOf,Siddharth)); \n list.add(model.createStatement(Rekha,parentOf,Dhvanit)); \n list.add(model.createStatement(Siddharth,childOf,Rekha)); \n list.add(model.createStatement(Dhvanit,childOf,Rekha)); \n list.add(model.createStatement(Siddharth,childOf,Sandeep)); \n list.add(model.createStatement(Dhvanit,childOf,Sandeep)); \n list.add(model.createStatement(Harsh,childOf,Shailendra)); \n list.add(model.createStatement(Harsh,childOf,Rajni)); \n list.add(model.createStatement(Shailendra,parentOf,Harsh)); \n list.add(model.createStatement(Rajni,parentOf,Harsh)); \n list.add(model.createStatement(Santosh,parentOf,Priyadarshan)); \n list.add(model.createStatement(Santosh,parentOf,Sudarshan));\n list.add(model.createStatement(Santosh,parentOf,Pragya));\n list.add(model.createStatement(Usha,parentOf,Priyadarshan)); \n list.add(model.createStatement(Usha,parentOf,Sudarshan));\n list.add(model.createStatement(Usha,parentOf,Pragya));\n list.add(model.createStatement(Priyadarshan,childOf,Santosh));\n list.add(model.createStatement(Pragya,childOf,Santosh));\n list.add(model.createStatement(Sudarshan,childOf,Santosh));\n list.add(model.createStatement(Priyadarshan,childOf,Usha));\n list.add(model.createStatement(Pragya,childOf,Usha));\n list.add(model.createStatement(Sudarshan,childOf,Usha));\n list.add(model.createStatement(Satendra,parentOf,Priyam)); \n list.add(model.createStatement(Satendra,parentOf,Darshan));\n list.add(model.createStatement(Satendra,parentOf,Vardhan));\n list.add(model.createStatement(Vandana,parentOf,Priyam)); \n list.add(model.createStatement(Vandana,parentOf,Darshan));\n list.add(model.createStatement(Vandana,parentOf,Vardhan));\n list.add(model.createStatement(Priyam,childOf,Satendra));\n list.add(model.createStatement(Darshan,childOf,Satendra));\n list.add(model.createStatement(Vardhan,childOf,Satendra));\n list.add(model.createStatement(Priyam,childOf,Vandana));\n list.add(model.createStatement(Darshan,childOf,Vandana));\n list.add(model.createStatement(Vardhan,childOf,Vandana));\n list.add(model.createStatement(Pihu,childOf,Dhvanit));\n list.add(model.createStatement(Pihu,childOf,Kanchan));\n list.add(model.createStatement(Dhvanit,parentOf,Pihu));\n list.add(model.createStatement(Kanchan,parentOf,Pihu));\n list.add(model.createStatement(Siddharth,siblingOf,Dhvanit));\n list.add(model.createStatement(Dhvanit,siblingOf,Siddharth)); \n list.add(model.createStatement(Priyadarshan,siblingOf,Sudarshan));\n list.add(model.createStatement(Priyadarshan,siblingOf,Pragya));\n list.add(model.createStatement(Sudarshan,siblingOf,Priyadarshan));\n list.add(model.createStatement(Sudarshan,siblingOf,Pragya));\n list.add(model.createStatement(Pragya,siblingOf,Priyadarshan));\n list.add(model.createStatement(Pragya,siblingOf,Sudarshan)); \n list.add(model.createStatement(Priyam,siblingOf,Darshan));\n list.add(model.createStatement(Priyam,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Darshan));\n list.add(model.createStatement(Santosh,siblingOf,Sandeep));\n list.add(model.createStatement(Santosh,siblingOf,Shailendra));\n list.add(model.createStatement(Santosh,siblingOf,Satendra));\n list.add(model.createStatement(Sandeep,siblingOf,Santosh));\n list.add(model.createStatement(Sandeep,siblingOf,Shailendra));\n list.add(model.createStatement(Sandeep,siblingOf,Satendra));\n list.add(model.createStatement(Shailendra,siblingOf,Santosh));\n list.add(model.createStatement(Shailendra,siblingOf,Sandeep));\n list.add(model.createStatement(Shailendra,siblingOf,Satendra));\n list.add(model.createStatement(Satendra,siblingOf,Shailendra));\n list.add(model.createStatement(Satendra,siblingOf,Santosh));\n list.add(model.createStatement(Satendra,siblingOf,Sandeep));\n \n model.add(list);\n try{\n \t File file=new File(\"/Users/siddharthgupta/Documents/workspace/FamilyModel/src/family/family.rdf\");\n \t \tFileOutputStream f1=new FileOutputStream(file);\n \t \tRDFWriter d = model.getWriter(\"RDF/XML-ABBREV\");\n \t \t\t\td.write(model,f1,null);\n \t\t}catch(Exception e) {}\n }",
"public void test_hc_01() \n throws Exception \n {\n for (int i = 0; i < 5; i++) {\n \n OntModel m = ModelFactory.createOntologyModel();\n \n FileInputStream ifs = new FileInputStream(\"testing/ontology/relativenames.rdf\");\n \n //System.out.println(\"Start reading...\");\n m.read(ifs, \"http://example.org/foo\");\n //System.out.println(\"Done reading...\");\n \n ifs.close();\n //System.out.println(\"Closed ifs\");\n m.close();\n //System.out.println(\"Closed model\");\n }\n }",
"public void visit(OWLAnnotationInstance arg0) throws OWLException {\n\t\t\t\n\t\t}",
"private IReasoner findReasoner(ReasonerDescriptor descriptor) {\r\n if (null == descriptor) {\r\n throw new IllegalArgumentException(\"descriptor must not be null\");\r\n }\r\n IReasoner reasoner = registry.findReasoner(descriptor);\r\n if (null == reasoner) {\r\n throw new IllegalArgumentException(\"descriptor does not fit to a registered reasoner\");\r\n }\r\n return reasoner;\r\n }",
"public void testWriteRDF() {\n\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.is_a(),NEURON), \"subclass\");\n\n\t\trunQuery(new LinkQueryTerm(MELANOCYTE),\"any link\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.part_of(),MELANOCYTE),\"part_of (class)\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.inheres_in(),\tnew LinkQueryTerm(relationVocabulary.part_of(),HUMAN_EYE)),\"phenotype in some part of the eye\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(MELANOCYTE),\"anything annotated to melanocyte\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),\tMELANOCYTE)),\"anything annotated to a melanocyte phenotype\");\n\t\t\n\t\tQueryTerm classQt =\tnew BooleanQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),NEURON),\tnew LinkQueryTerm(relationVocabulary.inheres_in(),BEHAVIOR));\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(classQt),\"boolean query\");\n\n\n\t}",
"SemanticFactory getSemanticFactory();",
"DomainConcept createDomainConcept();",
"BehavioralFeatureConcept createBehavioralFeatureConcept();",
"public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }",
"private void initOntology() {\n\n\tontology = ModelFactory.createDefaultModel();\n\t\t\t\n\ttry \n\t{\n\t\t//ontology.read(new FileInputStream(\"ontology.ttl\"),null,\"TTL\");\n\t\tontology.read(new FileInputStream(\"Aminer-data.ttl\"),null,\"TTL\");\n\t\t//ontology.read(new FileInputStream(\"SO data.ttl\"),null,\"TTL\");\n\t} \n\tcatch (FileNotFoundException e) \n\t{\n\t\tSystem.out.println(\"Error creating ontology model\" +e.getMessage());\n\t\te.printStackTrace();\n\t}\n\t\t\t\n\t\t\n\t}",
"public String getOntologyURI();",
"@Test\n public void testEnumeration() {\n OntModel model = createOntologyModel(OntModelSpec.OWL_MEM);\n OntClass thing = model.createClass(\"http://www.w3.org/2002/07/owl#Thing\");\n EnumeratedClass weekdays = model.createEnumeratedClass(NS + \"weekdays\", null);\n weekdays.addOneOf(thing.createIndividual(NS + \"Monday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Tuesday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Wednesday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Thursday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Friday\"));\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n model.write(baos);\n assertThat(baos.toString(), equalTo(expectedEnumeration));\n\n Iterator<?> i = weekdays.listOneOf();\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Monday\"));\n assertThat(i.next(), not(instanceOf(Individual.class)));\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Wednesday\"));\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Thursday\"));\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Friday\"));\n }",
"private void init() {\n\t\tthis.model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\tthis.model.setNsPrefixes(INamespace.NAMSESPACE_MAP);\n\n\t\t// create classes and properties\n\t\tcreateClasses();\n\t\tcreateDatatypeProperties();\n\t\tcreateObjectProperties();\n\t\t// createFraktionResources();\n\t}",
"UMLBehavior createUMLBehavior();",
"public String getResourceOWL()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceOWL);\r\n }",
"public void test_hk_05() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n String ns = \"http://foo.bar/fu#\";\n OntClass a = ontModel.createClass(ns + \"A\");\n OntClass b = ontModel.createClass(ns + \"B\");\n \n int oldCount = getStatementCount(ontModel);\n \n RDFList members = ontModel.createList(new RDFNode[] { a, b });\n IntersectionClass intersectionClass = ontModel.createIntersectionClass(null, members);\n intersectionClass.remove();\n \n assertEquals(\"Before and after statement counts are different\", oldCount, getStatementCount(ontModel));\n }",
"public interface CreativeWork extends Thing {\n\n /**\n * Builder interface of <a\n * href=\"http://schema.org/CreativeWork}\">http://schema.org/CreativeWork}</a>.\n */\n public interface Builder extends Thing.Builder {\n\n @Override\n Builder addJsonLdContext(@Nullable JsonLdContext context);\n\n @Override\n Builder addJsonLdContext(@Nullable JsonLdContext.Builder context);\n\n @Override\n Builder setJsonLdId(@Nullable String value);\n\n @Override\n Builder setJsonLdReverse(String property, Thing obj);\n\n @Override\n Builder setJsonLdReverse(String property, Thing.Builder builder);\n\n /** Add a value to property about. */\n Builder addAbout(Thing value);\n\n /** Add a value to property about. */\n Builder addAbout(Thing.Builder value);\n\n /** Add a value to property about. */\n Builder addAbout(String value);\n\n /** Add a value to property accessibilityAPI. */\n Builder addAccessibilityAPI(Text value);\n\n /** Add a value to property accessibilityAPI. */\n Builder addAccessibilityAPI(String value);\n\n /** Add a value to property accessibilityControl. */\n Builder addAccessibilityControl(Text value);\n\n /** Add a value to property accessibilityControl. */\n Builder addAccessibilityControl(String value);\n\n /** Add a value to property accessibilityFeature. */\n Builder addAccessibilityFeature(Text value);\n\n /** Add a value to property accessibilityFeature. */\n Builder addAccessibilityFeature(String value);\n\n /** Add a value to property accessibilityHazard. */\n Builder addAccessibilityHazard(Text value);\n\n /** Add a value to property accessibilityHazard. */\n Builder addAccessibilityHazard(String value);\n\n /** Add a value to property accountablePerson. */\n Builder addAccountablePerson(Person value);\n\n /** Add a value to property accountablePerson. */\n Builder addAccountablePerson(Person.Builder value);\n\n /** Add a value to property accountablePerson. */\n Builder addAccountablePerson(String value);\n\n /** Add a value to property additionalType. */\n Builder addAdditionalType(URL value);\n\n /** Add a value to property additionalType. */\n Builder addAdditionalType(String value);\n\n /** Add a value to property aggregateRating. */\n Builder addAggregateRating(AggregateRating value);\n\n /** Add a value to property aggregateRating. */\n Builder addAggregateRating(AggregateRating.Builder value);\n\n /** Add a value to property aggregateRating. */\n Builder addAggregateRating(String value);\n\n /** Add a value to property alternateName. */\n Builder addAlternateName(Text value);\n\n /** Add a value to property alternateName. */\n Builder addAlternateName(String value);\n\n /** Add a value to property alternativeHeadline. */\n Builder addAlternativeHeadline(Text value);\n\n /** Add a value to property alternativeHeadline. */\n Builder addAlternativeHeadline(String value);\n\n /** Add a value to property associatedMedia. */\n Builder addAssociatedMedia(MediaObject value);\n\n /** Add a value to property associatedMedia. */\n Builder addAssociatedMedia(MediaObject.Builder value);\n\n /** Add a value to property associatedMedia. */\n Builder addAssociatedMedia(String value);\n\n /** Add a value to property audience. */\n Builder addAudience(Audience value);\n\n /** Add a value to property audience. */\n Builder addAudience(Audience.Builder value);\n\n /** Add a value to property audience. */\n Builder addAudience(String value);\n\n /** Add a value to property audio. */\n Builder addAudio(AudioObject value);\n\n /** Add a value to property audio. */\n Builder addAudio(AudioObject.Builder value);\n\n /** Add a value to property audio. */\n Builder addAudio(String value);\n\n /** Add a value to property author. */\n Builder addAuthor(Organization value);\n\n /** Add a value to property author. */\n Builder addAuthor(Organization.Builder value);\n\n /** Add a value to property author. */\n Builder addAuthor(Person value);\n\n /** Add a value to property author. */\n Builder addAuthor(Person.Builder value);\n\n /** Add a value to property author. */\n Builder addAuthor(String value);\n\n /** Add a value to property award. */\n Builder addAward(Text value);\n\n /** Add a value to property award. */\n Builder addAward(String value);\n\n /** Add a value to property awards. */\n Builder addAwards(Text value);\n\n /** Add a value to property awards. */\n Builder addAwards(String value);\n\n /** Add a value to property character. */\n Builder addCharacter(Person value);\n\n /** Add a value to property character. */\n Builder addCharacter(Person.Builder value);\n\n /** Add a value to property character. */\n Builder addCharacter(String value);\n\n /** Add a value to property citation. */\n Builder addCitation(CreativeWork value);\n\n /** Add a value to property citation. */\n Builder addCitation(CreativeWork.Builder value);\n\n /** Add a value to property citation. */\n Builder addCitation(Text value);\n\n /** Add a value to property citation. */\n Builder addCitation(String value);\n\n /** Add a value to property comment. */\n Builder addComment(Comment value);\n\n /** Add a value to property comment. */\n Builder addComment(Comment.Builder value);\n\n /** Add a value to property comment. */\n Builder addComment(String value);\n\n /** Add a value to property commentCount. */\n Builder addCommentCount(Integer value);\n\n /** Add a value to property commentCount. */\n Builder addCommentCount(String value);\n\n /** Add a value to property contentLocation. */\n Builder addContentLocation(Place value);\n\n /** Add a value to property contentLocation. */\n Builder addContentLocation(Place.Builder value);\n\n /** Add a value to property contentLocation. */\n Builder addContentLocation(String value);\n\n /** Add a value to property contentRating. */\n Builder addContentRating(Text value);\n\n /** Add a value to property contentRating. */\n Builder addContentRating(String value);\n\n /** Add a value to property contributor. */\n Builder addContributor(Organization value);\n\n /** Add a value to property contributor. */\n Builder addContributor(Organization.Builder value);\n\n /** Add a value to property contributor. */\n Builder addContributor(Person value);\n\n /** Add a value to property contributor. */\n Builder addContributor(Person.Builder value);\n\n /** Add a value to property contributor. */\n Builder addContributor(String value);\n\n /** Add a value to property copyrightHolder. */\n Builder addCopyrightHolder(Organization value);\n\n /** Add a value to property copyrightHolder. */\n Builder addCopyrightHolder(Organization.Builder value);\n\n /** Add a value to property copyrightHolder. */\n Builder addCopyrightHolder(Person value);\n\n /** Add a value to property copyrightHolder. */\n Builder addCopyrightHolder(Person.Builder value);\n\n /** Add a value to property copyrightHolder. */\n Builder addCopyrightHolder(String value);\n\n /** Add a value to property copyrightYear. */\n Builder addCopyrightYear(Number value);\n\n /** Add a value to property copyrightYear. */\n Builder addCopyrightYear(String value);\n\n /** Add a value to property creator. */\n Builder addCreator(Organization value);\n\n /** Add a value to property creator. */\n Builder addCreator(Organization.Builder value);\n\n /** Add a value to property creator. */\n Builder addCreator(Person value);\n\n /** Add a value to property creator. */\n Builder addCreator(Person.Builder value);\n\n /** Add a value to property creator. */\n Builder addCreator(String value);\n\n /** Add a value to property dateCreated. */\n Builder addDateCreated(Date value);\n\n /** Add a value to property dateCreated. */\n Builder addDateCreated(DateTime value);\n\n /** Add a value to property dateCreated. */\n Builder addDateCreated(String value);\n\n /** Add a value to property dateModified. */\n Builder addDateModified(Date value);\n\n /** Add a value to property dateModified. */\n Builder addDateModified(DateTime value);\n\n /** Add a value to property dateModified. */\n Builder addDateModified(String value);\n\n /** Add a value to property datePublished. */\n Builder addDatePublished(Date value);\n\n /** Add a value to property datePublished. */\n Builder addDatePublished(String value);\n\n /** Add a value to property description. */\n Builder addDescription(Text value);\n\n /** Add a value to property description. */\n Builder addDescription(String value);\n\n /** Add a value to property discussionUrl. */\n Builder addDiscussionUrl(URL value);\n\n /** Add a value to property discussionUrl. */\n Builder addDiscussionUrl(String value);\n\n /** Add a value to property editor. */\n Builder addEditor(Person value);\n\n /** Add a value to property editor. */\n Builder addEditor(Person.Builder value);\n\n /** Add a value to property editor. */\n Builder addEditor(String value);\n\n /** Add a value to property educationalAlignment. */\n Builder addEducationalAlignment(AlignmentObject value);\n\n /** Add a value to property educationalAlignment. */\n Builder addEducationalAlignment(AlignmentObject.Builder value);\n\n /** Add a value to property educationalAlignment. */\n Builder addEducationalAlignment(String value);\n\n /** Add a value to property educationalUse. */\n Builder addEducationalUse(Text value);\n\n /** Add a value to property educationalUse. */\n Builder addEducationalUse(String value);\n\n /** Add a value to property encoding. */\n Builder addEncoding(MediaObject value);\n\n /** Add a value to property encoding. */\n Builder addEncoding(MediaObject.Builder value);\n\n /** Add a value to property encoding. */\n Builder addEncoding(String value);\n\n /** Add a value to property encodings. */\n Builder addEncodings(MediaObject value);\n\n /** Add a value to property encodings. */\n Builder addEncodings(MediaObject.Builder value);\n\n /** Add a value to property encodings. */\n Builder addEncodings(String value);\n\n /** Add a value to property exampleOfWork. */\n Builder addExampleOfWork(CreativeWork value);\n\n /** Add a value to property exampleOfWork. */\n Builder addExampleOfWork(CreativeWork.Builder value);\n\n /** Add a value to property exampleOfWork. */\n Builder addExampleOfWork(String value);\n\n /** Add a value to property fileFormat. */\n Builder addFileFormat(Text value);\n\n /** Add a value to property fileFormat. */\n Builder addFileFormat(String value);\n\n /** Add a value to property genre. */\n Builder addGenre(Text value);\n\n /** Add a value to property genre. */\n Builder addGenre(URL value);\n\n /** Add a value to property genre. */\n Builder addGenre(String value);\n\n /** Add a value to property hasPart. */\n Builder addHasPart(CreativeWork value);\n\n /** Add a value to property hasPart. */\n Builder addHasPart(CreativeWork.Builder value);\n\n /** Add a value to property hasPart. */\n Builder addHasPart(String value);\n\n /** Add a value to property headline. */\n Builder addHeadline(Text value);\n\n /** Add a value to property headline. */\n Builder addHeadline(String value);\n\n /** Add a value to property image. */\n Builder addImage(ImageObject value);\n\n /** Add a value to property image. */\n Builder addImage(ImageObject.Builder value);\n\n /** Add a value to property image. */\n Builder addImage(URL value);\n\n /** Add a value to property image. */\n Builder addImage(String value);\n\n /** Add a value to property inLanguage. */\n Builder addInLanguage(Language value);\n\n /** Add a value to property inLanguage. */\n Builder addInLanguage(Language.Builder value);\n\n /** Add a value to property inLanguage. */\n Builder addInLanguage(Text value);\n\n /** Add a value to property inLanguage. */\n Builder addInLanguage(String value);\n\n /** Add a value to property interactionStatistic. */\n Builder addInteractionStatistic(InteractionCounter value);\n\n /** Add a value to property interactionStatistic. */\n Builder addInteractionStatistic(InteractionCounter.Builder value);\n\n /** Add a value to property interactionStatistic. */\n Builder addInteractionStatistic(String value);\n\n /** Add a value to property interactivityType. */\n Builder addInteractivityType(Text value);\n\n /** Add a value to property interactivityType. */\n Builder addInteractivityType(String value);\n\n /** Add a value to property isBasedOnUrl. */\n Builder addIsBasedOnUrl(URL value);\n\n /** Add a value to property isBasedOnUrl. */\n Builder addIsBasedOnUrl(String value);\n\n /** Add a value to property isFamilyFriendly. */\n Builder addIsFamilyFriendly(Boolean value);\n\n /** Add a value to property isFamilyFriendly. */\n Builder addIsFamilyFriendly(String value);\n\n /** Add a value to property isPartOf. */\n Builder addIsPartOf(CreativeWork value);\n\n /** Add a value to property isPartOf. */\n Builder addIsPartOf(CreativeWork.Builder value);\n\n /** Add a value to property isPartOf. */\n Builder addIsPartOf(String value);\n\n /** Add a value to property keywords. */\n Builder addKeywords(Text value);\n\n /** Add a value to property keywords. */\n Builder addKeywords(String value);\n\n /** Add a value to property learningResourceType. */\n Builder addLearningResourceType(Text value);\n\n /** Add a value to property learningResourceType. */\n Builder addLearningResourceType(String value);\n\n /** Add a value to property license. */\n Builder addLicense(CreativeWork value);\n\n /** Add a value to property license. */\n Builder addLicense(CreativeWork.Builder value);\n\n /** Add a value to property license. */\n Builder addLicense(URL value);\n\n /** Add a value to property license. */\n Builder addLicense(String value);\n\n /** Add a value to property locationCreated. */\n Builder addLocationCreated(Place value);\n\n /** Add a value to property locationCreated. */\n Builder addLocationCreated(Place.Builder value);\n\n /** Add a value to property locationCreated. */\n Builder addLocationCreated(String value);\n\n /** Add a value to property mainEntity. */\n Builder addMainEntity(Thing value);\n\n /** Add a value to property mainEntity. */\n Builder addMainEntity(Thing.Builder value);\n\n /** Add a value to property mainEntity. */\n Builder addMainEntity(String value);\n\n /** Add a value to property mainEntityOfPage. */\n Builder addMainEntityOfPage(CreativeWork value);\n\n /** Add a value to property mainEntityOfPage. */\n Builder addMainEntityOfPage(CreativeWork.Builder value);\n\n /** Add a value to property mainEntityOfPage. */\n Builder addMainEntityOfPage(URL value);\n\n /** Add a value to property mainEntityOfPage. */\n Builder addMainEntityOfPage(String value);\n\n /** Add a value to property mentions. */\n Builder addMentions(Thing value);\n\n /** Add a value to property mentions. */\n Builder addMentions(Thing.Builder value);\n\n /** Add a value to property mentions. */\n Builder addMentions(String value);\n\n /** Add a value to property name. */\n Builder addName(Text value);\n\n /** Add a value to property name. */\n Builder addName(String value);\n\n /** Add a value to property offers. */\n Builder addOffers(Offer value);\n\n /** Add a value to property offers. */\n Builder addOffers(Offer.Builder value);\n\n /** Add a value to property offers. */\n Builder addOffers(String value);\n\n /** Add a value to property position. */\n Builder addPosition(Integer value);\n\n /** Add a value to property position. */\n Builder addPosition(Text value);\n\n /** Add a value to property position. */\n Builder addPosition(String value);\n\n /** Add a value to property potentialAction. */\n Builder addPotentialAction(Action value);\n\n /** Add a value to property potentialAction. */\n Builder addPotentialAction(Action.Builder value);\n\n /** Add a value to property potentialAction. */\n Builder addPotentialAction(String value);\n\n /** Add a value to property producer. */\n Builder addProducer(Organization value);\n\n /** Add a value to property producer. */\n Builder addProducer(Organization.Builder value);\n\n /** Add a value to property producer. */\n Builder addProducer(Person value);\n\n /** Add a value to property producer. */\n Builder addProducer(Person.Builder value);\n\n /** Add a value to property producer. */\n Builder addProducer(String value);\n\n /** Add a value to property provider. */\n Builder addProvider(Organization value);\n\n /** Add a value to property provider. */\n Builder addProvider(Organization.Builder value);\n\n /** Add a value to property provider. */\n Builder addProvider(Person value);\n\n /** Add a value to property provider. */\n Builder addProvider(Person.Builder value);\n\n /** Add a value to property provider. */\n Builder addProvider(String value);\n\n /** Add a value to property publication. */\n Builder addPublication(PublicationEvent value);\n\n /** Add a value to property publication. */\n Builder addPublication(PublicationEvent.Builder value);\n\n /** Add a value to property publication. */\n Builder addPublication(String value);\n\n /** Add a value to property publisher. */\n Builder addPublisher(Organization value);\n\n /** Add a value to property publisher. */\n Builder addPublisher(Organization.Builder value);\n\n /** Add a value to property publisher. */\n Builder addPublisher(Person value);\n\n /** Add a value to property publisher. */\n Builder addPublisher(Person.Builder value);\n\n /** Add a value to property publisher. */\n Builder addPublisher(String value);\n\n /** Add a value to property publishingPrinciples. */\n Builder addPublishingPrinciples(URL value);\n\n /** Add a value to property publishingPrinciples. */\n Builder addPublishingPrinciples(String value);\n\n /** Add a value to property recordedAt. */\n Builder addRecordedAt(Event value);\n\n /** Add a value to property recordedAt. */\n Builder addRecordedAt(Event.Builder value);\n\n /** Add a value to property recordedAt. */\n Builder addRecordedAt(String value);\n\n /** Add a value to property releasedEvent. */\n Builder addReleasedEvent(PublicationEvent value);\n\n /** Add a value to property releasedEvent. */\n Builder addReleasedEvent(PublicationEvent.Builder value);\n\n /** Add a value to property releasedEvent. */\n Builder addReleasedEvent(String value);\n\n /** Add a value to property review. */\n Builder addReview(Review value);\n\n /** Add a value to property review. */\n Builder addReview(Review.Builder value);\n\n /** Add a value to property review. */\n Builder addReview(String value);\n\n /** Add a value to property reviews. */\n Builder addReviews(Review value);\n\n /** Add a value to property reviews. */\n Builder addReviews(Review.Builder value);\n\n /** Add a value to property reviews. */\n Builder addReviews(String value);\n\n /** Add a value to property sameAs. */\n Builder addSameAs(URL value);\n\n /** Add a value to property sameAs. */\n Builder addSameAs(String value);\n\n /** Add a value to property schemaVersion. */\n Builder addSchemaVersion(Text value);\n\n /** Add a value to property schemaVersion. */\n Builder addSchemaVersion(URL value);\n\n /** Add a value to property schemaVersion. */\n Builder addSchemaVersion(String value);\n\n /** Add a value to property sourceOrganization. */\n Builder addSourceOrganization(Organization value);\n\n /** Add a value to property sourceOrganization. */\n Builder addSourceOrganization(Organization.Builder value);\n\n /** Add a value to property sourceOrganization. */\n Builder addSourceOrganization(String value);\n\n /** Add a value to property text. */\n Builder addText(Text value);\n\n /** Add a value to property text. */\n Builder addText(String value);\n\n /** Add a value to property thumbnailUrl. */\n Builder addThumbnailUrl(URL value);\n\n /** Add a value to property thumbnailUrl. */\n Builder addThumbnailUrl(String value);\n\n /** Add a value to property timeRequired. */\n Builder addTimeRequired(Duration value);\n\n /** Add a value to property timeRequired. */\n Builder addTimeRequired(Duration.Builder value);\n\n /** Add a value to property timeRequired. */\n Builder addTimeRequired(String value);\n\n /** Add a value to property translator. */\n Builder addTranslator(Organization value);\n\n /** Add a value to property translator. */\n Builder addTranslator(Organization.Builder value);\n\n /** Add a value to property translator. */\n Builder addTranslator(Person value);\n\n /** Add a value to property translator. */\n Builder addTranslator(Person.Builder value);\n\n /** Add a value to property translator. */\n Builder addTranslator(String value);\n\n /** Add a value to property typicalAgeRange. */\n Builder addTypicalAgeRange(Text value);\n\n /** Add a value to property typicalAgeRange. */\n Builder addTypicalAgeRange(String value);\n\n /** Add a value to property url. */\n Builder addUrl(URL value);\n\n /** Add a value to property url. */\n Builder addUrl(String value);\n\n /** Add a value to property version. */\n Builder addVersion(Number value);\n\n /** Add a value to property version. */\n Builder addVersion(String value);\n\n /** Add a value to property video. */\n Builder addVideo(VideoObject value);\n\n /** Add a value to property video. */\n Builder addVideo(VideoObject.Builder value);\n\n /** Add a value to property video. */\n Builder addVideo(String value);\n\n /** Add a value to property workExample. */\n Builder addWorkExample(CreativeWork value);\n\n /** Add a value to property workExample. */\n Builder addWorkExample(CreativeWork.Builder value);\n\n /** Add a value to property workExample. */\n Builder addWorkExample(String value);\n\n /** Add a value to property detailedDescription. */\n Builder addDetailedDescription(Article value);\n\n /** Add a value to property detailedDescription. */\n Builder addDetailedDescription(Article.Builder value);\n\n /** Add a value to property detailedDescription. */\n Builder addDetailedDescription(String value);\n\n /** Add a value to property popularityScore. */\n Builder addPopularityScore(PopularityScoreSpecification value);\n\n /** Add a value to property popularityScore. */\n Builder addPopularityScore(PopularityScoreSpecification.Builder value);\n\n /** Add a value to property popularityScore. */\n Builder addPopularityScore(String value);\n\n /**\n * Add a value to property.\n *\n * @param name The property name.\n * @param value The value of the property.\n */\n Builder addProperty(String name, SchemaOrgType value);\n\n /**\n * Add a value to property.\n *\n * @param name The property name.\n * @param builder The schema.org object builder for the property value.\n */\n Builder addProperty(String name, Thing.Builder builder);\n\n /**\n * Add a value to property.\n *\n * @param name The property name.\n * @param value The string value of the property.\n */\n Builder addProperty(String name, String value);\n\n /** Build a {@link CreativeWork} object. */\n CreativeWork build();\n }\n\n /**\n * Returns the value list of property about. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getAboutList();\n\n /**\n * Returns the value list of property accessibilityAPI. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getAccessibilityAPIList();\n\n /**\n * Returns the value list of property accessibilityControl. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getAccessibilityControlList();\n\n /**\n * Returns the value list of property accessibilityFeature. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getAccessibilityFeatureList();\n\n /**\n * Returns the value list of property accessibilityHazard. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getAccessibilityHazardList();\n\n /**\n * Returns the value list of property accountablePerson. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getAccountablePersonList();\n\n /**\n * Returns the value list of property aggregateRating. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getAggregateRatingList();\n\n /**\n * Returns the value list of property alternativeHeadline. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getAlternativeHeadlineList();\n\n /**\n * Returns the value list of property associatedMedia. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getAssociatedMediaList();\n\n /**\n * Returns the value list of property audience. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getAudienceList();\n\n /**\n * Returns the value list of property audio. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getAudioList();\n\n /**\n * Returns the value list of property author. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getAuthorList();\n\n /**\n * Returns the value list of property award. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getAwardList();\n\n /**\n * Returns the value list of property awards. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getAwardsList();\n\n /**\n * Returns the value list of property character. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getCharacterList();\n\n /**\n * Returns the value list of property citation. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getCitationList();\n\n /**\n * Returns the value list of property comment. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getCommentList();\n\n /**\n * Returns the value list of property commentCount. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getCommentCountList();\n\n /**\n * Returns the value list of property contentLocation. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getContentLocationList();\n\n /**\n * Returns the value list of property contentRating. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getContentRatingList();\n\n /**\n * Returns the value list of property contributor. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getContributorList();\n\n /**\n * Returns the value list of property copyrightHolder. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getCopyrightHolderList();\n\n /**\n * Returns the value list of property copyrightYear. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getCopyrightYearList();\n\n /**\n * Returns the value list of property creator. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getCreatorList();\n\n /**\n * Returns the value list of property dateCreated. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getDateCreatedList();\n\n /**\n * Returns the value list of property dateModified. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getDateModifiedList();\n\n /**\n * Returns the value list of property datePublished. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getDatePublishedList();\n\n /**\n * Returns the value list of property discussionUrl. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getDiscussionUrlList();\n\n /**\n * Returns the value list of property editor. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getEditorList();\n\n /**\n * Returns the value list of property educationalAlignment. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getEducationalAlignmentList();\n\n /**\n * Returns the value list of property educationalUse. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getEducationalUseList();\n\n /**\n * Returns the value list of property encoding. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getEncodingList();\n\n /**\n * Returns the value list of property encodings. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getEncodingsList();\n\n /**\n * Returns the value list of property exampleOfWork. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getExampleOfWorkList();\n\n /**\n * Returns the value list of property fileFormat. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getFileFormatList();\n\n /**\n * Returns the value list of property genre. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getGenreList();\n\n /**\n * Returns the value list of property hasPart. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getHasPartList();\n\n /**\n * Returns the value list of property headline. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getHeadlineList();\n\n /**\n * Returns the value list of property inLanguage. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getInLanguageList();\n\n /**\n * Returns the value list of property interactionStatistic. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getInteractionStatisticList();\n\n /**\n * Returns the value list of property interactivityType. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getInteractivityTypeList();\n\n /**\n * Returns the value list of property isBasedOnUrl. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getIsBasedOnUrlList();\n\n /**\n * Returns the value list of property isFamilyFriendly. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getIsFamilyFriendlyList();\n\n /**\n * Returns the value list of property isPartOf. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getIsPartOfList();\n\n /**\n * Returns the value list of property keywords. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getKeywordsList();\n\n /**\n * Returns the value list of property learningResourceType. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getLearningResourceTypeList();\n\n /**\n * Returns the value list of property license. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getLicenseList();\n\n /**\n * Returns the value list of property locationCreated. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getLocationCreatedList();\n\n /**\n * Returns the value list of property mainEntity. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getMainEntityList();\n\n /**\n * Returns the value list of property mentions. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getMentionsList();\n\n /**\n * Returns the value list of property offers. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getOffersList();\n\n /**\n * Returns the value list of property position. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getPositionList();\n\n /**\n * Returns the value list of property producer. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getProducerList();\n\n /**\n * Returns the value list of property provider. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getProviderList();\n\n /**\n * Returns the value list of property publication. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getPublicationList();\n\n /**\n * Returns the value list of property publisher. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getPublisherList();\n\n /**\n * Returns the value list of property publishingPrinciples. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getPublishingPrinciplesList();\n\n /**\n * Returns the value list of property recordedAt. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getRecordedAtList();\n\n /**\n * Returns the value list of property releasedEvent. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getReleasedEventList();\n\n /**\n * Returns the value list of property review. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getReviewList();\n\n /**\n * Returns the value list of property reviews. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getReviewsList();\n\n /**\n * Returns the value list of property schemaVersion. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getSchemaVersionList();\n\n /**\n * Returns the value list of property sourceOrganization. Empty list is returned if the property\n * not set in current object.\n */\n ImmutableList<SchemaOrgType> getSourceOrganizationList();\n\n /**\n * Returns the value list of property text. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getTextList();\n\n /**\n * Returns the value list of property thumbnailUrl. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getThumbnailUrlList();\n\n /**\n * Returns the value list of property timeRequired. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getTimeRequiredList();\n\n /**\n * Returns the value list of property translator. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getTranslatorList();\n\n /**\n * Returns the value list of property typicalAgeRange. Empty list is returned if the property not\n * set in current object.\n */\n ImmutableList<SchemaOrgType> getTypicalAgeRangeList();\n\n /**\n * Returns the value list of property version. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getVersionList();\n\n /**\n * Returns the value list of property video. Empty list is returned if the property not set in\n * current object.\n */\n ImmutableList<SchemaOrgType> getVideoList();\n\n /**\n * Returns the value list of property workExample. Empty list is returned if the property not set\n * in current object.\n */\n ImmutableList<SchemaOrgType> getWorkExampleList();\n}",
"public interface ContinuousStateDatum extends org.cdao.jastor.CharacterStateDatum, com.ibm.adtech.jastor.Thing {\n\t\n\t/**\n\t * The rdf:type for this ontology class\n */\n\tpublic static final Resource TYPE = ResourceFactory.createResource(\"http://localhost/~vivek/cdao.owl#ContinuousStateDatum\");\n\t\n\n\t/**\n\t * The Jena Property for has__Continuous__State \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Continuous_State)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : This property associates a character-state instance with a state value on a continuous numeric scale.^^http://www.w3.org/2001/XMLSchema#string <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Continuous__StateProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Continuous_State\");\n\n\n\t/**\n\t * The Jena Property for belongs__to__Continuous__Character \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__to__Continuous__CharacterProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character\");\n\n\n\t/**\n\t * The Jena Property for has__Annotation \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Annotation)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__AnnotationProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Annotation\");\n\n\n\t/**\n\t * The Jena Property for belongs__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic property that links a concept to another concept it is a constituent of. The property is a synonym of part_of. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to\");\n\n\n\t/**\n\t * The Jena Property for has__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Support__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Support_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Support__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Support_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Float__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Float_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Float__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Float_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Int__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Int_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Int__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Int_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Uncertainty__Factor \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Uncertainty__FactorProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor\");\n\n\n\t/**\n\t * The Jena Property for has__Precision \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Precision)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__PrecisionProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Precision\");\n\n\n\t/**\n\t * The Jena Property for has__External__Reference \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_External_Reference)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__External__ReferenceProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_External_Reference\");\n\n\n\t/**\n\t * The Jena Property for connects__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#connects_to)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property connects__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#connects_to\");\n\n\n\t/**\n\t * The Jena Property for has \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic 'has' property. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property hasProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has\");\n\n\n\t/**\n\t * The Jena Property for part__of \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#part_of)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property part__ofProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#part_of\");\n\n\n\t/**\n\t * The Jena Property for precedes \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#precedes)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property precedesProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#precedes\");\n\n\n\n\n\t/**\n\t * Get an Iterator the 'has__Continuous__State' property values. This Iteartor\n\t * may be used to remove all such values.\n\t * @return\t\t{@link java.util.Iterator} of {@link org.cdao.jastor.Continuous}\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic java.util.Iterator getHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\n\t/**\n\t * Adds a value for the 'has__Continuous__State' property\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void addHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Adds an anonymous value for the 'has__Continuous__State' property\n\t * @return\t\tThe anoymous {@link org.cdao.jastor.Continuous} created\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * \n\t * The resource argument have rdf:type http://localhost/~vivek/cdao.owl#Continuous. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\tThe {@link om.hp.hpl.jena.rdf.model.Resource} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Removes a value for the 'has__Continuous__State' property. This method should not\n\t * be invoked while iterator through values. In that case, the remove() method of the Iterator\n\t * itself should be used.\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to remove\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void removeHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\t\n\t/**\n\t * Gets the 'belongs__to__Continuous__Character' property value\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter getBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value\n\t * @param\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic void setBelongs__to__Continuous__Character(org.cdao.jastor.ContinuousCharacter belongs__to__Continuous__Character) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to an anonymous node\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\t\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to the given resource\n\t * The resource argument should have rdf:type http://localhost/~vivek/cdao.owl#ContinuousCharacter. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\t{@link com.hp.hpl.jena.rdf.model.Resource} must not be be null.\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the newly created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n}",
"private ReasonerFrontend() {\r\n registry = ReasonerRegistry.getInstance();\r\n DefaultReasonerAccess.setProvider(new DefaultReasonerProvider()); // called when a reasoner is registered\r\n ConfigurationInitializerRegistry.setInitializer(new IConfigurationInitializer() {\r\n \r\n private IConfigurationInitializer fallback = ConfigurationInitializerRegistry.getInitializer();\r\n \r\n @Override\r\n public List<de.uni_hildesheim.sse.utils.messages.Message> initializeConfiguration(\r\n Configuration config, ProgressObserver observer) {\r\n List<de.uni_hildesheim.sse.utils.messages.Message> result = null;\r\n IReasoner reasoner = canInitializeConfig(getActualReasoner(config.getProject(), config, null, null));\r\n for (int r = 0; null == reasoner && r < registry.getReasonerCount(); r++) {\r\n IReasoner tmp = registry.getReasoner(r);\r\n if (isReadyForUse(tmp)) {\r\n reasoner = canInitializeConfig(tmp);\r\n }\r\n }\r\n boolean useFallback = false;\r\n if (null != reasoner) {\r\n // default reasoner configuration\r\n ReasonerConfiguration initCfg = new ReasonerConfiguration();\r\n ReasoningResult tmp = reasoner.propagate(config.getProject(), config, initCfg, observer); \r\n useFallback = tmp.reasoningUnsupported();\r\n if (tmp.getMessageCount() > 0) {\r\n result = new ArrayList<de.uni_hildesheim.sse.utils.messages.Message>();\r\n for (int m = 0; m < tmp.getMessageCount(); m++) {\r\n result.add(tmp.getMessage(m));\r\n }\r\n }\r\n } else {\r\n useFallback = true;\r\n }\r\n if (useFallback) {\r\n result = fallback.initializeConfiguration(config, observer);\r\n }\r\n return result;\r\n }\r\n });\r\n }",
"public void extractKnowledge()\n {\n }",
"Ontology getSourceOntology();",
"public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }",
"public void shouldCreateAndReadAnnotations() throws Exception {\n OWLOntologyManager man = OWLManager.createOWLOntologyManager();\n // Load the Koala ontology\n OWLOntology ont = load(man);\n\n df = man.getOWLDataFactory();\n // We want to add a comment to the Quokka class. First, we need to\n // obtain\n // a reference to the class\n System.out.println(\"\\n\\n--->\"+ont.getOntologyID().getOntologyIRI().get() + \"#Quokka\");\n OWLClass quokka = df.getOWLClass(IRI.create(ont.getOntologyID().getOntologyIRI().get() + \"#Quokka\"));\n // Now we create the content of our comment. In this case we simply want\n // a plain string literal. We'll attach a language to the comment to\n // specify that our comment is written in English (en).\n OWLAnnotation commentAnno = df.getOWLAnnotation(df.getRDFSComment(), df.getOWLLiteral(\n \"A class which represents quokkas\", \"en\"));\n // Specify that the class has an annotation - to do this we attach\n // an entity annotation using an entity annotation axiom (remember,\n // classes are entities)\n OWLAxiom ax = df.getOWLAnnotationAssertionAxiom(quokka.getIRI(), commentAnno);\n // Add the axiom to the ontology\n man.applyChange(new AddAxiom(ont, ax));\n // Now lets add a version info annotation to the ontology. There is no\n // 'standard' OWL annotation object for this, like there is for\n // comments and labels, so the creation of the annotation is a bit more\n // involved. First we'll create a constant for the annotation value.\n // Version info should probably contain a version number for the\n // ontology, but in this case, we'll add some text to describe why the\n // version has been updated\n OWLLiteral lit = df.getOWLLiteral(\"Added a comment to the quokka class\");\n // The above constant is just a plain literal containing the version\n // info text/comment we need to create an annotation, which pairs a IRI\n // with the constant\n OWLAnnotation anno = df.getOWLAnnotation(df.getOWLVersionInfo(), lit);\n // Now we can add this as an ontology annotation Apply the change in the\n // usual way\n System.out.println(\"Change applied: \"+man.applyChange(new AddOntologyAnnotation(ont, anno)));\n\n // It is worth noting that literals\n // can be typed or untyped. If literals are untyped then they can have\n // language tags, which are optional - typed literals cannot have\n // language tags. For each class in the ontology, we retrieve its\n // annotations and sift through them. If the annotation annotates the\n // class with a constant which is untyped then we check the language tag\n // to see if it is English. Firstly, get the annotation property for\n // rdfs:label\n OWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\n\n System.out.println(\"Label: \"+label.toString());\n\n\n\n\n\n\n for (OWLClass cls : ont.getClassesInSignature()) {\n // Get the annotations on the class that use the label property\n\n //System.out.println(\"-------------------------------->classes: \"+cls.toString());\n\n for (OWLOntology o : ont.getImportsClosure()) {\n\n //System.out.println(\"AnnotationAssetationAxioms: \"+o.getAnnotationAssertionAxioms(cls.getIRI()));\n\n //annotationObjects(o.getAnnotationAssertionAxioms(cls.getIRI()),label)\n\n for (OWLAnnotationAssertionAxiom annotationAssertionAxiom : o.getAnnotationAssertionAxioms(cls.getIRI())) {\n //System.out.println(\"Entrou no if do assetation\");\n\n System.out.println(\"AnnotationAssertationAxiom: \"+annotationAssertionAxiom);\n System.out.println(\"Property: \"+annotationAssertionAxiom.getProperty());\n\n\n if (annotationAssertionAxiom.getValue() instanceof OWLLiteral) {\n //System.out.println(\"Entrou no if do annotation get value\");\n OWLLiteral val = (OWLLiteral) annotationAssertionAxiom.getValue();\n //if (val.hasLang(\"en\")) {\n System.out.println(\"Value: \" +\n val.getLiteral());\n //}\n }\n }\n }\n }\n }",
"public interface HierarchicalKnowledgeBase {\n\n /**\n * Get the concept with the provided id.\n * @param id Concept ID.\n * @return Concept\n */\n Concept getConcept(String id);\n\n /**\n * Get the instance with the provided id.\n * @param id Instance ID.\n * @return Instance\n */\n Instance getInstance(String id);\n\t/**\n * Get a collection with the subclasses of the provided concept\n * @param concept Concept provided\n * @return collection of subclasses of the concept\n */\n Set<Concept> getSubclasses(Concept concept);\n \n /**\n * Returns a collection containing the superclasses of the provided concept\n * @param concept Concept provided\n * @return collection of subclasses of the concept\n */\n Set<Concept> getSuperclasses(Concept concept);\n \n /**\n * Check if concept x is equivalent to concept y\n * @param x Concept x\n * @param y Concept y\n * @return True if x is equivalent to y\n */\n boolean equivalent(Concept x, Concept y);\n \n /**\n * Check if concept x is subclass of concept y\n * @param x Concept x\n * @param y Concept y\n * @return True if x subclass of y, false in other case.\n */\n boolean isSubclass(Concept x, Concept y);\n \n /**\n * Check if concept x is a subclass of y, false in other case\n * @param x Concept x\n * @param y Concept y\n * @return True if x is a superclass of y\n */\n boolean isSuperclass(Concept x, Concept y);\n \n /**\n * Returns the concept Resource from which this Resource is instance. If\n * the Resource is not an instance, the function returns the same Resource.\n * @param instance Concept or Instance Resource\n * @return Concept parent of the instance.\n */\n Concept resolveInstance(Instance instance);\n \n /**\n * Return all instances of the provided concept.\n * @return {@link Set} with the instances of the concept.\n * If there are no instances, a empty set is returned.\n */\n Set<Instance> getInstances(Concept concept);\n\n /**\n * Return all concepts managed by this KB.\n * @return {@link Set} with all available concepts.\n */\n Set<Concept> getConcepts();\n\n /**\n * Return all instances managed by this KB.\n * @return {@link Set} with all available instances.\n */\n Set<Instance> getInstances();\n}",
"@Override\n public Predicate generateOutputStructure(Predicate predicate) {\n Predicate modifiedPredicate = new Predicate(predicate.getPredicateName());\n phrase = nlgFactory.createClause();\n //create phrase using the annotations of each predicate element describing its function in the sentence\n for (PredicateElement element : predicate.getElements()) {\n if (element != null && element.getPredicateElementAnnotation() != null) {\n PredicateElementAnnotation elementAnnotation = element.getPredicateElementAnnotation();\n if (elementAnnotation.equals(PredicateElementAnnotation.subject)) {\n phrase.setSubject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.verb)) {\n phrase.setVerb(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.directObject)) {\n phrase.setObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.indirectObject)) {\n phrase.setIndirectObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.complement)) {\n phrase.setComplement(element.toString());\n }\n }\n }\n //get annotation which affect whole predicate and use them to create correct type of phrase\n if (predicate.getPredicateAnnotations() != null) {\n List<PredicateAnnotation> predicateAnnotations = predicate.getPredicateAnnotations();\n if (predicateAnnotations.contains(PredicateAnnotation.NEGATION)) {\n phrase.setFeature(Feature.NEGATED, true);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.YES_NO)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.YES_NO);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW_MANY)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW_MANY);\n }\n if (predicateAnnotations.contains((PredicateAnnotation.IMPERATIVE))) {\n phrase.setFeature(Feature.FORM, Form.IMPERATIVE);\n }\n }\n //create the output sentence\n String resultString = realiser.realiseSentence(phrase);\n setOutputStructure(resultString);\n //split output structure into its elements\n String resStructure = phrase.getParent().getFeatureAsString((\"textComponents\"));\n resStructure = resStructure.replace(\"[\", \"\");\n resStructure = resStructure.replace(\"]\", \"\");\n ArrayList<String> outputOrderList = new ArrayList<>();\n String[] resSplit = resStructure.split(\",\");\n for (int i = 0; i < resSplit.length; i++) {\n outputOrderList.add(resSplit[i].trim());\n }\n //create new predicate element list\n ArrayList<PredicateElement> modifiedPredicateElementList = new ArrayList<>();\n //use this orderList as new predicate element list -> order important for planning\n boolean elementAlreadyAdded = false;\n for (String outputOrderElement : outputOrderList) {\n //keep old predicate if worldobjectid and type were already set (\"I\", \"you\")\n for(PredicateElement element: predicate.getElements()) {\n if(element.getWorldObjectId() != null && element.toString().equals(outputOrderElement)) {\n modifiedPredicateElementList.add(element);\n elementAlreadyAdded = true;\n break;\n }\n }\n if(elementAlreadyAdded) {\n elementAlreadyAdded = false;\n continue;\n }\n modifiedPredicateElementList.add(new StringPredicateElement(outputOrderElement));\n }\n if(phrase.hasFeature(Feature.INTERROGATIVE_TYPE)) {\n modifiedPredicateElementList.add(new StringPredicateElement(\"?\"));\n }else {\n modifiedPredicateElementList.add(new StringPredicateElement(\".\"));\n }\n //set new elements for the modified predicate\n modifiedPredicate.setElements(modifiedPredicateElementList.toArray(new StringPredicateElement[modifiedPredicateElementList.size()]));\n return modifiedPredicate;\n }",
"public boolean equivalent(Explanation<OWLAxiom> e1, Explanation<OWLAxiom> e2) throws OWLOntologyCreationException {\n if (e1.equals(e2)) {\n return true;\n }\n\n // check if they have the same size, same entailment types, same numbers of axiom types\n IsoUtil pre = new IsoUtil();\n if (!pre.passesPretest(e1, e2)) {\n \t//System.out.println(\"NOT THE SAME!\");\n return false;\n }\n \n //check the current datatypes used in the justifications. If they don't match, reject this.\n HashSet<OWLDatatype> dataTypes1 = new HashSet<OWLDatatype>();\n HashSet<OWLDatatype> dataTypes2 = new HashSet<OWLDatatype>();\n \n for(OWLAxiom ax:e1.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes1.add(dt);\n \t}\n }\n }\n for(OWLAxiom ax:e2.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes2.add(dt);\n \t}\n }\n } \n \n if(!dataTypes1.equals(dataTypes2))\n {\n \treturn false;\n }\n \n //check to see if both justifications are both real or fake w.r.t. reasoner\n /**\n OWLOntologyManager ontoman = OWLManager.createOWLOntologyManager();\n Boolean E1ENT = null;\n OWLReasoner j1 = rf.createReasoner(ontoman.createOntology(e1.getAxioms()));\n\t\tE1ENT = j1.isEntailed(e1.getEntailment());\n\t\tj1.flush();\n\t\tOWLReasoner j2;\n\t Boolean E2ENT = null;\n\t j2 = rf.createReasoner(ontoman.createOntology(e2.getAxioms()));\n\t\tE2ENT = j2.isEntailed(e2.getEntailment());\n\t\tj2.flush();\n\t\tSystem.out.println(e1.getEntailment().toString() + \": \" + E1ENT + \" \" + e2.getEntailment().toString() + \": \" + E2ENT);\n\t\tSystem.out.println(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT)));\n\t\tif(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT))) {\n\t\tSystem.out.println(\"Entailment check failed\");\n\t return false;\t\n\t\t}\n\t\t**/\n\t\t// otherwise do the full check\t\n AxiomTreeBuilder atb = new AxiomTreeBuilder();\n\n AxiomTreeNode et1 = atb.generateAxiomTree(e1.getEntailment());\n AxiomTreeNode et2 = atb.generateAxiomTree(e2.getEntailment());\n AxiomTreeNode jt1 = atb.generateExplanationTree(e1);\n AxiomTreeNode jt2 = atb.generateExplanationTree(e2);\n \n //for(AxiomTreeMapping atm:getMappingCandidates(et1,et2))\n //{\n \t//atm.printMapping();\n //}\n \n List<AxiomTreeMapping> candidates = getMappingCandidates(jt1, jt2);\n //System.out.println(candidates.size());\n /**\n for(AxiomTreeMapping c : candidates) {\n \t System.out.println(c.getVarsForTarget());\n \t System.out.println(c.getVarsForSource());\n \t System.out.println(isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget()));\n }\n **/\n \n \n for (AxiomTreeMapping c : candidates) {\n //System.out.println(\"\\n--------------- MAPPING ---------------\\n\");\n if (isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget())) {\n //c.printMapping();\n //System.out.println(\"TRUE MAPPING:\");\n //System.out.println(c.getVarsForTarget());\n //System.out.println(c.getVarsForSource());\n \t return true;\n }\n }\n \n //for(AxiomTreeMapping atm:candidates)\n //{\n \t//atm.printMapping();\n //}\n return false;\n }",
"public interface RuleRefableBase extends org.semanticwb.model.Referensable\r\n{\r\n /**\r\n * Referencia a un objeto de tipo Rule \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_hasRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#hasRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_notInheritRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#notInheritRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_andEvalRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#andEvalRuleRef\");\r\n /**\r\n * Interfaz que define propiedades para elementos que pueden referencia a reglas \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRefable=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRefable\");\r\n\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listRuleRefs();\r\n public boolean hasRuleRef(org.semanticwb.model.RuleRef value);\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listInheritRuleRefs();\r\n\r\n /**\r\n * Adds the RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void addRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n /**\r\n * Remove all the values for the property RuleRef\r\n */\r\n public void removeAllRuleRef();\r\n\r\n /**\r\n * Remove a value from the property RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void removeRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n/**\r\n* Gets the RuleRef\r\n* @return a instance of org.semanticwb.model.RuleRef\r\n*/\r\n public org.semanticwb.model.RuleRef getRuleRef();\r\n\r\n public boolean isNotInheritRuleRef();\r\n\r\n public void setNotInheritRuleRef(boolean value);\r\n\r\n public boolean isAndEvalRuleRef();\r\n\r\n public void setAndEvalRuleRef(boolean value);\r\n}",
"public interface Activity extends RUP_Core_Elements {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#hasRecommendation\n */\n \n /**\n * Gets all property values for the hasRecommendation property.<p>\n * \n * @returns a collection of values for the hasRecommendation property.\n */\n Collection<? extends PM_Learning_Material> getHasRecommendation();\n\n /**\n * Checks if the class has a hasRecommendation property value.<p>\n * \n * @return true if there is a hasRecommendation property value.\n */\n boolean hasHasRecommendation();\n\n /**\n * Adds a hasRecommendation property value.<p>\n * \n * @param newHasRecommendation the hasRecommendation property value to be added\n */\n void addHasRecommendation(PM_Learning_Material newHasRecommendation);\n\n /**\n * Removes a hasRecommendation property value.<p>\n * \n * @param oldHasRecommendation the hasRecommendation property value to be removed.\n */\n void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#isPerformOf\n */\n \n /**\n * Gets all property values for the isPerformOf property.<p>\n * \n * @returns a collection of values for the isPerformOf property.\n */\n Collection<? extends Role> getIsPerformOf();\n\n /**\n * Checks if the class has a isPerformOf property value.<p>\n * \n * @return true if there is a isPerformOf property value.\n */\n boolean hasIsPerformOf();\n\n /**\n * Adds a isPerformOf property value.<p>\n * \n * @param newIsPerformOf the isPerformOf property value to be added\n */\n void addIsPerformOf(Role newIsPerformOf);\n\n /**\n * Removes a isPerformOf property value.<p>\n * \n * @param oldIsPerformOf the isPerformOf property value to be removed.\n */\n void removeIsPerformOf(Role oldIsPerformOf);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}",
"ConceptsType createConceptsType();",
"public SemanticSearcher(DatabaseManager dm) {\n\t\tthis.dm = dm;\n\t\tmanager = OWLManager.createOWLOntologyManager();\n\t\t\n\t\ttry {\n\t\t\tontology = manager.loadOntologyFromOntologyDocument(new File(ontologyPath));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tOWLReasonerFactory reasonerFactory = new org.semanticweb.HermiT.Reasoner.ReasonerFactory();\n\t\treasoner = reasonerFactory.createReasoner(ontology);\n\t\t\n\t\ttry {\n\t if (!reasoner.isConsistent()) {\n\t \tSystem.err.println(\"Az ontológia nem konzisztens!\");\n\t \t\n\t Node<OWLClass> incClss = reasoner.getUnsatisfiableClasses();\n System.err.println(\"A következő osztályok nem konzisztensek:\" + incClss.getEntities());\n\t \tSystem.exit(-1);\n\t }\n\t\t} catch (OWLReasonerRuntimeException e) {\n\t\t\tSystem.err.println(\"Hiba a következtetőben: \" + e.getMessage());\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tfactory = manager.getOWLDataFactory();\n\t}",
"public OWLOntology cloneOntology(OWLOntology source) {\r\n\t\tOWLOntology copy = null;\r\n\t\ttry {\r\n\t\t\tCorrectedRDFRenderer rdfRend = new CorrectedRDFRenderer();\r\n\t\t\tStringWriter st = new StringWriter();\r\n\t\t\trdfRend.renderOntology(source, st);\r\n\t\t\tcopy = swoopModel.loadOntologyInRDF(new StringReader(st.toString()), source.getURI(), true);\t\t\t\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn copy;\r\n\t}",
"public void gerarRDF() throws SenseRDFException;",
"FeatureConcept createFeatureConcept();",
"public String getExplanation() {\n return \"Weka is unexplainable!\";\n }",
"UMLBehavioralFeature createUMLBehavioralFeature();",
"public void test_dn_01() {\n // direct reading for the model method 1\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n m0.read( \"file:testing/ontology/bugs/test_hk_07B.owl\" );\n \n OntProperty p0 = m0.getOntProperty( \"file:testing/ontology/bugs/test_hk_07B.owl#PropB\" );\n int count = 0;\n for (Iterator i = p0.listDomain(); i.hasNext();) {\n count++;\n i.next();\n }\n assertEquals( 3, count );\n \n // repeat test - thus using previously cached model for import\n \n OntModel m1 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n m1.read( \"file:testing/ontology/bugs/test_hk_07B.owl\" );\n \n OntProperty p1 = m1.getOntProperty( \"file:testing/ontology/bugs/test_hk_07B.owl#PropB\" );\n count = 0;\n for (Iterator i = p1.listDomain(); i.hasNext();) {\n count++;\n i.next();\n }\n assertEquals( 3, count );\n }",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tModel model = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n\n\t\t// Load ontology 1\n\t\tmodel.read(\"file:///E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/ontologyandmappingsanddatasources/endtoendtest/book1-test1.owl\");\n\n\t\t// Query in ontology 1\n\t\tQueryExecution qe = QueryExecutionFactory.create( QueryFactory.read( \"E:\\\\Kuliah\\\\TUGASAKHIR\\\\TugasAkhirLatestFolder\\\\Software\\\\ontologyandmappingsanddatasources\\\\endtoendtest\\\\book1-query1.sparql\" ), model );\n\t\tResultSet results = qe.execSelect();\n\t\t// PrefixMapping query;\n\t\t// Output query results\t\n\t\t// ResultSetFormatter.out(System.out, results, query);\n\n\t\t// Load ontology 2\n\t\tmodel = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n\t\tmodel.read(\"file:///E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/ontologyandmappingsanddatasources/endtoendtest/book2-test1.owl\");\n\t\t\t\n\t\t// Transform query\n\t\tString transformedQuery = null;\n\t\tString firstQuery = null;\n\t\ttry {\n\t\t InputStream in = new FileInputStream(\"E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/ontologyandmappingsanddatasources/endtoendtest/book1-query1.sparql\");\n\t\t BufferedReader reader = new BufferedReader( new InputStreamReader(in) );\n\t\t String line = null;\n\t\t String queryString = \"\";\n\t\t while ((line = reader.readLine()) != null) {\n\t\t\tqueryString += line + \"\\n\";\n\t\t }\n\t\t firstQuery = queryString;\n\t\t Properties parameters = new Properties();\n\t\t \n\t\t AlignmentParser aparser = new AlignmentParser(0);\n//\t\t Mapping\n\t\t Alignment alu = aparser.parse(\"file:///E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/align-4.9/html/tutorial/tutorial4/bookalignment.rdf\");\n\t\t BasicAlignment al = (BasicAlignment) alu;\n\t\t\ttransformedQuery = ((BasicAlignment)al).rewriteQuery( queryString, parameters );\n//\t\t transformedQuery = ((ObjectAlignment)al).\n\t\t} catch ( Exception ex ) { ex.printStackTrace(); }\n\n\t\t// Query ontology 2\n\t\tSystem.out.println(transformedQuery);\n//\t\tdisplayQueryAnswer( model, QueryFactory.create( transformedQuery ) );\n\t\tqe = QueryExecutionFactory.create( QueryFactory.create( firstQuery ), model );\n\t\tresults = qe.execSelect();\n\t\tSystem.out.println(results);\n\t\t\n\t\t// Output query results\t\n\t\t// ResultSetFormatter.out(System.out, results, query);\n\t}",
"private Glossary() {\n\n }",
"public interface IFlexoOntologyConcept<TA extends TechnologyAdapter<TA>> extends IFlexoOntologyObject<TA> {\n\t/**\n\t * Ontology of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntology<TA> getOntology();\n\n\t/**\n\t * Annotation upon Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyAnnotation> getAnnotations();\n\n\t/**\n\t * Container of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntologyConceptContainer<TA> getContainer();\n\n\t/**\n\t * Association with structural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getStructuralFeatureAssociations();\n\n\t/**\n\t * Association with behavioural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getBehaviouralFeatureAssociations();\n\n\t/**\n\t * \n\t * Is this a Super Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSuperConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * \n\t * Is this a Sub Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSubConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Visitor access.\n\t * \n\t * @param visitor\n\t * @return\n\t * \n\t * @pattern visitor\n\t */\n\tpublic <T> T accept(IFlexoOntologyConceptVisitor<T> visitor);\n\n\t/**\n\t * This equals has a particular semantics (differs from {@link #equals(Object)} method) in the way that it returns true only and only if\n\t * compared objects are representing same concept regarding URI. This does not guarantee that both objects will respond the same way to\n\t * some methods.<br>\n\t * This method returns true if and only if objects are same, or if one of both object redefine the other one (with eventual many levels)\n\t * \n\t * @param o\n\t * @return\n\t */\n\tpublic boolean equalsToConcept(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Return all properties accessible in the scope of this ontology object, where declared domain is this object\n\t * \n\t * @return\n\t */\n\n}",
"public void initWithDIGReasoner(String reasonerHost, int reasonerPort)\r\n\t{\r\n\t\tcredits();\r\n\t\t//Create a default model\r\n\t\tModel cModel = ModelFactory.createDefaultModel();\r\n\t\t\r\n\t\t//Obtain the reasonerURL\r\n\t\tString reasonerURL = \"http://\" + reasonerHost + \":\" + reasonerPort;\r\n\t\t\r\n\t\t//Create a reasoner configuration with the reasoner URL\r\n\t\tResource conf = cModel.createResource();\r\n\t\tconf.addProperty(ReasonerVocabulary.EXT_REASONER_URL, cModel.createResource(reasonerURL));\r\n\t\t\r\n\t\t//Obtain the Dig reasoners Factory\r\n\t\tDIGReasonerFactory drf = (DIGReasonerFactory) ReasonerRegistry\r\n\t\t\t\t.theRegistry().getFactory(DIGReasonerFactory.URI);\r\n\r\n\t\t//Obtain a reasoner with our configuration\r\n\t\tDIGReasoner r = (DIGReasoner) drf.create(conf);\r\n\r\n\t\t//Choose the Ontology Model Specification: OWL-DL in Memory\r\n\t\tOntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_DL_MEM);\r\n\t\tspec.setReasoner(r);\r\n\t\t\r\n\t\t//Obtain the OntologyModel\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel(spec);\r\n\t}",
"public void constructOntologyVocabulary() {\n ontologyOwlClassVocabulary = new HashMap<>();\n ontologyOWLDataPropertyVocabulary = new HashMap<>();\n ontologyOWLNamedIndividualVocabulary = new HashMap<>();\n ontologyOWLObjectPropertylVocabulary = new HashMap<>();\n\n Set<OWLClass> classes = domainOntology.getClassesInSignature();\n Set<OWLNamedIndividual> individualPropertyAtom = domainOntology.getIndividualsInSignature();\n Set<OWLDataProperty> dataProperty = domainOntology.getDataPropertiesInSignature();\n Set<OWLObjectProperty> OWLObjectPropertyAtom = domainOntology.getObjectPropertiesInSignature();\n String tempName = null;\n\n for (OWLClass c : classes) {\n tempName = c.toString();\n tempName = tempName.substring(tempName.lastIndexOf(\"/\") + 1);\n tempName = TextUtil.formatName(tempName);\n ontologyOwlClassVocabulary.put(tempName, c);\n }\n for (OWLDataProperty d : dataProperty) {\n tempName = d.toString();\n tempName = tempName.substring(tempName.lastIndexOf(\"/\") + 1);\n tempName = TextUtil.formatName(tempName);\n ontologyOWLDataPropertyVocabulary.put(tempName, d);\n }\n for (OWLNamedIndividual i : individualPropertyAtom) {\n tempName = i.toString();\n tempName = tempName.substring(tempName.lastIndexOf(\"/\") + 1);\n tempName = TextUtil.formatName(tempName);\n ontologyOWLNamedIndividualVocabulary.put(tempName, i);\n }\n for (OWLObjectProperty o : OWLObjectPropertyAtom) {\n tempName = o.toString();\n tempName = tempName.substring(tempName.lastIndexOf(\"/\") + 1);\n tempName = TextUtil.formatName(tempName);\n ontologyOWLObjectPropertylVocabulary.put(tempName, o);\n }\n }",
"public void initialiseExplainers(Theory theory)\n {\n Hashtable axiom_string_hashtable = new Hashtable();\n Hashtable algebra_name_hashtable = new Hashtable();\n\n JTable axiom_table = theory.front_end.axiom_table;\n for (int i=0; i<axiom_table.getRowCount(); i++)\n {\n String axiom_name = (String)axiom_table.getValueAt(i,0);\n if (axiom_name instanceof String && axiom_name.trim().equals(\"\"))\n break;\n if (axiom_name instanceof String)\n {\n String axiom_string = (String)axiom_table.getValueAt(i,1);\n axiom_string_hashtable.put(axiom_name.trim(), axiom_string.trim());\n }\n }\n\n JTable algebra_table = theory.front_end.algebra_table;\n for (int i=0; i<algebra_table.getRowCount(); i++)\n {\n String algebra_name = (String)algebra_table.getValueAt(i,0);\n if (algebra_name instanceof String && !algebra_name.trim().equals(\"\"))\n {\n String axiom_vector_string = (String)algebra_table.getValueAt(i,1);\n if (axiom_vector_string instanceof String)\n {\n Categorisation cat = new Categorisation(\"[\"+axiom_vector_string+\"]\");\n Vector axiom_vector = (Vector)cat.elementAt(0);\n algebra_name_hashtable.put(algebra_name, axiom_vector);\n }\n String add_to_embed_algebra = (String)algebra_table.getValueAt(i,2);\n if (add_to_embed_algebra instanceof String)\n {\n if (add_to_embed_algebra.equals(\"true\") ||\n add_to_embed_algebra.equals(\"yes\"))\n {\n Vector axiom_names = (Vector)algebra_name_hashtable.get(algebra_name);\n Vector axiom_strings_for_embed = new Vector();\n for (int j=0; j<axiom_names.size(); j++)\n {\n String axiom_name = (String)axiom_names.elementAt(j);\n String axiom_string = (String)axiom_string_hashtable.get(axiom_name);\n axiom_strings_for_embed.addElement(axiom_string);\n }\n theory.embed_algebra.algebra_hashtable.put(algebra_name, axiom_strings_for_embed);\n }\n }\n }\n }\n\n JTable file_prover_table = theory.front_end.file_prover_table;\n for (int i=0; i<file_prover_table.getRowCount(); i++)\n {\n String pos_string = (String)file_prover_table.getValueAt(i,0);\n if (pos_string==null)\n break;\n if (pos_string instanceof String && pos_string.trim().equals(\"\"))\n break;\n if (pos_string instanceof String)\n {\n String file_string = (String)file_prover_table.getValueAt(i,1);\n FileProver file_prover = new FileProver(file_string, theory.storage_handler);\n file_prover.try_pos = (new Integer(pos_string)).intValue();\n file_prover.name = \"file:\"+file_string;\n String operation_substitution_string = (String)file_prover_table.getValueAt(i,3);\n if (!operation_substitution_string.equals(\"\"))\n {\n Categorisation cat = new Categorisation(\"[\" + operation_substitution_string + \"]\");\n Vector v = (Vector)cat.elementAt(0);\n for (int j=0; j<v.size(); j++)\n {\n String op_sub = (String)v.elementAt(j);\n String lh = op_sub.substring(0,op_sub.indexOf(\":\"));\n String rh = op_sub.substring(op_sub.indexOf(\":\")+1, op_sub.length());\n Vector changer = new Vector();\n changer.addElement(lh);\n changer.addElement(rh);\n file_prover.operation_substitutions.addElement(changer);\n }\n }\n explainers.addElement(file_prover, \"try_pos\");\n }\n }\n\n JTable other_table = theory.front_end.other_prover_table;\n for (int i=0; i<other_table.getRowCount(); i++)\n {\n String pos_string = (String)other_table.getValueAt(i,0);\n if (pos_string==null)\n break;\n pos_string = pos_string.trim();\n if (pos_string instanceof String && pos_string.trim().equals(\"\"))\n break;\n if (pos_string instanceof String)\n {\n Explainer explainer = new Explainer();\n String name_string = (String)other_table.getValueAt(i,1);\n if (name_string instanceof String)\n {\n if (name_string.equals(\"HoldBackChecker\"))\n explainer = hold_back_checker;\n else\n {\n try\n {\n Object obj = (Class.forName(name_string)).newInstance();\n explainer = (Explainer)obj;\n }\n catch(Exception e){}\n }\n explainer.try_pos = (new Integer(pos_string)).intValue();\n explainer.name = name_string;\n explainers.addElement(explainer, \"try_pos\");\n }\n\n String condition_string = (String)other_table.getValueAt(i,2);\n if (condition_string instanceof String)\n explainer.condition_string = condition_string;\n\n String algebra_string = (String)other_table.getValueAt(i,3);\n if (algebra_string instanceof String && !algebra_string.trim().equals(\"\"))\n {\n Vector axiom_names = (Vector)algebra_name_hashtable.get(algebra_string);\n for (int j=0; j<axiom_names.size(); j++)\n {\n String axiom_name = (String)axiom_names.elementAt(j);\n String axiom_string = (String)axiom_string_hashtable.get(axiom_name);\n // Add the axiom string pointed to by the axiom name in the algebra's list of axioms\n if (axiom_string.startsWith(\"file:\")) {\n // The axiom string begins with \"file:\", so open the file and add all axioms in it\n // Currently, only TPTP style axioms are supported\n parseAxiomFile(explainer, axiom_string.substring(5), \"tptp\");\n }\n else {\n explainer.axiom_strings.addElement(axiom_string);\n }\n }\n }\n\n String execution_parameters_string = (String)other_table.getValueAt(i,4);\n if (execution_parameters_string instanceof String && !execution_parameters_string.trim().equals(\"\"))\n {\n Categorisation cat = new Categorisation(\"[\"+execution_parameters_string+\"]\");\n Vector execution_params = (Vector)cat.elementAt(0);\n for (int j=0; j<execution_params.size(); j++)\n {\n String eqstring = (String)execution_params.elementAt(j);\n String lhs = eqstring.substring(0, eqstring.indexOf(\"=\"));\n String rhs = eqstring.substring(eqstring.indexOf(\"=\") + 1, eqstring.length());\n explainer.execution_parameters.put(lhs, rhs);\n }\n }\n String setup_name = (String)other_table.getValueAt(i,5);\n if (setup_name instanceof String && !((String)setup_name).equals(\"\"))\n explainer.setup_name = setup_name;\n }\n }\n explainers.reverse();\n for (int i=0; i<explainers.size(); i++)\n {\n Explainer explainer = (Explainer)explainers.elementAt(i);\n explainer.operating_system = operating_system;\n explainer.input_files_directory = input_files_directory;\n if (use_ground_instances)\n setGroundInstancesAsAxioms(explainer, theory.concepts);\n }\n\n }",
"public void test_der_01() {\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null);\n Resource a = m.createResource(\"http://example.org#A\");\n Resource b = m.createResource(\"http://example.org#B\");\n OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) {\n protected boolean hasSuperClassDirect(Resource cls) {\n throw new RuntimeException(\"did not find direct reasoner\");\n }\n };\n \n // will throw an exception if the wrong code path is taken\n A.hasSuperClass(b, true);\n }",
"public interface EHR_Entity extends Data_Entity {\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#agent_id\r\n String getAgent_id();\r\n\r\n RDFProperty getAgent_idProperty();\r\n\r\n boolean hasAgent_id();\r\n\r\n void setAgent_id(String newAgent_id);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#object_ids\r\n Collection getObject_ids();\r\n\r\n RDFProperty getObject_idsProperty();\r\n\r\n boolean hasObject_ids();\r\n\r\n Iterator listObject_ids();\r\n\r\n void addObject_ids(String newObject_ids);\r\n\r\n void removeObject_ids(String oldObject_ids);\r\n\r\n void setObject_ids(Collection newObject_ids);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#type\r\n String getType();\r\n\r\n RDFProperty getTypeProperty();\r\n\r\n boolean hasType();\r\n\r\n void setType(String newType);\r\n}",
"ConceptualSchemeType createConceptualSchemeType();"
] |
[
"0.75314814",
"0.73870814",
"0.713225",
"0.66359055",
"0.6607641",
"0.653787",
"0.64365494",
"0.63768524",
"0.6373277",
"0.634866",
"0.62560755",
"0.6165882",
"0.6165706",
"0.6113526",
"0.6082214",
"0.60019207",
"0.5988036",
"0.5986791",
"0.59742486",
"0.57943714",
"0.5782581",
"0.5727233",
"0.57081395",
"0.5683025",
"0.5638974",
"0.56325847",
"0.56310153",
"0.56232476",
"0.56094015",
"0.5606917",
"0.55141026",
"0.55036473",
"0.5492127",
"0.54897",
"0.54866123",
"0.5479393",
"0.5473533",
"0.5459953",
"0.5440631",
"0.5436974",
"0.5435684",
"0.53606784",
"0.53327227",
"0.53284925",
"0.53267443",
"0.53248495",
"0.5303775",
"0.52922595",
"0.52901936",
"0.52613366",
"0.5236163",
"0.52361405",
"0.5218248",
"0.5214889",
"0.5211956",
"0.52072525",
"0.52030325",
"0.5199708",
"0.5156688",
"0.51497936",
"0.5134651",
"0.51343143",
"0.51151687",
"0.5110478",
"0.51082826",
"0.50935125",
"0.50883687",
"0.5081927",
"0.50713104",
"0.5057789",
"0.5036306",
"0.5019614",
"0.5000205",
"0.4976435",
"0.4964015",
"0.4961945",
"0.49613625",
"0.49560443",
"0.49539033",
"0.49517906",
"0.49407002",
"0.4935318",
"0.49287075",
"0.49137267",
"0.49020436",
"0.49015737",
"0.48931837",
"0.48910505",
"0.48886576",
"0.48780236",
"0.4869536",
"0.48562828",
"0.48558608",
"0.48524168",
"0.48523557",
"0.4847888",
"0.48405358",
"0.48377618",
"0.48374107",
"0.4824615"
] |
0.5769989
|
21
|
15 ms +39.9 MB
|
public String minWindow2(String s, String t) {
if (s == null || s.length() == 0 || t == null || t.length() == 0) {
return "";
}
Map<Character, Integer> map = new HashMap<>();
for (char c : t.toCharArray()) {
map.put(c, map.getOrDefault(c, 0) + 1);
}
int lo = 0, hi = 0;
// count是满足窗口的条件
int count = t.length();
int minLength = s.length() + 1;
int begin = -1, end = -1;
while (hi < s.length()) {
char cur = s.charAt(hi);
if (map.containsKey(cur)) {
map.put(cur, map.get(cur) - 1);
// 也就是刚刚减去的cur,是必须的( 需要2个a, 那么第三个a就不是必须的)
if (map.get(cur) >= 0) {
count--;
}
}
// 当满足条件时, 缩小左边窗口。
while (count == 0) {
if (minLength > hi - lo + 1) {
minLength = hi - lo + 1;
begin = lo;
end = hi;
}
char toRemove = s.charAt(lo);
if (map.containsKey(toRemove)) {
map.put(toRemove, map.get(toRemove) + 1);
// 同--的地方,当窗口释放的char是必须的, count++
if (map.get(toRemove) >= 1) {
count++;
}
}
lo++;
}
hi++;
}
return begin == -1 ? "" : s.substring(begin, end + 1);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }",
"private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }",
"public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }",
"static long m61428a(File file) {\n long j;\n try {\n StatFs statFs = new StatFs(file.getAbsolutePath());\n j = (((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize())) / 50;\n } catch (IllegalArgumentException unused) {\n j = 5242880;\n }\n return Math.max(Math.min(j, 52428800), 5242880);\n }",
"public abstract long mo9746k();",
"public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }",
"public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }",
"public static long m136429b() {\n StatFs statFs;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n long j = 0;\n if (statFs != null) {\n if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getBlockCountLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getBlockCount());\n }\n }\n return (j / 1024) / 1024;\n }",
"public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }",
"long memoryUsed();",
"@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }",
"public final long mo28817a(zzjq zzjq) throws IOException {\n zzjq zzjq2;\n Long l;\n zzjq zzjq3 = zzjq;\n String str = \"ms\";\n String str2 = \"Cache connection took \";\n if (!this.f25218b) {\n this.f25218b = true;\n zzvv a = zzvv.m31316a(zzjq3.f28690a);\n if (!((Boolean) zzyt.m31536e().mo29599a(zzacu.f24194wd)).booleanValue()) {\n zzvs zzvs = null;\n if (a != null) {\n a.f29558h = zzjq3.f28692c;\n zzvs = zzk.zzlm().mo32314a(a);\n }\n if (zzvs != null && zzvs.mo32317a()) {\n this.f25217a = zzvs.mo32318c();\n return -1;\n }\n } else if (a != null) {\n a.f29558h = zzjq3.f28692c;\n if (a.f29557g) {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24206yd);\n } else {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24200xd);\n }\n long longValue = l.longValue();\n long a2 = zzk.zzln().mo27934a();\n zzk.zzma();\n Future a3 = zzwi.m31330a(this.f25219c, a);\n try {\n this.f25217a = (InputStream) a3.get(longValue, TimeUnit.MILLISECONDS);\n long a4 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei = (zzbei) this.f25221e.get();\n if (zzbei != null) {\n zzbei.mo28180a(true, a4);\n }\n StringBuilder sb = new StringBuilder(44);\n sb.append(str2);\n sb.append(a4);\n sb.append(str);\n zzawz.m26003f(sb.toString());\n return -1;\n } catch (ExecutionException | TimeoutException e) {\n a3.cancel(true);\n long a5 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei2 = (zzbei) this.f25221e.get();\n if (zzbei2 != null) {\n zzbei2.mo28180a(false, a5);\n }\n StringBuilder sb2 = new StringBuilder(44);\n sb2.append(str2);\n sb2.append(a5);\n sb2.append(str);\n zzawz.m26003f(sb2.toString());\n } catch (InterruptedException e2) {\n a3.cancel(true);\n Thread.currentThread().interrupt();\n long a6 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei3 = (zzbei) this.f25221e.get();\n if (zzbei3 != null) {\n zzbei3.mo28180a(false, a6);\n }\n StringBuilder sb3 = new StringBuilder(44);\n sb3.append(str2);\n sb3.append(a6);\n sb3.append(str);\n zzawz.m26003f(sb3.toString());\n } catch (Throwable th) {\n long a7 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei4 = (zzbei) this.f25221e.get();\n if (zzbei4 != null) {\n zzbei4.mo28180a(false, a7);\n }\n StringBuilder sb4 = new StringBuilder(44);\n sb4.append(str2);\n sb4.append(a7);\n sb4.append(str);\n zzawz.m26003f(sb4.toString());\n throw th;\n }\n }\n if (a != null) {\n zzjq2 = new zzjq(Uri.parse(a.f29551a), zzjq3.f28691b, zzjq3.f28692c, zzjq3.f28693d, zzjq3.f28694e, zzjq3.f28695f);\n } else {\n zzjq2 = zzjq3;\n }\n return this.f25220d.mo28817a(zzjq2);\n }\n throw new IOException(\"Attempt to open an already open CacheDataSource.\");\n }",
"long getSize();",
"public final long mo20953WW() {\n AppMethodBeat.m2504i(60318);\n if (fXT <= 0) {\n fXT = ((ActivityManager) C4996ah.getContext().getSystemService(\"activity\")).getLargeMemoryClass();\n }\n if (fXT >= 512) {\n AppMethodBeat.m2505o(60318);\n return 41943040;\n }\n AppMethodBeat.m2505o(60318);\n return 20971520;\n }",
"private int bytesToGibibytes(long a){\n\t\tlong gibibytes = a >> (30);\n\t\t//If storageGigs isn't an integer number, round it up \n\t\tif(gibibytes << 30 < a) {\n\t\t\tgibibytes ++;\n\t\t}\n\t\treturn (int) gibibytes;\n\t}",
"private void updateNetworkSpeed() {\n Message obtain = Message.obtain();\n obtain.what = 200000;\n long j = 0;\n if (isDemoOrDrive() || this.mDisabled || !this.mIsNetworkConnected) {\n obtain.arg1 = 0;\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n return;\n }\n long currentTimeMillis = System.currentTimeMillis();\n long totalByte = getTotalByte();\n if (totalByte == 0) {\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n totalByte = getTotalByte();\n }\n long j2 = this.mLastTime;\n if (j2 != 0 && currentTimeMillis > j2) {\n long j3 = this.mTotalBytes;\n if (!(j3 == 0 || totalByte == 0 || totalByte <= j3)) {\n j = ((totalByte - j3) * 1000) / (currentTimeMillis - j2);\n }\n }\n obtain.arg1 = 1;\n obtain.obj = Long.valueOf(j);\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = currentTimeMillis;\n this.mTotalBytes = totalByte;\n postUpdateNetworkSpeedDelay((long) this.mNetworkUpdateInterval);\n }",
"private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }",
"public static long m136421a() {\n StatFs statFs;\n long j;\n try {\n statFs = new StatFs(Environment.getExternalStorageDirectory().getAbsolutePath());\n } catch (IllegalArgumentException unused) {\n statFs = null;\n }\n if (statFs == null) {\n j = 0;\n } else if (VERSION.SDK_INT >= 18) {\n j = statFs.getBlockSizeLong() * statFs.getAvailableBlocksLong();\n } else {\n j = ((long) statFs.getBlockSize()) * ((long) statFs.getAvailableBlocks());\n }\n return (j / 1024) / 1024;\n }",
"private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}",
"private void m43017g() {\n try {\n this.f40245p = this.f40244o + Long.valueOf(this.f40240k.getHeaderField(\"Content-Length\")).longValue();\n } catch (Exception e) {\n this.f40245p = -1;\n }\n }",
"public byte[] mo3891a() {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n int i6;\n int i7;\n int i8;\n int i9;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n int i15;\n int i16;\n int i17;\n int i18;\n byte[] b;\n int i19;\n int length;\n mo3892b();\n int i20 = 3072;\n if (this.f687G != null) {\n i20 = 3072 + this.f687G.length + 1;\n }\n byte[] bArr = new byte[i20];\n bArr[0] = Byte.parseByte(this.f688a);\n byte[] b2 = C0331cr.m1177b(this.f689b);\n System.arraycopy(b2, 0, bArr, 1, b2.length);\n int length2 = b2.length + 1;\n try {\n byte[] bytes = this.f690c.getBytes(\"GBK\");\n bArr[length2] = (byte) bytes.length;\n length2++;\n System.arraycopy(bytes, 0, bArr, length2, bytes.length);\n i = length2 + bytes.length;\n } catch (Throwable th) {\n C0310c.m956a(th, \"Req\", \"buildV4Dot2\");\n bArr[length2] = 0;\n i = length2 + 1;\n }\n try {\n byte[] bytes2 = this.f691d.getBytes(\"GBK\");\n bArr[i] = (byte) bytes2.length;\n i++;\n System.arraycopy(bytes2, 0, bArr, i, bytes2.length);\n i2 = i + bytes2.length;\n } catch (Throwable th2) {\n C0310c.m956a(th2, \"Req\", \"buildV4Dot21\");\n bArr[i] = 0;\n i2 = i + 1;\n }\n try {\n byte[] bytes3 = this.f702o.getBytes(\"GBK\");\n bArr[i2] = (byte) bytes3.length;\n i2++;\n System.arraycopy(bytes3, 0, bArr, i2, bytes3.length);\n i3 = i2 + bytes3.length;\n } catch (Throwable th3) {\n C0310c.m956a(th3, \"Req\", \"buildV4Dot22\");\n bArr[i2] = 0;\n i3 = i2 + 1;\n }\n try {\n byte[] bytes4 = this.f692e.getBytes(\"GBK\");\n bArr[i3] = (byte) bytes4.length;\n i3++;\n System.arraycopy(bytes4, 0, bArr, i3, bytes4.length);\n i4 = i3 + bytes4.length;\n } catch (Throwable th4) {\n C0310c.m956a(th4, \"Req\", \"buildV4Dot23\");\n bArr[i3] = 0;\n i4 = i3 + 1;\n }\n try {\n byte[] bytes5 = this.f693f.getBytes(\"GBK\");\n bArr[i4] = (byte) bytes5.length;\n i4++;\n System.arraycopy(bytes5, 0, bArr, i4, bytes5.length);\n i5 = i4 + bytes5.length;\n } catch (Throwable th5) {\n C0310c.m956a(th5, \"Req\", \"buildV4Dot24\");\n bArr[i4] = 0;\n i5 = i4 + 1;\n }\n try {\n byte[] bytes6 = this.f694g.getBytes(\"GBK\");\n bArr[i5] = (byte) bytes6.length;\n i5++;\n System.arraycopy(bytes6, 0, bArr, i5, bytes6.length);\n i6 = i5 + bytes6.length;\n } catch (Throwable th6) {\n C0310c.m956a(th6, \"Req\", \"buildV4Dot25\");\n bArr[i5] = 0;\n i6 = i5 + 1;\n }\n try {\n byte[] bytes7 = this.f708u.getBytes(\"GBK\");\n bArr[i6] = (byte) bytes7.length;\n i6++;\n System.arraycopy(bytes7, 0, bArr, i6, bytes7.length);\n i7 = i6 + bytes7.length;\n } catch (Throwable th7) {\n C0310c.m956a(th7, \"Req\", \"buildV4Dot26\");\n bArr[i6] = 0;\n i7 = i6 + 1;\n }\n try {\n byte[] bytes8 = this.f695h.getBytes(\"GBK\");\n bArr[i7] = (byte) bytes8.length;\n i7++;\n System.arraycopy(bytes8, 0, bArr, i7, bytes8.length);\n i8 = i7 + bytes8.length;\n } catch (Throwable th8) {\n C0310c.m956a(th8, \"Req\", \"buildV4Dot27\");\n bArr[i7] = 0;\n i8 = i7 + 1;\n }\n try {\n byte[] bytes9 = this.f703p.getBytes(\"GBK\");\n bArr[i8] = (byte) bytes9.length;\n i8++;\n System.arraycopy(bytes9, 0, bArr, i8, bytes9.length);\n i9 = i8 + bytes9.length;\n } catch (Throwable th9) {\n C0310c.m956a(th9, \"Req\", \"buildV4Dot28\");\n bArr[i8] = 0;\n i9 = i8 + 1;\n }\n try {\n byte[] bytes10 = this.f704q.getBytes(\"GBK\");\n bArr[i9] = (byte) bytes10.length;\n i9++;\n System.arraycopy(bytes10, 0, bArr, i9, bytes10.length);\n i10 = i9 + bytes10.length;\n } catch (Throwable th10) {\n C0310c.m956a(th10, \"Req\", \"buildV4Dot29\");\n bArr[i9] = 0;\n i10 = i9 + 1;\n }\n try {\n if (TextUtils.isEmpty(this.f707t)) {\n bArr[i10] = 0;\n length = i10 + 1;\n } else {\n byte[] b3 = m1034b(this.f707t);\n bArr[i10] = (byte) b3.length;\n int i21 = i10 + 1;\n System.arraycopy(b3, 0, bArr, i21, b3.length);\n length = b3.length + i21;\n }\n i11 = length;\n } catch (Throwable th11) {\n C0310c.m956a(th11, \"Req\", \"buildV4Dot219\");\n bArr[i10] = 0;\n i11 = i10 + 1;\n }\n try {\n byte[] bytes11 = this.f709v.getBytes(\"GBK\");\n bArr[i11] = (byte) bytes11.length;\n i11++;\n System.arraycopy(bytes11, 0, bArr, i11, bytes11.length);\n i12 = i11 + bytes11.length;\n } catch (Throwable th12) {\n C0310c.m956a(th12, \"Req\", \"buildV4Dot211\");\n bArr[i11] = 0;\n i12 = i11 + 1;\n }\n try {\n byte[] bytes12 = this.f710w.getBytes(\"GBK\");\n bArr[i12] = (byte) bytes12.length;\n i12++;\n System.arraycopy(bytes12, 0, bArr, i12, bytes12.length);\n i13 = i12 + bytes12.length;\n } catch (Throwable th13) {\n C0310c.m956a(th13, \"Req\", \"buildV4Dot212\");\n bArr[i12] = 0;\n i13 = i12 + 1;\n }\n try {\n byte[] bytes13 = this.f711x.getBytes(\"GBK\");\n bArr[i13] = (byte) bytes13.length;\n i13++;\n System.arraycopy(bytes13, 0, bArr, i13, bytes13.length);\n i14 = bytes13.length + i13;\n } catch (Throwable th14) {\n C0310c.m956a(th14, \"Req\", \"buildV4Dot213\");\n bArr[i13] = 0;\n i14 = i13 + 1;\n }\n bArr[i14] = Byte.parseByte(this.f712y);\n int i22 = i14 + 1;\n bArr[i22] = Byte.parseByte(this.f697j);\n int i23 = i22 + 1;\n bArr[i23] = Byte.parseByte(this.f713z);\n int i24 = i23 + 1;\n if (this.f713z.equals(\"1\")) {\n byte[] d = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d, 0, bArr, i24, d.length);\n int length3 = i24 + d.length;\n byte[] d2 = C0331cr.m1187d(mo3890a(\"mnc\"));\n System.arraycopy(d2, 0, bArr, length3, d2.length);\n int length4 = length3 + d2.length;\n byte[] d3 = C0331cr.m1187d(mo3890a(\"lac\"));\n System.arraycopy(d3, 0, bArr, length4, d3.length);\n int length5 = length4 + d3.length;\n byte[] e = C0331cr.m1190e(mo3890a(\"cellid\"));\n System.arraycopy(e, 0, bArr, length5, e.length);\n int length6 = e.length + length5;\n int parseInt = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt > 127) {\n parseInt = 0;\n }\n bArr[length6] = (byte) parseInt;\n int i25 = length6 + 1;\n if (this.f682B.length() == 0) {\n bArr[i25] = 0;\n i24 = i25 + 1;\n } else {\n int length7 = this.f682B.split(\"\\\\*\").length;\n bArr[i25] = (byte) length7;\n i24 = i25 + 1;\n int i26 = 0;\n while (i26 < length7) {\n byte[] d4 = C0331cr.m1187d(m1032a(\"lac\", i26));\n System.arraycopy(d4, 0, bArr, i24, d4.length);\n int length8 = i24 + d4.length;\n byte[] e2 = C0331cr.m1190e(m1032a(\"cellid\", i26));\n System.arraycopy(e2, 0, bArr, length8, e2.length);\n int length9 = e2.length + length8;\n int parseInt2 = Integer.parseInt(m1032a(\"signal\", i26));\n if (parseInt2 > 127) {\n parseInt2 = 0;\n }\n bArr[length9] = (byte) parseInt2;\n i26++;\n i24 = length9 + 1;\n }\n }\n } else if (this.f713z.equals(\"2\")) {\n byte[] d5 = C0331cr.m1187d(mo3890a(\"mcc\"));\n System.arraycopy(d5, 0, bArr, i24, d5.length);\n int length10 = i24 + d5.length;\n byte[] d6 = C0331cr.m1187d(mo3890a(\"sid\"));\n System.arraycopy(d6, 0, bArr, length10, d6.length);\n int length11 = length10 + d6.length;\n byte[] d7 = C0331cr.m1187d(mo3890a(\"nid\"));\n System.arraycopy(d7, 0, bArr, length11, d7.length);\n int length12 = length11 + d7.length;\n byte[] d8 = C0331cr.m1187d(mo3890a(\"bid\"));\n System.arraycopy(d8, 0, bArr, length12, d8.length);\n int length13 = length12 + d8.length;\n byte[] e3 = C0331cr.m1190e(mo3890a(\"lon\"));\n System.arraycopy(e3, 0, bArr, length13, e3.length);\n int length14 = length13 + e3.length;\n byte[] e4 = C0331cr.m1190e(mo3890a(C1447g.f3485ae));\n System.arraycopy(e4, 0, bArr, length14, e4.length);\n int length15 = e4.length + length14;\n int parseInt3 = Integer.parseInt(mo3890a(\"signal\"));\n if (parseInt3 > 127) {\n parseInt3 = 0;\n }\n bArr[length15] = (byte) parseInt3;\n int i27 = length15 + 1;\n bArr[i27] = 0;\n i24 = i27 + 1;\n }\n if (this.f683C.length() == 0) {\n bArr[i24] = 0;\n i15 = i24 + 1;\n } else {\n bArr[i24] = 1;\n int i28 = i24 + 1;\n try {\n String[] split = this.f683C.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n byte[] b4 = m1034b(split[0]);\n System.arraycopy(b4, 0, bArr, i28, b4.length);\n int length16 = i28 + b4.length;\n try {\n byte[] bytes14 = split[2].getBytes(\"GBK\");\n bArr[length16] = (byte) bytes14.length;\n length16++;\n System.arraycopy(bytes14, 0, bArr, length16, bytes14.length);\n i16 = length16 + bytes14.length;\n } catch (Throwable th15) {\n C0310c.m956a(th15, \"Req\", \"buildV4Dot214\");\n bArr[length16] = 0;\n i16 = length16 + 1;\n }\n int parseInt4 = Integer.parseInt(split[1]);\n if (parseInt4 > 127) {\n parseInt4 = 0;\n }\n bArr[i16] = Byte.parseByte(String.valueOf(parseInt4));\n i15 = i16 + 1;\n } catch (Throwable th16) {\n C0310c.m956a(th16, \"Req\", \"buildV4Dot216\");\n byte[] b5 = m1034b(\"00:00:00:00:00:00\");\n System.arraycopy(b5, 0, bArr, i28, b5.length);\n int length17 = b5.length + i28;\n bArr[length17] = 0;\n int i29 = length17 + 1;\n bArr[i29] = Byte.parseByte(\"0\");\n i15 = i29 + 1;\n }\n }\n String[] split2 = this.f684D.split(\"\\\\*\");\n if (TextUtils.isEmpty(this.f684D) || split2.length == 0) {\n bArr[i15] = 0;\n i17 = i15 + 1;\n } else {\n bArr[i15] = (byte) split2.length;\n int i30 = i15 + 1;\n for (String str : split2) {\n String[] split3 = str.split(MiPushClient.ACCEPT_TIME_SEPARATOR);\n try {\n b = m1034b(split3[0]);\n } catch (Throwable th17) {\n C0310c.m956a(th17, \"Req\", \"buildV4Dot2110\");\n b = m1034b(\"00:00:00:00:00:00\");\n }\n System.arraycopy(b, 0, bArr, i30, b.length);\n int length18 = i30 + b.length;\n try {\n byte[] bytes15 = split3[2].getBytes(\"GBK\");\n bArr[length18] = (byte) bytes15.length;\n length18++;\n System.arraycopy(bytes15, 0, bArr, length18, bytes15.length);\n i19 = bytes15.length + length18;\n } catch (Throwable th18) {\n C0310c.m956a(th18, \"Req\", \"buildV4Dot217\");\n bArr[length18] = 0;\n i19 = length18 + 1;\n }\n int parseInt5 = Integer.parseInt(split3[1]);\n if (parseInt5 > 127) {\n parseInt5 = 0;\n }\n bArr[i19] = Byte.parseByte(String.valueOf(parseInt5));\n i30 = i19 + 1;\n }\n byte[] b6 = C0331cr.m1177b(Integer.parseInt(this.f685E));\n System.arraycopy(b6, 0, bArr, i30, b6.length);\n i17 = i30 + b6.length;\n }\n try {\n byte[] bytes16 = this.f686F.getBytes(\"GBK\");\n if (bytes16.length > 127) {\n bytes16 = null;\n }\n if (bytes16 == null) {\n bArr[i17] = 0;\n i18 = i17 + 1;\n } else {\n bArr[i17] = (byte) bytes16.length;\n int i31 = i17 + 1;\n System.arraycopy(bytes16, 0, bArr, i31, bytes16.length);\n i18 = bytes16.length + i31;\n }\n } catch (Throwable th19) {\n C0310c.m956a(th19, \"Req\", \"buildV4Dot218\");\n bArr[i17] = 0;\n i18 = i17 + 1;\n }\n int length19 = this.f687G != null ? this.f687G.length : 0;\n byte[] b7 = C0331cr.m1177b(length19);\n System.arraycopy(b7, 0, bArr, i18, b7.length);\n int length20 = i18 + b7.length;\n if (length19 > 0) {\n System.arraycopy(this.f687G, 0, bArr, length20, this.f687G.length);\n length20 += this.f687G.length;\n }\n byte[] bArr2 = new byte[length20];\n System.arraycopy(bArr, 0, bArr2, 0, length20);\n CRC32 crc32 = new CRC32();\n crc32.update(bArr2);\n byte[] a = C0331cr.m1167a(crc32.getValue());\n byte[] bArr3 = new byte[(a.length + length20)];\n System.arraycopy(bArr2, 0, bArr3, 0, length20);\n System.arraycopy(a, 0, bArr3, length20, a.length);\n int length21 = length20 + a.length;\n m1033a(bArr3, 0);\n return bArr3;\n }",
"@Override\n public int estimateSize() {\n return 8 + 8 + 1 + 32 + 64;\n }",
"private void m9023a(int i) {\n int i2;\n Object obj = null;\n AppMethodBeat.m2504i(98679);\n try {\n BufferedInputStream bufferedInputStream = new BufferedInputStream(this.f1556t.getInputStream());\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[4096];\n i2 = 0;\n do {\n try {\n int read = bufferedInputStream.read(bArr);\n if (read == -1) {\n int obj2 = 1;\n break;\n } else {\n byteArrayOutputStream.write(bArr, 0, read);\n i2 += read;\n }\n } catch (Exception e) {\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e2) {\n }\n } while (i2 <= i);\n this.f1559w.f1540a = -303;\n this.f1559w.f1541b = \"no-content-length\";\n if (obj2 != null) {\n this.f1559w.f1543d = byteArrayOutputStream.toByteArray();\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n }\n byteArrayOutputStream.close();\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e3) {\n i2 = 0;\n } catch (Exception e4) {\n this.f1559w.f1540a = -287;\n this.f1559w.f1541b = \"read without content-length error\";\n AppMethodBeat.m2505o(98679);\n return;\n }\n this.f1559w.f1540a = -306;\n this.f1559w.f1541b = \"no-content-length:\".concat(String.valueOf(i2));\n AppMethodBeat.m2505o(98679);\n }",
"@Override\n public long estimateSize() { return Long.MAX_VALUE; }",
"public static String m576f() {\r\n long j = 0;\r\n try {\r\n StatFs statFs = new StatFs(Environment.getDataDirectory().getPath());\r\n j = ((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize());\r\n } catch (Exception e) {\r\n }\r\n return String.valueOf(j);\r\n }",
"private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }",
"private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }",
"@Test(timeout = 4000)\n public void test52() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickSize(6372, 3, 2146363568);\n assertEquals(\"id=6372 askSize=2146363568\", string0);\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n XSQLVAR[] xSQLVARArray0 = new XSQLVAR[0];\n FBResultSet fBResultSet0 = new FBResultSet(xSQLVARArray0, linkedList0);\n byte[][] byteArray0 = new byte[7][0];\n byte[] byteArray1 = new byte[7];\n byteArray1[0] = (byte) (-111);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!3eO>|kx{3s''g6%=\");\n byteArray1[1] = (byte) (-109);\n byteArray1[2] = (byte)31;\n linkedList0.add((byte[][]) null);\n linkedList0.add(byteArray0);\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, fBResultSet0);\n fBCachedFetcher0.next();\n fBCachedFetcher0.deleteRow();\n assertTrue(fBCachedFetcher0.isLast());\n }",
"long storageSize();",
"private double loadFactor()\n {\n double bucketsLength = buckets.length;\n return currentSize / bucketsLength;\n }",
"int getCacheSizeInMiB();",
"static int m61449a(Bitmap bitmap) {\n return bitmap.getByteCount();\n }",
"int memSize() {\n return super.memSize() + 4 * 4; }",
"@Override\n public double compactionTimePerKbInNanos()\n {\n return TimeUnit.MICROSECONDS.toNanos(compactionTimeMicros);\n }",
"private long m18344e(long frameCount) {\n return (1000000 * frameCount) / ((long) this.f16624r);\n }",
"Long diskSizeBytes();",
"@Override\n public long estimateSize() {\n return Long.MAX_VALUE;\n }",
"private static long bytesToMega(long bytes) {\n return bytes / MEGABYTE;\n }",
"private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }",
"@Override\n public int getCacheSize() {\n return 4 + 20 * (4 + 4 + 8);\n }",
"public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}",
"private long m18337c(long durationUs) {\n return (((long) this.f16625s) * durationUs) / 1000000;\n }",
"long sizeInBytes() throws IOException;",
"public int getBatchDownloadWaitTime()\n {\n return 1000; \n }",
"private long m18341d(long frameCount) {\n return (1000000 * frameCount) / ((long) this.f16625s);\n }",
"@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }",
"@Override public long getSimulatedSize() {\n return 1;\n }",
"private static int getBytes(long r23) {\n /*\n java.lang.ThreadLocal<byte[]> r0 = TEMP_NUMBER_BUFFER\n java.lang.Object r0 = r0.get()\n byte[] r0 = (byte[]) r0\n r1 = 20\n if (r0 != 0) goto L_0x0013\n byte[] r0 = new byte[r1]\n java.lang.ThreadLocal<byte[]> r2 = TEMP_NUMBER_BUFFER\n r2.set(r0)\n L_0x0013:\n r2 = -9223372036854775808\n r4 = 54\n r5 = 57\n r6 = 45\n r7 = 53\n r8 = 56\n r9 = 55\n r10 = 51\n r11 = 50\n r12 = 0\n r13 = 48\n r14 = 1\n int r15 = (r23 > r2 ? 1 : (r23 == r2 ? 0 : -1))\n if (r15 != 0) goto L_0x0076\n r0[r12] = r6\n r0[r14] = r5\n r2 = 2\n r0[r2] = r11\n r2 = 3\n r0[r2] = r11\n r2 = 4\n r0[r2] = r10\n r2 = 5\n r0[r2] = r10\n r2 = 6\n r0[r2] = r9\n r2 = 7\n r0[r2] = r11\n r2 = 8\n r0[r2] = r13\n r2 = 9\n r0[r2] = r10\n r2 = 10\n r0[r2] = r4\n r2 = 11\n r0[r2] = r8\n r2 = 12\n r0[r2] = r7\n r2 = 13\n r3 = 52\n r0[r2] = r3\n r2 = 14\n r0[r2] = r9\n r2 = 15\n r0[r2] = r9\n r2 = 16\n r0[r2] = r7\n r2 = 17\n r0[r2] = r8\n r2 = 18\n r0[r2] = r13\n r2 = 19\n r0[r2] = r8\n return r1\n L_0x0076:\n r1 = 0\n int r3 = (r23 > r1 ? 1 : (r23 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x007f\n r0[r12] = r13\n return r14\n L_0x007f:\n if (r3 >= 0) goto L_0x0088\n r0[r12] = r6\n long r15 = java.lang.Math.abs(r23)\n goto L_0x008b\n L_0x0088:\n r14 = 0\n r15 = r23\n L_0x008b:\n r17 = 9\n r19 = 10\n r21 = 1\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0099\n r17 = r21\n goto L_0x017e\n L_0x0099:\n r17 = 99\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00a3\n r17 = r19\n goto L_0x017e\n L_0x00a3:\n r17 = 999(0x3e7, double:4.936E-321)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ad\n r17 = 100\n goto L_0x017e\n L_0x00ad:\n r17 = 9999(0x270f, double:4.94E-320)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00b7\n r17 = 1000(0x3e8, double:4.94E-321)\n goto L_0x017e\n L_0x00b7:\n r17 = 99999(0x1869f, double:4.9406E-319)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00c2\n r17 = 10000(0x2710, double:4.9407E-320)\n goto L_0x017e\n L_0x00c2:\n r17 = 999999(0xf423f, double:4.94065E-318)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ce\n r17 = 100000(0x186a0, double:4.94066E-319)\n goto L_0x017e\n L_0x00ce:\n r17 = 9999999(0x98967f, double:4.940656E-317)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00da\n r17 = 1000000(0xf4240, double:4.940656E-318)\n goto L_0x017e\n L_0x00da:\n r17 = 99999999(0x5f5e0ff, double:4.9406564E-316)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00e6\n r17 = 10000000(0x989680, double:4.9406565E-317)\n goto L_0x017e\n L_0x00e6:\n r17 = 999999999(0x3b9ac9ff, double:4.940656453E-315)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00f2\n r17 = 100000000(0x5f5e100, double:4.94065646E-316)\n goto L_0x017e\n L_0x00f2:\n r17 = 9999999999(0x2540be3ff, double:4.940656458E-314)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0100\n r17 = 1000000000(0x3b9aca00, double:4.94065646E-315)\n goto L_0x017e\n L_0x0100:\n r17 = 99999999999(0x174876e7ff, double:4.94065645836E-313)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0110\n r17 = 10000000000(0x2540be400, double:4.9406564584E-314)\n goto L_0x017e\n L_0x0110:\n r17 = 999999999999(0xe8d4a50fff, double:4.940656458408E-312)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x011f\n r17 = 100000000000(0x174876e800, double:4.9406564584E-313)\n goto L_0x017e\n L_0x011f:\n r17 = 9999999999999(0x9184e729fff, double:4.940656458412E-311)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x012e\n r17 = 1000000000000(0xe8d4a51000, double:4.94065645841E-312)\n goto L_0x017e\n L_0x012e:\n r17 = 99999999999999(0x5af3107a3fff, double:4.9406564584124E-310)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x013d\n r17 = 10000000000000(0x9184e72a000, double:4.9406564584125E-311)\n goto L_0x017e\n L_0x013d:\n r17 = 999999999999999(0x38d7ea4c67fff, double:4.94065645841246E-309)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x014c\n r17 = 100000000000000(0x5af3107a4000, double:4.94065645841247E-310)\n goto L_0x017e\n L_0x014c:\n r17 = 9999999999999999(0x2386f26fc0ffff, double:5.431165199810527E-308)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x015b\n r17 = 1000000000000000(0x38d7ea4c68000, double:4.940656458412465E-309)\n goto L_0x017e\n L_0x015b:\n r17 = 99999999999999999(0x16345785d89ffff, double:5.620395787888204E-302)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x016a\n r17 = 10000000000000000(0x2386f26fc10000, double:5.431165199810528E-308)\n goto L_0x017e\n L_0x016a:\n r17 = 999999999999999999(0xde0b6b3a763ffff, double:7.832953389245684E-242)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0179\n r17 = 100000000000000000(0x16345785d8a0000, double:5.620395787888205E-302)\n goto L_0x017e\n L_0x0179:\n r17 = 1000000000000000000(0xde0b6b3a7640000, double:7.832953389245686E-242)\n L_0x017e:\n long r1 = r15 / r17\n int r3 = (int) r1\n switch(r3) {\n case 0: goto L_0x01b6;\n case 1: goto L_0x01af;\n case 2: goto L_0x01aa;\n case 3: goto L_0x01a5;\n case 4: goto L_0x019e;\n case 5: goto L_0x0199;\n case 6: goto L_0x0194;\n case 7: goto L_0x018f;\n case 8: goto L_0x018a;\n case 9: goto L_0x0185;\n default: goto L_0x0184;\n }\n L_0x0184:\n goto L_0x01bb\n L_0x0185:\n int r3 = r14 + 1\n r0[r14] = r5\n goto L_0x01ba\n L_0x018a:\n int r3 = r14 + 1\n r0[r14] = r8\n goto L_0x01ba\n L_0x018f:\n int r3 = r14 + 1\n r0[r14] = r9\n goto L_0x01ba\n L_0x0194:\n int r3 = r14 + 1\n r0[r14] = r4\n goto L_0x01ba\n L_0x0199:\n int r3 = r14 + 1\n r0[r14] = r7\n goto L_0x01ba\n L_0x019e:\n int r3 = r14 + 1\n r6 = 52\n r0[r14] = r6\n goto L_0x01ba\n L_0x01a5:\n int r3 = r14 + 1\n r0[r14] = r10\n goto L_0x01ba\n L_0x01aa:\n int r3 = r14 + 1\n r0[r14] = r11\n goto L_0x01ba\n L_0x01af:\n int r3 = r14 + 1\n r6 = 49\n r0[r14] = r6\n goto L_0x01ba\n L_0x01b6:\n int r3 = r14 + 1\n r0[r14] = r13\n L_0x01ba:\n r14 = r3\n L_0x01bb:\n int r3 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r3 != 0) goto L_0x01c0\n goto L_0x01d8\n L_0x01c0:\n java.lang.Long.signum(r17)\n long r1 = r1 * r17\n long r15 = r15 - r1\n r1 = 0\n int r3 = (r15 > r1 ? 1 : (r15 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x01d9\n L_0x01cc:\n int r1 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r1 <= 0) goto L_0x01d8\n int r1 = r14 + 1\n r0[r14] = r13\n long r17 = r17 / r19\n r14 = r1\n goto L_0x01cc\n L_0x01d8:\n return r14\n L_0x01d9:\n long r17 = r17 / r19\n goto L_0x017e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.util.ByteStringBuffer.getBytes(long):int\");\n }",
"private double getReadTime(int wordCount) {\n return wordCount / 130.0;\n }",
"@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }",
"@Override\r\n protected Double doInBackground(Void... params) {\n try {\r\n double size1 = FileSizeUtil.getFileOrFilesSize(MyString.maps_cache_google_img_folder_path, FileSizeUtil.SIZETYPE_MB);\r\n double size2 = FileSizeUtil.getFileOrFilesSize(MyString.maps_cache_google_img_anno_folder_path, FileSizeUtil.SIZETYPE_MB);\r\n double storage = size1 + size2;\r\n //存入数据\r\n MySharedPreferences.putOfflineTileSize(storage);\r\n return storage;\r\n } catch (Exception e) {\r\n return 0.0;\r\n }\r\n }",
"@Override\n public void run() {\n \n while (true) {\n \n // generate large VTFull files\n w.write(Utils.getInstance().generateFileName());\n \n try {\n \n Thread.sleep(Consts.SHORT_NAP);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n \n }",
"@SuppressWarnings(\"unused\") \n public void testBigFile() {\n URL resource = getResource(\"/junit-stats.xml\"); // a big file\n String folder = \"\\\\\\\\dev1\\\\c$\\\\tcs_build\\\\archive\";\n long originalLastModified = getOrginalFileLastModified(resource);\n HistoricalTestStatisticsFileManager manager = new HistoricalTestStatisticsFileManager(folder, resource.getFile(), Long.MAX_VALUE);\n verifyRevisionsLoaded(manager, 65);\n verifyRevisionListSize(manager, 65);\n List<String> orginalRevisionList = manager.getRevisionList();\n manager.run();\n assertEquals(\"you didn't clone the list correctly\", 65, orginalRevisionList.size());\n List<String> updatedRevisionList = manager.getRevisionList();\n File updatedFile = new File(resource.getFile());\n assertTrue(\"failed to update the file\", updatedFile.lastModified() != originalLastModified); \n }",
"private static long cpio(BufferedInputStream in, BufferedOutputStream out, String wt) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tint c;\r\n\t\tlong tot = 0;\r\n\t\tlong s = System.nanoTime();\r\n\t\twhile ((c = in.read(buffer, 0, buffer.length)) != -1) {\r\n\t\t\tout.write(buffer, 0, c);\r\n\t\t\ttot += c;\r\n\t\t}\r\n\r\n\t\tlong tim = System.nanoTime() - s;\r\n\t\tdouble dtim = tim == 0 ? 0.5 : tim; // avg of those less than 1 nanoseconds is taken as 0.5 nanoseconds\r\n\t\tdouble bps = tot * 1000 * 1000 / dtim;\r\n\t\tSystem.out.println(bps);\r\n\t\treturn tot;\r\n\t}",
"long getChunkSize();",
"long getChunkSize();",
"long getChunkSize();",
"long getChunkSize();",
"public final long mo20954WX() {\n return 10485760;\n }",
"private void m145775e() {\n long j;\n String str;\n int i;\n if (!this.f119477j.mo115499a()) {\n if (this.f119484q != null) {\n str = \"PRAGMA cipher_page_size\";\n if (this.f119485r == null || this.f119485r.pageSize <= 0) {\n i = SQLiteGlobal.f119529a;\n } else {\n i = this.f119485r.pageSize;\n }\n j = (long) i;\n } else {\n str = \"PRAGMA page_size\";\n j = (long) SQLiteGlobal.f119529a;\n }\n if (mo115435b(str, null, null) != j) {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\"=\");\n sb.append(j);\n mo115433a(sb.toString(), null, null);\n }\n }\n }",
"public abstract long mo9755t();",
"public void crunch(){\n cpuBurstTime--;\n rem--;\n }",
"@Override\n public long generateNewContractDuration(long size) {\n return new Random().nextInt(5) + 1 + (size / 1000000);\n }",
"public abstract long mo9229aD();",
"@Override\n public int getCacheSize() {\n return 4 * 1024 * 1024;\n }",
"@Override\n public long generateNewContractSize() {\n return (new Random().nextInt(100) + 1) * 250000L;\n }",
"@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }",
"long getMemLimit();",
"long memoryUnused();",
"private String countFileSize(long length) {\n\n if (length < UNIT) {\n return length + \" B\";\n }\n int exp = (int) (Math.log(length) / Math.log(UNIT));\n String pre = \"KMGTPE\".charAt(exp - 1) + \"i\";\n\n return String.format(\"%.1f %sB\", length / Math.pow(UNIT, exp), pre);\n\n }",
"@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}",
"public void mo4059b() {\n imageCacheStatsTracker.mo4072f();\n }",
"public long getRealWriteThroughput()\r\n/* 244: */ {\r\n/* 245:448 */ return this.realWriteThroughput;\r\n/* 246: */ }",
"long getTotalFreeSpaceInBytes();",
"long getTotalFreeSpaceInBytes();",
"private long size() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}",
"@Override\n public long progressInterval() {\n return 500;\n }",
"public long mo9746k() {\n return mo9786y();\n }",
"private byte[] m150948d() throws IOException {\n DataInputStream dataInputStream;\n ByteArrayOutputStream byteArrayOutputStream;\n Throwable th;\n byte[] bArr;\n Exception e;\n long a = mo131997a();\n if (a <= 2147483647L) {\n try {\n dataInputStream = new DataInputStream(mo131998b());\n try {\n byteArrayOutputStream = new ByteArrayOutputStream();\n } catch (Exception e2) {\n e = e2;\n byteArrayOutputStream = null;\n try {\n TBSdkLog.m150897b(\"mtopsdk.ResponseBody\", \"[readBytes] read bytes from byteStream error.\", e);\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n bArr = null;\n if (bArr != null) {\n }\n } catch (Throwable th2) {\n th = th2;\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n throw th;\n }\n } catch (Throwable th3) {\n th = th3;\n byteArrayOutputStream = null;\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n throw th;\n }\n try {\n byte[] bArr2 = new byte[1024];\n while (true) {\n int read = dataInputStream.read(bArr2);\n if (read == -1) {\n break;\n }\n byteArrayOutputStream.write(bArr2, 0, read);\n }\n byteArrayOutputStream.flush();\n bArr = byteArrayOutputStream.toByteArray();\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n } catch (Exception e3) {\n e = e3;\n TBSdkLog.m150897b(\"mtopsdk.ResponseBody\", \"[readBytes] read bytes from byteStream error.\", e);\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n bArr = null;\n if (bArr != null) {\n }\n }\n } catch (Exception e4) {\n e = e4;\n byteArrayOutputStream = null;\n dataInputStream = null;\n TBSdkLog.m150897b(\"mtopsdk.ResponseBody\", \"[readBytes] read bytes from byteStream error.\", e);\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n bArr = null;\n if (bArr != null) {\n }\n } catch (Throwable th4) {\n th = th4;\n byteArrayOutputStream = null;\n dataInputStream = null;\n C32686a.m150970a(dataInputStream);\n C32686a.m150970a(byteArrayOutputStream);\n throw th;\n }\n if (bArr != null) {\n return null;\n }\n if (a == -1 || a == ((long) bArr.length)) {\n return bArr;\n }\n throw new IOException(\"Content-Length and stream length disagree\");\n }\n throw new IOException(\"Cannot buffer entire body for content length: \" + a);\n }",
"long getSize() throws IOException;",
"public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }",
"public void testPerformance() {\n \t}",
"@Override\n\t\tpublic long usage() {\n\t\t\t\n\t\t\treturn super.usage();\n\t\t}",
"@Override\r\n public long problem0(int size) {\r\n System.out.println(\"This is just an example, but please follow this template.\");\r\n String s = \"\";\r\n long start = System.currentTimeMillis();\r\n\r\n for (int i=0; i<size; i++) {\r\n s = s + i;\r\n }\r\n \r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }",
"long getQuantite();",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/S_NULL.XML\");\n byte[] byteArray0 = new byte[9];\n FileSystemHandling.appendDataToFile(evoSuiteFile0, byteArray0);\n FileInputStream fileInputStream0 = fileUtil0.fetchSimilarItems((String) null, \"\");\n assertEquals(9, fileInputStream0.available());\n }",
"long getWorkfileSize();",
"protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }",
"public abstract long mo13681c();",
"public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}",
"int totalWritten();",
"@Override\n public long cost() {\n return 100;\n }",
"private void m146730a(int i) throws IOException {\n if (!this.f120295d.mo118061a(i, 8000)) {\n C46869g.m146601a(this.f120292a, 4, \"Twitter\", C1642a.m8035a(Locale.US, \"session analytics events file is %d bytes, new event is %d bytes, this is over flush limit of %d, rolling it over\", new Object[]{Integer.valueOf(this.f120295d.mo118056a()), Integer.valueOf(i), Integer.valueOf(8000)}));\n mo118045a();\n }\n }",
"private static byte[] m2536b(Context context) {\n byte[] c = StatisticsManager.m2537c(context);\n byte[] e = StatisticsManager.m2539e(context);\n byte[] bArr = new byte[(c.length + e.length)];\n System.arraycopy(c, 0, bArr, 0, c.length);\n System.arraycopy(e, 0, bArr, c.length, e.length);\n return StatisticsManager.m2534a(context, bArr);\n }",
"public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }",
"public void mo4058a() {\n imageCacheStatsTracker.mo4071e();\n }",
"@Test(timeout = 4000)\n public void test077() throws Throwable {\n byte[] byteArray0 = new byte[1];\n ValueLobDb valueLobDb0 = ValueLobDb.createSmallLob(1459, byteArray0, (byte)0);\n Reader reader0 = valueLobDb0.getReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(reader0);\n streamTokenizer0.nval = 32768.0;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n assertEquals(\"32768\", string0);\n }",
"@Override\n public int getMaxCapacity() {\n return 156250000;\n }",
"private int m23822a() {\n int min = Math.min(this.f25314a.getMemoryClass() * 1048576, Integer.MAX_VALUE);\n if (min < 33554432) {\n return 4194304;\n }\n if (min < 67108864) {\n return 6291456;\n }\n if (VERSION.SDK_INT < 11) {\n return 8388608;\n }\n return min / 4;\n }"
] |
[
"0.63536817",
"0.63156325",
"0.6208219",
"0.61508536",
"0.6002675",
"0.5844734",
"0.58372843",
"0.58213526",
"0.57861227",
"0.57600087",
"0.5654178",
"0.56168",
"0.5608328",
"0.5594298",
"0.55890685",
"0.55857736",
"0.5572426",
"0.55715245",
"0.55440605",
"0.55331904",
"0.5531063",
"0.5530165",
"0.55226636",
"0.5494326",
"0.5468834",
"0.5458635",
"0.5458635",
"0.545825",
"0.5443578",
"0.5438851",
"0.5430422",
"0.5394078",
"0.5391052",
"0.5389016",
"0.53778553",
"0.5361048",
"0.53573525",
"0.5354978",
"0.5349833",
"0.53426737",
"0.5337343",
"0.5333431",
"0.53309476",
"0.5328728",
"0.5324182",
"0.53118837",
"0.5311087",
"0.53069884",
"0.5306761",
"0.53061503",
"0.53018844",
"0.53006405",
"0.52995056",
"0.52947724",
"0.5281102",
"0.52682865",
"0.52682865",
"0.52682865",
"0.52682865",
"0.5264349",
"0.52639806",
"0.5263111",
"0.5252471",
"0.5251942",
"0.52490175",
"0.524804",
"0.5233767",
"0.5222667",
"0.5220563",
"0.5219863",
"0.5219658",
"0.521876",
"0.5207939",
"0.52058285",
"0.52049476",
"0.52049476",
"0.5204293",
"0.5203901",
"0.5202671",
"0.5201047",
"0.5197207",
"0.5196408",
"0.51938623",
"0.5183699",
"0.5182377",
"0.5181433",
"0.51814264",
"0.51782423",
"0.5178093",
"0.51747626",
"0.5170413",
"0.51702505",
"0.51687276",
"0.5168435",
"0.5167801",
"0.5165889",
"0.51645315",
"0.516396",
"0.5163481",
"0.5162945",
"0.5161997"
] |
0.0
|
-1
|
to stop the running process of file reading.
|
public void stopFile(){
try {
running = false;
resumeFile();
}
catch (Exception e) {
e.printStackTrace();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void stop() {\n isRunning = false;\n\n mReadLogsHandler = null;\n if (mReadLogThread != null) {\n final Thread inherited = mReadLogThread;\n mReadLogThread = null;\n inherited.interrupt();\n }\n\n IOUtilities.closeStream(reader);\n }",
"public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }",
"public abstract void stopAcceptingFiles();",
"public void stopWorking() throws IOException {\r\n\t\tthis.stop_working = true;\r\n\t}",
"public void stopProcessing() {\n interrupted = true;\n }",
"public void stop()\n\t{\n\t\trunning = false;\n\t}",
"public void stop() {\r\n running = false;\r\n }",
"public void stop() {\n running = false;\n }",
"void stop() throws IOException;",
"public void stop() {\n _running = false;\n }",
"public void stopProcess() {\r\n\t\tprocess = false;\r\n\t}",
"public void stop()\n {\n running = false;\n }",
"public void stop(){\n running = false;\n }",
"@Override\n\tpublic void stopProcessing() {\n\n\t}",
"public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}",
"public synchronized void stop() {\n this.running = false;\n }",
"public final void stop() {\n running = false;\n \n \n\n }",
"@Override\r\n public void stop() throws IOException {\n\r\n }",
"public void stop()\n throws IOException\n {\n }",
"public void stopThread() {\n\t\talive = false;\n\t\t\n\t\ttry {\n\t\t\tif(oos != null) {\n\t\t\t\toos.close();\n\t\t\t}\n\t\t\tif(ois != null) {\n\t\t\t\tois.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// Why the hell is that being thrown here? Doesn't matter.\n\t\t}\n\t}",
"File stopRecording();",
"public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void\n stop() throws IOException;",
"private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}",
"public void stopThread(){\r\n\t\tthis.p.destroy();\r\n\t\ttry {\r\n\t\t\tinput.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.stop();\r\n\t}",
"public void stop() {\n stop = true;\n //index--;\n line.flush();\n line.close();\n try {\n decodedInput.close();\n } catch (IOException ex) {\n Logger.getLogger(MP3Player.class.getName()).log(Level.SEVERE, null, ex);\n }\n Runtime.getRuntime().gc();\n }",
"public void stop() {}",
"public synchronized void stop()\n {\n if (open) {\n //stop = true;\n notifyAll();\n started = false;\n line.stop();\n timeTracker.pause();\n }\n }",
"protected void exit() throws IOException {\r\n\t\tstop();\r\n\t\tkeepRunning = false;\r\n\t}",
"public void terminate () {\n\t\t\t\n\t\t\tsynchronized (runningLock) {\n\t\t\t\tif (running == false)\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tinputStream.close ();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println (\"ModemWorker.teminate(): IOException on close().\");\n\t\t\t}\n\t\t}",
"public void stop(){\n return;\n }",
"public void stop() {\n setClosedLoopControl(false);\n }",
"private void stop(){\n\t\tisstop = true;\n\t\tif(ddaemon!=null){\n\t\t\tddaemon.setStop(true);\n\t\t\tddaemon = null;\n\t\t}\n\t\tif(ndaemon!=null){\n\t\t\tndaemon.setStop(true);\n\t\t\tndaemon = null;\n\t\t}\n\t\t// si on ne doit pas garder les dicoms on les supprime\n\t\tif(DicomWorkerClient.DICOMDIR!=null){\n\t\t\ttry {\n\t\t\t\tFileUtils.deleteDirectory(DicomWorkerClient.DICOMDIR.toFile());\n\t\t\t} catch (IOException e) {\n\t\t\t\tWindowManager.mwLogger.log(Level.SEVERE, \"Directory deletion exception\",e);\n\t\t\t}\n\t\t\tDicomWorkerClient.DICOMDIR=null;\n\t\t}\n\t\tif(statusThread!=null){\n\t\t\tsetLock(false);\n\t\t\tgetLblStatus().setText(\"\");\n\t\t\tprogressPanel.setVisible(false);\n\t\t\tstatusThread.stop();\n\t\t\tstatusThread = null;\n\t\t}\n\t}",
"public final void stopRunning() {\n\t\t_running = false;\n\t}",
"public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}",
"public void stop() {\n\t\tthis.stopper = true;\n\t}",
"public void stop() {\r\n _keepGoing = false;\r\n }",
"public void stopRun() {\n\t\temf.close();\n\t}",
"public void stop () {\n driveRaw (0);\n }",
"public void stop() {\n\t\texec.stop();\n\t}",
"public void stopReading() {\r\n rightShoe.getSerialReader().stopRead();\r\n leftShoe.getSerialReader().stopRead();\r\n rightShoe.getSerialReader().closePort();\r\n leftShoe.getSerialReader().closePort();\r\n timeController.stopReading();\r\n }",
"public void cancelDemo() {\r\n \t\t\r\n \t\tif (this.fos != null) {\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\tthis.fos.close();\r\n \t\t\t\tthis.fos = null;\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (this.fileName != null) {\r\n \t\t\t\r\n \t\t\ttry {\r\n \t\t\t\tthis.fileIO.deleteFile(this.fileName);\r\n \t\t\t} catch (IOException e) {\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"public void stop() {\n\t\t\n\t}",
"public void stop() {\n stop = true;\n }",
"public void terminate(){\n running = false;\n }",
"public void stop() throws IOException {\r\n\t_bRecording=false;\r\n recorder.stop();\r\n recorder.release();\r\n }",
"public void stop() {\n\t}",
"@Override\n public void stop() {}",
"void cancelEof() {\n\t\tthis.eofSeen = false;\n\t}",
"public void terminate() {\r\n running = false;\r\n }",
"public void stop(){\n\t\t\n\t}",
"public void stop() {\n\t\tthis.close(this.btcomm);\n\t}",
"public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void stop() {\n }",
"public void stopWork() {\n stopWork = true;\n }",
"public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"protected void stop() {\r\n\t\tif (active) {\r\n\t\t\tsource.stop();\r\n\t\t}\r\n\t}",
"public void stop() {\n }",
"public void stop() {\n }",
"@Override public void stop() {\n }",
"public void terminate() {\n\t\trunning = false;\n\t}",
"@Override\r\n public void stop() {\r\n }",
"@Override\r\n public void stop() {\r\n }",
"@Override\n public void run() {\n stop();\n }",
"public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"protected void close()\n {\n stopped = true;\n }",
"@Override\n\t\tpublic void stop() {\n\t\t\t// Nothing to do for now\n\t\t}",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"@Override\n public void stop() {\n }",
"public void stop() {\n\t\tSystem.out.println(\"Stopping application\");\n\t\trunning = false;\n\t}",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}",
"public void stop() {\r\n\t\tisRecording = false;\r\n\t}",
"public void stop() {\n System.setErr(saveErr);\n System.setOut(saveOut);\n running = false;\n try {\n flushThread.join();\n } catch (InterruptedException e) {\n }\n }",
"public void stop() {\n\t\trunflag.set(false);\n\n\t\twhile (worker.isAlive()) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(10); // Wait until it stops\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n public void stop() {\r\n\r\n }"
] |
[
"0.741246",
"0.71531916",
"0.70477587",
"0.68790495",
"0.68781614",
"0.68293047",
"0.6817838",
"0.6790053",
"0.6783971",
"0.6769636",
"0.6765034",
"0.67568254",
"0.67317027",
"0.66642046",
"0.6612632",
"0.6585553",
"0.65826863",
"0.65683794",
"0.65165514",
"0.65148973",
"0.6509499",
"0.6497603",
"0.64565617",
"0.64437896",
"0.6443247",
"0.64310646",
"0.64268607",
"0.64169407",
"0.64061666",
"0.64052063",
"0.6394859",
"0.63879603",
"0.63693285",
"0.63567644",
"0.6355844",
"0.6349737",
"0.63451207",
"0.63356143",
"0.6335523",
"0.6329736",
"0.6320545",
"0.6314923",
"0.6279243",
"0.62741417",
"0.6272564",
"0.62711656",
"0.6269411",
"0.6257854",
"0.6252906",
"0.62517995",
"0.62344694",
"0.6223184",
"0.62226",
"0.62105525",
"0.62036675",
"0.6202663",
"0.61921585",
"0.6188651",
"0.6188651",
"0.6184495",
"0.61809665",
"0.61592937",
"0.61592937",
"0.6153631",
"0.6151506",
"0.61287355",
"0.61263585",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.61189044",
"0.6114669",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6113143",
"0.6112274",
"0.6108074",
"0.6105157",
"0.61050653",
"0.6101083",
"0.6098591"
] |
0.78341365
|
0
|
to pause the running process of file reading.
|
public void pauseFile() {
// you may want to throw an IllegalStateException if !running
paused = true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void resumeFile() {\n try {\n synchronized (pauseLock) {\n paused = false;\n pauseLock.notifyAll(); // Unblocks thread\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void stopFile(){\n try {\n running = false;\n resumeFile();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void pauseFile() {\n Packet packet = new Packet(address, port);\n packet.setPauseFlag();\n \n Random random = new Random(); \n int sequenceNumber = random.nextInt();\n packet.setSeqNumber(sequenceNumber);\n \n sender = new ReliableSender(packet.makePacket(), sendQueue, sequenceNumber);\n sender.start();\n }",
"@Override\n\tpublic void resume() throws IOException {\n\n\t\ttry {\n\n\t\t\tstartInput(fileLocation);\n\n\t\t\t// gives us the current location\n\t\t\tint bytesToSkip = getSongTotalLenght() - pauseLocation;\n\t\t\tSystem.out.println(\"Resume button says: Num of Bytes to skip is \" + bytesToSkip);\n\t\t\tfis.skip(bytesToSkip);\n\n\t\t} catch (FileNotFoundException | JavaLayerException e) {\n\t\t}\n\n\t\t// Play every song on a new Thread\n\t\tnew Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t}.start();\n\n\t}",
"public void pause() {\n running = false;\n }",
"public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(true) {\n\t\t\t\t\tv.read(file);\n\t\t\t\t}\n\t\t\t}",
"public void run() {\n\t\t\t\twhile(keepGoing) {\n//\t\t\t\t\tif(pauseForCommand) {\n//\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\tThread.sleep(50);\t//Give a bit of time for something else...\n//\t\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.err.println(\"readLoop is paused\");\n//\t\t\t\t\t\tcontinue;\n//\t\t\t\t\t}\n\t\t\t\t\tDocument xmlDoc;\n\t\t\t\t\ttry {\n\t\t\t\t\t\txmlDoc = getNextBlock();\n\t\t\t\t\t\tif(xmlDoc.hasChildNodes()) {\n\t\t\t\t\t\t\tprocessChildren(xmlDoc);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (SAXException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlog.info(\"Read loop finishing as keepGoing now false\");\n\t\t\t}",
"public void continueRun() {\n pause = false;\n }",
"private void pause() {\n\t\t// TODO\n\t}",
"public void pause() {\n\t\tline.stop();\n\t\tplay = false;\n\t}",
"@Override\n\tpublic void run() {\n\t\twhile(run)\n\t\t{\n\t\t\tSystem.out.println(\"status : \" + this.filesize + \" Byte\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tThread.sleep(this.wait);\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void pause() {\n pause = true;\n }",
"void waitToRead();",
"public void play() {\n\t\tline.start();\n\t\tloop = false;\n\t\tnumLoops = 0;\n\t\tplay = true;\n\t\t// will wake up our data processing thread.\n\t\t// iothread.interrupt();\n\t}",
"protected void pause(){}",
"public void pause() {}",
"private void startRead() {\n ExecutorService service = Executors.newFixedThreadPool(this.countReadThreads);\n while (!this.files.isEmpty() || !this.isWorkSearch()) {\n service.submit(this.threads.getReadThread());\n }\n service.shutdown();\n }",
"public void Resume()\n\t{\n\t\twhile(this.state == WAITING)\t\n\t\t\tthis.proc.Resume();\n\t}",
"@Override\n\tpublic void run()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\tif (f.lastModified() > lastModified)\n\t\t\t{\n\t\t\t\tprocessFile(false);\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(60000);\n\t\t\t}\n\t\t\tcatch (InterruptedException ex)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t}",
"public void pause()\n {\n paused = true;\n }",
"public synchronized void pause() {\r\n\r\n\t\tpaused = true;\r\n\t}",
"public void pause() {\r\n\t}",
"public void pause() {\n\t\t// TODO Auto-generated method stub\n\t}",
"public void pause() {\n paused = true;\n }",
"public void pause() {\n paused = true;\n }",
"public ProgressMonitorInputDemo(String filename) {\n ProgressMonitorInputStream fileMonitor;\n \n try {\n fileMonitor = new ProgressMonitorInputStream(\n null, \"Loading \"+filename + \". Plese wait...\", new FileInputStream(filename));\n while (fileMonitor.available() > 0) {\n byte [] line = new byte[30];\n fileMonitor.read(line);\n System.out.write(line);\n }\n } catch (FileNotFoundException e) {\n JOptionPane.showMessageDialog(null, \"File not found: \"\n + filename, \"Error\", JOptionPane.ERROR_MESSAGE); \n } catch (IOException e) {;}\n }",
"public void resume() {}",
"public static void myWait()\n {\n try \n {\n System.in.read();\n \n System.in.read();\n //pause\n }\n catch(Exception e)\n {\n }\n }",
"public synchronized void resume() {\r\n\r\n\t\tpaused = false;\r\n\t\tnotifyAll();\r\n\t}",
"synchronized void pause() {\n\t\tpaused = true;\n\t}",
"public void loop() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer = new AdvancedPlayer(new BufferedInputStream(new FileInputStream(file)));\n\t\t\t\t\tplayer.setPlayBackListener(listener = new TanksPlaybackListener(true));\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t\t--currentlyPlaying;\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t--currentlyPlaying;\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}",
"protected void pauseProcess() {\n algorithm.pause();\n btnPause.setEnabled(false);\n btnResume.setEnabled(true);\n }",
"public void pause(){\r\n isRunning = false;\r\n while (true){\r\n try{\r\n ourThread.join();\r\n\r\n\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n break;\r\n }\r\n\r\n ourThread = null;\r\n\r\n }",
"public void pause() {\n\t\tsleep(2000);\n\t}",
"@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\tpublic void pause() {\n\t\t \n\t\t}",
"public void pauseMyTask() {\n pause = true;\n }",
"public void resume() {\n paused = false;\n }",
"public void resumeFile() {\n Packet packet = new Packet(address, port);\n packet.setResumeFlag();\n \n Random random = new Random(); \n int sequenceNumber = random.nextInt();\n packet.setSeqNumber(sequenceNumber);\n \n sender = new ReliableSender(packet.makePacket(), sendQueue, sequenceNumber);\n sender.start();\n }",
"@Override\n\tpublic void pause() {\n\t\tif (player != null) {\n\n\t\t\ttry {\n\t\t\t\t// Checks how much of the song is left available to play\n\t\t\t\tpauseLocation = fis.available();\n\t\t\t\tplayer.close();\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\n\t\t}\n\t}",
"public void pause() {\n executor.submit(new Runnable() {\n public void run() {\n resume = false;\n pauseNoWait();\n }\n });\n }",
"@Override\r\n public void pause() {}",
"public void resume()\n\t{\n\t\tisPaused = false;\n\t}",
"void resume();",
"void resume();",
"void resume();",
"protected void pause() {\n sleep(300);\n }",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\n public void run() {\n currentContent = FileAccessServiceLocator.getStockOrderFileAccess().read();\n while (true) {\n String newlyReadContent = FileAccessServiceLocator.getStockOrderFileAccess().read();\n if (!newlyReadContent.equals(currentContent) || !newlyReadContent.isEmpty()){\n notify(newlyReadContent);\n currentContent = newlyReadContent;\n }\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n//end of modifiable zone..................E/bfb5c4c0-88e6-44fa-9add-89d5b4394004\n }",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"@Override\n\tpublic void pause() {\n\t\t\n\t}",
"private static void pause() {\n System.out.println(\"Press Any Key To Continue...\");\n new java.util.Scanner(System.in).nextLine();\n }",
"public void pause() {\n\t\tif (playing)\n\t\t\tstopRequested = true;\n\t}",
"public void pause() {\n }",
"public void resume() {\n }",
"public void pause() {\r\n fPause = true;\r\n }",
"@Override\n \tpublic void pause() {\n \t}",
"public void pause() {\n\t\tsynchronized(this) {\n\t\t\tpaused = true;\n\t\t}\n\t}",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"@Override\r\n\tpublic void pause() {\n\t}",
"public void run() {\n\t\tint bytesRead, bytesWritten;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tif ((currentFile == null) || stopRequested || !playing) {\n\t\t\t\t\tsynchronized(this) {\n\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\twait();\n\t\t\t\t\t\tplaying = true;\n\t\t\t\t\t\tstopRequested = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (currentFile == null)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif (currentPosition == currentFile.length)\t// necessary???\n\t\t\t\t\t\tsetPosition(0);\n\t\t\t\t}\n\t\t\t\tif (audioOut != null) {\n\t\t\t\t\taudioOut.stop();\n\t\t\t\t\taudioOut.flush();\n\t\t\t\t}\n\t\t\t\tif ((audioOut == null) ||\n\t\t\t\t\t\t\t!currentFile.format.matches(audioOut.getFormat())) {\n\t\t\t\t\taudioOut= AudioSystem.getSourceDataLine(currentFile.format);\n\t\t\t\t\taudioOut.open(currentFile.format, defaultOutputBufferSize);\n\t\t\t\t\toutputBufferSize = audioOut.getBufferSize();\n\t\t\t\t}\n\t\t\t\tinitBeats();\n\t\t\t\tboolean doDrain = false;\n\t\t\t\tstartNanoTime = System.nanoTime();\n\t\t\t\tstartTime = currentPosition / currentFile.frameRate / currentFile.frameSize;\n\t\t\t\taudioOut.start();\n\t\t\t\tif (debug)\n\t\t\t\t\tSystem.err.println(\"Entering play() loop\");\n\t\t\t\twhile (true) {\t\t\t// PLAY loop\n\t\t\t\t\tsynchronized(this) {\n\t\t\t\t\t\tif ((requestedPosition < 0) && !stopRequested)\n\t\t\t\t\t\t\tbytesRead = currentFile.audioIn.read(readBuffer);\n\t\t\t\t\t\telse if (stopRequested ||\n\t\t\t\t\t\t\t\t\t((requestedPosition >= 0) &&\n\t\t\t\t\t\t\t\t\t\t(requestedFile != null) &&\n\t\t\t\t\t\t\t\t\t\t!currentFile.format.matches(\n\t\t\t\t\t\t\t\t\t\t\trequestedFile.format))) {\n\t\t\t\t\t\t\tif (doDrain)\n\t\t\t\t\t\t\t\taudioOut.drain();\n\t\t\t\t\t\t\taudioOut.stop();\n\t\t\t\t\t\t\tif (requestedPosition >= 0) {\n\t\t\t\t\t\t\t\tsetPosition(requestedPosition);\n\t\t\t\t\t\t\t\trequestedPosition = -1;\n\t\t\t\t\t\t\t} else if (!doDrain)\n\t\t\t\t\t\t\t\tsetPosition((int)(getCurrentTime() * currentFile.frameRate) *\n\t\t\t\t\t\t\t\t\t\t\tcurrentFile.frameSize);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tsetPosition(currentPosition);\t// for scrollTo()\n\t\t\t\t\t\t\taudioOut.flush();\n\t\t\t\t\t\t\tdoDrain = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\t// requestedPosition >= 0 && format matches\n\t\t\t\t\t\t\tbytesRead = currentFile.audioIn.read(readBuffer);\n\t\t\t\t\t\t\tsetPosition(requestedPosition);\n\t\t\t\t\t\t\trequestedPosition = -1;\n\t\t\t\t\t\t\tif (bytesRead == readBuffer.length) {\n\t\t\t\t\t\t\t\tint read = currentFile.audioIn.read(readBuffer2);\n\t\t\t\t\t\t\t\tif (read == bytesRead) {\t// linear crossfade\n\t\t\t\t\t\t\t\t\tint sample, sample2;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < read; i += 2) {\n\t\t\t\t\t\t\t\t\t\tif (currentFile.format.isBigEndian()) {\n\t\t\t\t\t\t\t\t\t\t\tsample = (readBuffer[i+1] & 0xff) |\n\t\t\t\t\t\t\t\t\t\t\t\t\t (readBuffer[i] << 8);\n\t\t\t\t\t\t\t\t\t\t\tsample2= (readBuffer2[i+1] & 0xff) |\n\t\t\t\t\t\t\t\t\t\t\t\t\t (readBuffer2[i] << 8);\n\t\t\t\t\t\t\t\t\t\t\tsample = ((read-i) * sample +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ti * sample2) / read;\n\t\t\t\t\t\t\t\t\t\t\treadBuffer[i] = (byte)(sample >> 8);\n\t\t\t\t\t\t\t\t\t\t\treadBuffer[i+1] = (byte)sample;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tsample = (readBuffer[i] & 0xff) |\n\t\t\t\t\t\t\t\t\t\t\t\t\t (readBuffer[i+1] << 8);\n\t\t\t\t\t\t\t\t\t\t\tsample2 = (readBuffer2[i] & 0xff) |\n\t\t\t\t\t\t\t\t\t\t\t\t\t (readBuffer2[i+1] << 8);\n\t\t\t\t\t\t\t\t\t\t\tsample = ((read-i) * sample +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ti * sample2) / read;\n\t\t\t\t\t\t\t\t\t\t\treadBuffer[i+1] = (byte)(sample>>8);\n\t\t\t\t\t\t\t\t\t\t\treadBuffer[i] = (byte)sample;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbytesRead = read;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < read; i++)\n\t\t\t\t\t\t\t\t\t\treadBuffer[i] = readBuffer2[i];\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\tbytesRead = currentFile.audioIn.read(readBuffer);\n\t\t\t\t\t\t}\n\t\t\t\t\t} // synchronized\n\t\t\t\t\tif ((endPosition >= 0) && (currentPosition + bytesRead > endPosition))\n\t\t\t\t\t\tbytesRead = (int) (endPosition - currentPosition);\n\t\t\t\t\tif (!playAudio)\n\t\t\t\t\t\tfor (int i = 0; i < bytesRead; i++)\n\t\t\t\t\t\t\treadBuffer[i] = 0;\n\t\t\t\t\tif (playBeats)\n\t\t\t\t\t\taddBeats(readBuffer, bytesRead);\n\t\t\t\t\tbytesWritten = 0;\n\t\t\t\t\tif (bytesRead > 0)\n\t\t\t\t\t\tbytesWritten = audioOut.write(readBuffer, 0,bytesRead);\n\t\t\t\t\tif (bytesWritten > 0) {\n\t\t\t\t\t\tcurrentPosition += bytesWritten;\n\t\t\t\t\t\tgui.displayPanel.scrollTo(getCurrentTime(), true);\n\t\t\t\t\t}\n\t\t\t\t\tif ((endPosition >= 0) && (currentPosition >= endPosition)) {\n\t\t\t\t\t\tstopRequested = true;\n\t\t\t\t\t\tdoDrain = true;\n\t\t\t\t\t} else if (bytesWritten < readBufferSize) {\n\t\t\t\t\t\tif (currentPosition != currentFile.length)\n\t\t\t\t\t\t\tSystem.err.println(\"read error: unexpected EOF\");\n\t\t\t\t\t\tstopRequested = true;\n\t\t\t\t\t\tdoDrain = true;\n\t\t\t\t\t}\n\t\t\t\t} // play loop\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tplaying = false;\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (LineUnavailableException e) {\n\t\t\t\tplaying = false;\n\t\t\t\taudioOut = null;\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tplaying = false;\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (Exception e) {\t\t// catchall e.g. for changing instr during playing etc.\n\t\t\t\tplaying = false;\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} // process request loop\n\t}",
"@Override\n public void pause() {\n }",
"@Override\n\tpublic void pause() {\n\t\tstopTask();\n\t}",
"public void run() {\r\n\r\n \t if(tHread.isAlive()){\r\n \t //do something - for example start and run progressbar\r\n \t }\r\n \t\telse{\r\n \t\t tImer.cancel();\r\n \t\t if(readFromDB)readFromDB = false;\r\n \t\t if(writeIntoDB)writeIntoDB = false;\r\n \t\t System.out.println();\r\n \t\t}\r\n \t}",
"@Override\r\n public void pause() {\n }",
"@Override\r\n public void pause() {\n }"
] |
[
"0.7277556",
"0.6685931",
"0.6602964",
"0.64386016",
"0.6223684",
"0.61768585",
"0.616934",
"0.60881406",
"0.6060945",
"0.6058151",
"0.59793264",
"0.59036046",
"0.5892641",
"0.5885721",
"0.58748984",
"0.5854251",
"0.58132553",
"0.5801511",
"0.5792126",
"0.5791755",
"0.57893527",
"0.5780768",
"0.5777441",
"0.57690775",
"0.5767769",
"0.5767769",
"0.57452434",
"0.57391113",
"0.5733765",
"0.5723705",
"0.56979346",
"0.5678897",
"0.5676375",
"0.5650741",
"0.5646136",
"0.56454796",
"0.5641737",
"0.5636627",
"0.563301",
"0.56291145",
"0.5624799",
"0.5618922",
"0.56123525",
"0.56104517",
"0.56023633",
"0.56023633",
"0.56023633",
"0.55653024",
"0.5556146",
"0.5556146",
"0.5556146",
"0.5556146",
"0.5556146",
"0.5556146",
"0.5556146",
"0.5556146",
"0.5556146",
"0.554928",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.55419654",
"0.5541915",
"0.5541428",
"0.55409586",
"0.5537646",
"0.5535867",
"0.5534066",
"0.55315495",
"0.552105",
"0.55104554",
"0.5498504",
"0.54962814",
"0.54941195",
"0.5490724",
"0.54819775",
"0.54819775"
] |
0.77270967
|
0
|
to resume the paused file process.
|
public void resumeFile() {
try {
synchronized (pauseLock) {
paused = false;
pauseLock.notifyAll(); // Unblocks thread
}
}
catch (Exception e) {
e.printStackTrace();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void resume()\n\t{\n\t\tisPaused = false;\n\t}",
"public void resume() {\n paused = false;\n }",
"public void resume() {}",
"public synchronized void resume() {\r\n\r\n\t\tpaused = false;\r\n\t\tnotifyAll();\r\n\t}",
"public void resume();",
"public void resume() {\n }",
"public void resume() throws NotYetPausedException;",
"public synchronized void resume() {\n paused = false;\n this.notify();\n }",
"void resume();",
"void resume();",
"void resume();",
"public void resume() {\n\t\t// TODO Auto-generated method stub\n\t}",
"public void resume() {\n this.suspended = false;\n }",
"public void resume() {\n m_suspended = false;\n }",
"public abstract void resume();",
"@Override\n public void resume() { }",
"@Override\n\t\tpublic void resume() {\n\t\t \n\t\t}",
"@Override\r\n\tpublic void resume() {\n\t\tthis.suspended = false;\r\n\t}",
"protected void resumeProcess() {\n algorithm.myresume();\n btnPause.setEnabled(true);\n btnResume.setEnabled(false);\n }",
"@Override\r\n public void resume() {\n }",
"@Override\r\n public void resume() {\n }",
"@Override\r\n public void resume() {\n }",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\t\t\r\n\t}",
"public void pauseFile() {\n // you may want to throw an IllegalStateException if !running\n paused = true;\n\n }",
"@Override\n public void resume() {\n }",
"@Override\n public void resume() {\n }",
"@Override\n public void resume() {\n }",
"@Override\r\n public void resume() {\r\n\r\n }",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() {\n\t\t\n\t}",
"@Override\n\tpublic void resume() \n\t{\n\n\t}",
"public void resume() {\n\t\t\n\t\tmusic.resume();\n\t\tsyncPosition();\n\t}",
"@Override\n\tpublic void resume()\n\t{\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\n\tpublic void resume() {\n\n\t}",
"@Override\r\n\tpublic void resume() {\n\t}",
"@Override\n public void resume() {\n\n }",
"@Override\n public void resume() {\n\n }",
"@Override\n public void resume() {\n\n }",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"@Override\n\tpublic void resume() {\n\t}",
"public void Resume()\n\t{\n\t\twhile(this.state == WAITING)\t\n\t\t\tthis.proc.Resume();\n\t}",
"@Override\n public void resume() {\n // Not used\n }",
"@Override\n public void resume() {\n \n }",
"@Override\n public void resume() {\n }",
"protected abstract boolean resume();",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}",
"@Override\r\n\tpublic void resume() {\n\r\n\t}"
] |
[
"0.82560724",
"0.8235633",
"0.8223781",
"0.81087416",
"0.81009865",
"0.8079745",
"0.80613375",
"0.8023396",
"0.79551417",
"0.79551417",
"0.79551417",
"0.7906254",
"0.7832145",
"0.7820089",
"0.776333",
"0.77385384",
"0.7736309",
"0.7736164",
"0.77244973",
"0.7709315",
"0.7709315",
"0.7709315",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.769078",
"0.768929",
"0.7688416",
"0.7688416",
"0.7688416",
"0.7686091",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.767535",
"0.76531214",
"0.7644836",
"0.76347935",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.763205",
"0.7624993",
"0.76134425",
"0.76134425",
"0.76134425",
"0.7611093",
"0.7611093",
"0.7611093",
"0.7611093",
"0.7611093",
"0.7594974",
"0.758356",
"0.7580988",
"0.75412583",
"0.7522831",
"0.74975413",
"0.74975413",
"0.74975413",
"0.74975413"
] |
0.90853864
|
0
|
Starts a given server
|
public void startServer() {
server.start();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }",
"void startServer(String name, Config.ServerConfig config);",
"private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}",
"public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }",
"void startServer(int port) throws Exception;",
"public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }",
"public static void startServer() {\n clientListener.startListener();\n }",
"private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}",
"public void start() {\n\t\tif (serverStarted.get()) {\n\t\t\tthrow new IllegalStateException(\"Server already started. \" + toString());\n\t\t}\n\t\tCallable<Boolean> task;\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t\tserverSocket.setSoTimeout(soTimeout);\n\t\t\tport = serverSocket.getLocalPort();\n\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\tserverStarted.set(true);\n\t\t\ttask = new Callable<Boolean>() {\n\t\n\t\t\t\tpublic Boolean call() {\n\t\t\t\t\tnotifyListener(\"Starting server thread. \" + toString());\n\t\t\t\t\tstopFlag.set(false);\n\t\t\t\t\twhile (!stopFlag.get()) {\n\t\t\t\t\t\tSocket connection = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnection = serverSocket.accept();\n\t\t\t\t\t\t\tnotifyListener(\"Connection accepted on port. \" + toString());\n\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\tnotifyListener(\"Connection closed on port. \" + toString());\n\t\t\t\t\t\t\tpingCounter.incrementAndGet();\n\t\t\t\t\t\t} catch (SocketTimeoutException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept timed out. Retrying. \" + toString());\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept caused exception [message=\" + e.getMessage() + \"]. Retrying. \" + toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnotifyListener(\"Server socket closed. \" + toString());\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t} catch (IOException e) {\n\t\t\tstopFlag.set(true);\n\t\t\tthrow new IllegalStateException(\"Unable to open socket on port. \" + toString(), e);\n\t\t}\n\t\tserverActivity = scheduler.submit(task);\n\t\tnotifyListener(\"Waiting for server to fully complete start. \" + toString());\n\t\tfor (;;) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t\tif (isStarted()) {\n\t\t\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\n\t\t\t}\n\t\t}\n\t}",
"public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }",
"private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }",
"public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }",
"public void startServers()\n {\n ExecutorService threads = Executors.newCachedThreadPool();\n threads.submit(new StartServer(host, port));\n threads.submit(new StartServer(host, port + 1));\n threads.shutdown();\n }",
"public void startLocalServer() {\n \t boolean exists = (new File(addeMcservl)).exists();\n \t if (exists) {\n \t // Create and start the thread if there isn't already one running\n\t \tif (thread != null) {\n \t \t\tthread = new AddeThread();\n \t \t\tthread.start();\n \t\t System.out.println(addeMcservl + \" was started\");\n \t \t} else {\n \t \t\tSystem.out.println(addeMcservl + \" is already running\");\n \t \t}\n \t } else {\n \t \tSystem.out.println(addeMcservl + \" does not exist\");\n \t }\n \t}",
"public void run(){\n\t\tstartServer();\n\t}",
"public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }",
"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 void startServer(){\r\n try {\r\n\r\n while(true){\r\n\r\n s = sc.accept();\r\n new ServerThread(s).start();\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n try {\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }",
"public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}",
"private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }",
"@Test\n public void startServer() throws InterruptedException {\n UicdInstrumentation uicdInstrumentation =\n UicdInstrumentation.getInstance(\n getInstrumentation().getContext(), DEFAULT_PORT);\n uicdInstrumentation.startServer();\n\n while (!uicdInstrumentation.isStopServer()) {\n SystemClock.sleep(PING_SERVER_MS);\n }\n }",
"public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }",
"public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }",
"@Test\r\n public void startServerAndThreads() throws IOException {\r\n //init\r\n InetAddress iPAddress = InetAddress.getByName(\"localhost\");\r\n int port = 99;\r\n\r\n Server server = new Server(port, iPAddress);\r\n server.start();\r\n }",
"public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}",
"public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }",
"public void startServer() throws IOException {\n log.info(\"Starting server in port {}\", port);\n try {\n serverSocket = new ServerSocket(port);\n this.start();\n log.info(\"Started server. Server listening in port {}\", port);\n } catch (IOException e) {\n log.error(\"Error starting the server socket\", e);\n throw e;\n }\n }",
"public static EmbeddedTestServer createAndStartServer(Context context) {\n return createAndStartServerWithPort(context, 0);\n }",
"public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}",
"@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }",
"public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}",
"public void start() throws Exception {\n ServerSocket socket = new ServerSocket(0);\n port = socket.getLocalPort();\n socket.close();\n\n final String[] localArgs = {\"-inMemory\", \"-port\", String.valueOf(port)};\n server = ServerRunner.createServerFromCommandLineArgs(localArgs);\n server.start();\n url = \"http://localhost:\" + port;\n\n // internal client connection so we can easily stop, cleanup, etc. later\n this.dynamodb = getClient();\n }",
"private void startServer(){\n clients = new ArrayList<ClientThread>();\n ServerSocket ClientSocket = null;\n try {\n ClientSocket = new ServerSocket(ClientPort);\n ClientSocketConnection(ClientSocket);\n } catch (IOException e){\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}",
"public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }",
"public static HttpServer startServer() {\n // create a resource config that scans for JAX-RS resources and providers\n // in com.example.rest package\n final ResourceConfig rc = new ResourceConfig().packages(\"com.assignment.backend\");\n rc.register(org.glassfish.jersey.moxy.json.MoxyJsonFeature.class);\n rc.register(getAbstractBinder());\n rc.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);\n rc.property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n }",
"private void runServer()\n\t{\n\t\tif(sm == null)\n\t\t{\n\t\t\tsm = new ServerManager();\n\t\t}\n\t\t\n\t\tint port = 1209;\n\t\ttry \n\t\t{\n\t\t\twaitUser(sm, port);\n\t\t\t//이 아래 로직이 실행된다는건 유저가 다 들어왔다는 뜻임. 즉 게임 시작할 준비 되었음을 의미함\t\t\t\n\t\t\tGame.getInstance().runGame();\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[Server.runServer()] error >>> : \" + e.getMessage());\n\t\t}\n\t}",
"public void start(int port)\n\t{\n\t\t// Initialize and start the server sockets. 08/10/2014, Bing Li\n\t\tthis.port = port;\n\t\ttry\n\t\t{\n\t\t\tthis.socket = new ServerSocket(this.port);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Initialize a disposer which collects the server listener. 08/10/2014, Bing Li\n\t\tMyServerListenerDisposer disposer = new MyServerListenerDisposer();\n\t\t// Initialize the runner list. 11/25/2014, Bing Li\n\t\tthis.listenerRunnerList = new ArrayList<Runner<MyServerListener, MyServerListenerDisposer>>();\n\t\t\n\t\t// Start up the threads to listen to connecting from clients which send requests as well as receive notifications. 08/10/2014, Bing Li\n\t\tRunner<MyServerListener, MyServerListenerDisposer> runner;\n\t\tfor (int i = 0; i < ServerConfig.LISTENING_THREAD_COUNT; i++)\n\t\t{\n\t\t\trunner = new Runner<MyServerListener, MyServerListenerDisposer>(new MyServerListener(this.socket, ServerConfig.LISTENER_THREAD_POOL_SIZE, ServerConfig.LISTENER_THREAD_ALIVE_TIME), disposer, true);\n\t\t\tthis.listenerRunnerList.add(runner);\n\t\t\trunner.start();\n\t\t}\n\n\t\t// Initialize the server IO registry. 11/07/2014, Bing Li\n\t\tMyServerIORegistry.REGISTRY().init();\n\t\t// Initialize a client pool, which is used by the server to connect to the remote end. 09/17/2014, Bing Li\n\t\tClientPool.SERVER().init();\n\t}",
"private void startServer(String ip, int port, String contentFolder) throws IOException{\n HttpServer server = HttpServer.create(new InetSocketAddress(ip, port), 0);\n \n //Making / the root directory of the webserver\n server.createContext(\"/\", new Handler(contentFolder));\n //Making /log a dynamic page that uses LogHandler\n server.createContext(\"/log\", new LogHandler());\n //Making /online a dynamic page that uses OnlineUsersHandler\n server.createContext(\"/online\", new OnlineUsersHandler());\n server.setExecutor(null);\n server.start();\n \n //Needing loggin info here!\n }",
"private void startServer(int port) throws IOException {\n System.out.println(\"Booting the server!\");\n\n // Open the server channel.\n serverSocketChannel = ServerSocketChannel.open();\n serverSocketChannel.bind(new InetSocketAddress(port));\n serverSocketChannel.configureBlocking(false);\n\n // Register the channel into the selector.\n selector = Selector.open();\n serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);\n }",
"public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public AppiumDriverLocalService StartServer()\n\t{\n\t\tservice = AppiumDriverLocalService.buildDefaultService();\n\t\tservice.start();\n\t\treturn service;\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tinitialiseServer(args[0]);\n\t\t\twhile (running == true) {\n\t\t\t\tif (((numLiveThreads.get()) == 0) && (running == false)) {\n\t\t\t\t\tshutdown();\n\t\t\t\t}\n\t\t\t\thandleIncomingConnection();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\toutputServiceErrorMessageToConsole(e.getMessage());\n\t\t} finally {\n\t\t\tshutdown();\n\t\t}\n\t}",
"public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }",
"public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }",
"public void runServer(){\n try {\n serverSocket = new ServerSocket(portNumber);\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n \n while (true) { \n try {\n Socket clientSocket = serverSocket.accept();\n InetAddress inetAddress = clientSocket.getInetAddress();\n System.out.println(\"Connected with \" + inetAddress.getHostName()+ \".\\n IP address: \" + inetAddress.getHostAddress() + \"\\n\");\n new Thread(new RequestHandlerRunnable(clientSocket, database)).start();\n } catch (IOException ioe){\n System.out.println(ioe.getMessage());\n }\n }\n \n }",
"boolean runsServer();",
"public static void startServer() throws IOException {\n ServerSocket serverSocket = new ServerSocket(port_number);\n\n System.out.println(\"Server Up\");\n System.out.println(\"Port number: \" + port_number);\n\n Thread loop = loopClients(serverSocket);\n loop.start();\n\n while (running) {\n try {\n Thread.sleep(1000l);\n\n } catch (Exception e) {\n\n }\n }\n\n loop.stop();\n removeAllClients();\n }",
"public void start()\n {\n isRunning = true;\n try\n {\n //metoden opretter en ny socket for serveren på den valgte port\n ServerSocket serverSocket = new ServerSocket(port);\n //mens serveren kører venter den på en client\n while (isRunning)\n {\n serverDisplay(\"Serveren venter på clienter på port: \" + port);\n //accepterer clienten på socketen\n Socket socket = serverSocket.accept();\n\n if (!isRunning)\n {\n break;\n }\n // laver en ny thread til clienten med socketen der er blevet accepteret\n HandleClientThread handleClientThread = new HandleClientThread(socket);\n\n // her blever tråden tilføjet til arryet af clienter\n clientThreadArrayList.add(handleClientThread);\n // Starer handleclient tråden som håndtere clienter\n handleClientThread.start();\n }\n try\n {\n //Her lukker serveren socketen\n serverSocket.close();\n for (int i = 0; i < clientThreadArrayList.size() ; i++)\n {\n HandleClientThread hct = clientThreadArrayList.get(i);\n try\n {\n hct.inputStream.close();\n hct.outputStream.close();\n hct.socket.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Uknowen command \" + e);\n }\n }\n }\n catch (Exception e)\n {\n serverDisplay(\"Kunne ikke lukke serveren og clienterne pga. \" + e);\n }\n }\n catch (IOException e)\n {\n String message = dateFormat.format(new Date()) + \"Fejl på ny server socket\" + e + \"\\n\";\n serverDisplay(message);\n }\n }",
"private static ServerSocket startServer(int port) {\n if (port != 0) {\n ServerSocket serverSocket;\n try {\n serverSocket = new ServerSocket(port);\n System.out.println(\"Server listening, port: \" + port + \".\");\n System.out.println(\"Waiting for connection... \");\n return serverSocket;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }",
"private void runServer()\n {\n int port = Integer.parseInt(properties.getProperty(\"port\"));\n String ip = properties.getProperty(\"serverIp\");\n \n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Server started. Listening on: {0}, bound to: {1}\", new Object[]{port, ip});\n try\n {\n serverSocket = new ServerSocket();\n serverSocket.bind(new InetSocketAddress(ip, port));\n do\n {\n Socket socket = serverSocket.accept(); //Important Blocking call\n Logger.getLogger(ChatServer.class.getName()).log(Level.INFO, \"Connected to a client. Waiting for username...\");\n ClientHandler ch = new ClientHandler(socket, this);\n clientList.add(ch);\n ch.start();\n } while (keepRunning);\n } catch (IOException ex)\n {\n Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private Main startJndiServer() throws Exception {\n\t\tNamingServer namingServer = new NamingServer();\n\t\tNamingContext.setLocal(namingServer);\n\t\tMain namingMain = new Main();\n\t\tnamingMain.setInstallGlobalService(true);\n\t\tnamingMain.setPort( -1 );\n\t\tnamingMain.start();\n\t\treturn namingMain;\n\t}",
"public void start(int port);",
"public static String startServer() throws QVCSException, IOException {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.startServer\");\n String serverStartSyncString = null;\n if (serverProxyObject == null) {\n // So the server starts fresh.\n initDirectories();\n\n // So the server uses a project property file useful for the machine the tests are running on.\n initProjectProperties();\n\n // For unit testing, listen on the 2xxxx ports.\n serverStartSyncString = \"Sync server start\";\n String userDir = System.getProperty(USER_DIR);\n File userDirFile = new File(userDir);\n String canonicalUserDir = userDirFile.getCanonicalPath();\n final String args[] = {canonicalUserDir, \"29889\", \"29890\", \"29080\", serverStartSyncString};\n serverProxyObject = new Object();\n ServerResponseFactory.setShutdownInProgress(false);\n Runnable worker = new Runnable() {\n\n @Override\n public void run() {\n try {\n QVCSEnterpriseServer.main(args);\n } catch (Exception e) {\n LOGGER.log(Level.SEVERE, Utility.expandStackTraceToString(e));\n }\n }\n };\n synchronized (serverStartSyncString) {\n try {\n // Put all this on a separate worker thread.\n new Thread(worker).start();\n serverStartSyncString.wait();\n }\n catch (InterruptedException e) {\n LOGGER.log(Level.SEVERE, Utility.expandStackTraceToString(e));\n }\n }\n } else {\n if (QVCSEnterpriseServer.getServerIsRunningFlag()) {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.startServer -- server already running.\");\n serverProxyObject = null;\n throw new QVCSRuntimeException(\"Starting server when server already running!\");\n }\n }\n LOGGER.log(Level.INFO, \"********************************************************* TestHelper returning from startServer\");\n return (serverStartSyncString);\n }",
"public void runServer() throws IOException {\n runServer(0);\n }",
"public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}",
"private void startServerService() {\n Intent intent = new Intent(this, MainServiceForServer.class);\n // Call bindService(..) method to bind service with UI.\n this.bindService(intent, serverServiceConnection, Context.BIND_AUTO_CREATE);\n Utils.log(\"Server Service Starting...\");\n\n //Disable Start Server Button And Enable Stop and Message Button\n messageButton.setEnabled(true);\n stopServerButton.setEnabled(true);\n startServerButton.setEnabled(false);\n\n\n }",
"public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }",
"public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}",
"public void start() throws IOException {\n ThreadExecutor.registerClient(this.getClass().getName());\n tcpServer.startServer();\n }",
"public void start(){\r\n\t\tLog.out(\"Start Service...listening on \" + port, 5);\r\n\t\ttry{\r\n\t\t\t//set up\r\n\t\t\tssocket = new ServerSocket(port);\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.out(\"Can't open the port\", 5);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry{\r\n\t\t\twhile(isRun){\r\n\t\t\t\t//accept socket request,but only one.\r\n\t\t\t\tSocket socket = ssocket.accept();\r\n\t\t\t\tLog.out(\"Got a socket from \"+socket.getLocalAddress(), 5);\r\n\t\t\t\t//if no client now\r\n\t\t\t\tif(clientSocket == null){\r\n\t\t\t\t\tLog.out(\"Handle as client.\", 4);\r\n\t\t\t\t\tclientSocket = socket;\r\n\t\t\t\t\tnew Thread(new ServiceReciever(this, socket)).start();\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tLog.out(\"The server is already in use,refuse the request.\",2);\r\n\t\t\t\t\tnew DataOutputStream(socket.getOutputStream()).writeInt(SOCKET_REFUSE);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.out(\"There are something wrong when get the socket.\", 5);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n boolean cmdStart = false;\n if (args.length != 0) {\n GuiUtils guiUtils = new GuiUtils();\n String errorResponse = guiUtils.verifyPort(args[0]);\n if (errorResponse != null) {\n System.err.println(\"Could not start the Server: \" + errorResponse);\n System.exit(-1);\n } else {\n int port = Integer.parseInt(args[0]);\n HangmanServer hangmanServer = new HangmanServer();\n hangmanServer.config = new ServerConfiguration(port);\n hangmanServer.run();\n cmdStart = true;\n }\n }\n \n if (!cmdStart) {\n launch(args);\n }\n }",
"public static ResultProcess startServer(GlassFishServer server,\n StartupArgs args) throws GlassFishIdeException {\n return startServer(server, args, StartMode.START);\n }",
"public static void main(String[] args) {\r\n int port = 5000;\r\n Server server = new Server(port);\r\n\r\n //Start the server thread:\r\n server.start();\r\n }",
"public static void main(String[] args) {\n loadServer();\n\n }",
"public static void main(final String[] args) throws IOException {\n startServer();\n }",
"public static void main(String[] args) {\n\n Server server = new Server();\n \n\n }",
"public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}",
"public void startServer() throws IOException{\n\t\t\n\t\tlistenThread = Thread.currentThread();\n\t\twhile(!listenThread.isInterrupted())\n\t\t{\n\t\t\tSocket clientSocket = null;\n\t\t\ttry {\n\t\t\t\tclientSocket = listenSocket.accept();\n\t\t\t\tConnectionHandler connectionHandler = new ConnectionHandler(clientSocket);\n\t\t\t\tTestInstance testInstance = new TestInstance(connectionHandler, dataHandler, outputServer);\n\t\t\t\ttestInstances.add(testInstance);\n\t\t\t\tnew Thread(testInstance).start();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public Map startServerProcess(String id) throws IOException\n\t{\n\t\treturn request(POST, address(id, \"start\"));\n\t}",
"public static void main (String[] args) {\n\t\tAbstractServer as = new FirstServer();\n\t\tString ip = \"localhost\";\n\t\tas.connect(ip);\n\t\t\n\t}",
"public void startServer()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t}\r\n\t\tcatch (IOException e1)\r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Waiting for client connection.\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSocket socket = serverSocket.accept();\r\n\t\t\tSystem.out.println(\"Client connects.\");\r\n\r\n\t\t\tObjectInputStream ois = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\tObject o = ois.readObject();\r\n\t\t\t\tif (!(o instanceof Message))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Received information is not message. Skip.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmessage = (Message) o;\r\n\t\t\t\tSystem.out.println(\"Message received: \" + message);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (ClassNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tCloseUtil.closeAll(ois, socket, serverSocket);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }",
"private void startListen() {\n try {\n listeningSocket = new ServerSocket(listeningPort);\n } catch (IOException e) {\n throw new RuntimeException(\"Cannot open listeningPort \" + listeningPort, e);\n }\n }",
"public static void main(String[] arg) {\n // start server on port 1500\n new SnesNETsrv(13375);\n }",
"private void start() throws IOException {\n\n\n int port = 9090;\n server = ServerBuilder.forPort(port)\n .addService(new CounterServiceImpl())\n .build()\n .start();\n // logger.info(\"Server started, listening on \" + port);\n\n /* Add hook when stop application*/\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n // Use stderr here since the logger may have been reset by its JVM shutdown hook.\n // IRedis.USER_SYNC_COMMAND.\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n Count.this.stop();\n System.err.println(\"*** server shut down\");\n\n }\n });\n }",
"public static void main(String[] args) {\r\n new Server();\r\n }",
"public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(8080);\n try\n {\n while (true)\n {\n Socket clientSocket = listener.accept();\n new Thread(new JavaServer(clientSocket)).start();\n }\n }\n finally\n {\n listener.close();\n }\n }",
"@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}",
"public void run(){\r\n\t\tSystem.out.println(\"Launching Server\");\r\n\t\tServer srv = new Server(log);\r\n\t\tnew CollectorServer(srv).start();\r\n\t\ttry {\r\n\t\t\tnew ServerUDPThread(srv).start();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Error in ServerUDP Broadcast\");\r\n\t\t}\r\n\t}",
"public void start(){\n log.debug(\"Starting Host Router\");\n lobbyThread = pool.submit(new Runnable() {\n public void run() {\n waitForClients();\n }\n });\n }",
"public static void main(String[] args) {\n\t\tnew Server();\n\t}",
"public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }",
"private void startServer() {\n\t\tlogger.trace(\"startServer() is called\");\n\n\t\tKKModellable model = new KKModel(jokeFile);\n\t\tList<KKJoke> kkJokeList = model.getListOfKKJokes();\n\t\tint numOfJokes = kkJokeList.size();\n\t\ttotalJokesLabel.setText(\"Total jokes: \" + String.valueOf(numOfJokes));\n\t\t\n\t\tif (numOfJokes > 0){\n\t\t\tif (socketListeningTask == null){\n\t\t\t\tsocketListeningTask = new BackgroundSocketListener(kkServerPort, serverStatusLabel);\n\t\t\t\tsocketListeningTask.execute();\n\t\t\t\tConnectionCounter.resetConnectionCounter();\n\t\t\t\tserverStatusLabel.setText(serverStarted);\n\t\t\t\ttotalClientConectionLabel.setText(\"Client connections: 0\");\n\n\t\t\t\tstartServerToolBarButton.setEnabled(false);\n\t\t\t\tstopServerToolBarButton.setEnabled(true);\n\t\t\t\t\n\t\t\t\tconnectionCheckingTask = new BackgroundConnectionCheck(totalClientConectionLabel);\n\t\t\t\tconnectionCheckingTask.execute();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//Do not start server because joke list is empty\n\t\t\tserverStatusLabel.setText(jokesNotFound);\n\t\t\tSystem.err.println(\"Empty joke source\");\n\t\t\tlogger.info(\"Empty joke source\");\n\t\t\tUtility.displayErrorMessage(\"Jokes not found or missing the \\\" kk-jokes.txt \\\" file which must be stored in the same path as this server app. \"\n\t\t\t+ \"Each line or joke in the \\\" kk-jokes.txt \\\" file must also be formatted as \\\" clue ### answer \\\" without the quotes.\");\n\t\t}\n\t}",
"public void start() throws RemoteException, AlreadyBoundException\n {\n start(DEFAULT_PORT);\n }",
"public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }",
"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\n try (ServerSocket ss = new ServerSocket(PORT)) {\n System.out.println(\"chat.Server is started...\");\n System.out.println(\"Server address: \" + getCurrentIP() + \":\" + PORT);\n\n while (true) {\n Socket socket = ss.accept();\n new Handler(socket).start();\n }\n\n } catch (IOException e) {\n System.out.println(\"chat.Server error.\");\n }\n }",
"@Test\n public void testSuccessfulServerStart() throws Exception {\n var channel = new EmbeddedServerChannel();\n\n server = getServer(channel.newSucceededFuture(), true);\n\n assertTrue(server.isRunning());\n }",
"public static void main(String[] args) {\n\t\tServer.Serv();\n\t}",
"public Server() {\n\t\t\n\t\ttry {\n\t\t\tss= new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(); // Default\n\t\t}\n\t}",
"public boolean start(int port) {\n try {\n synchronized (mImplMonitor) {\n checkServiceLocked();\n return mImpl.start(port);\n }\n } catch (RemoteException e) {\n throw new EmbeddedTestServerFailure(\"Failed to start server.\", e);\n }\n }",
"public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) throws Exception {\n\n List<RequestHandle> requestHandleList = new ArrayList<RequestHandle>();\n requestHandleList.add(new LsfRequestServerHandle());\n\n final Server server = new Server(new DefaultServerRoute(),new ServerHandler(requestHandleList), GlobalManager.serverPort);\n Thread t= new Thread(new Runnable() {\n public void run() {\n //start server\n try {\n server.run();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n ServerConfig serverBean = new ServerConfig();\n serverBean.setAlias(\"test\");\n serverBean.setInterfaceId(IService.class.getCanonicalName());\n serverBean.setImpl(new IServerImpl());\n server.registerServer(serverBean);\n\n\n }",
"public static void main(String[] args) throws IOException {\n log.info(\"The ticket to ride server is running.\");\n\n try (ServerSocket listener = new ServerSocket(9001)) {\n while (true) {\n Socket socket = listener.accept();\n\n MiniServer h = new MiniServer(socket);\n\n new Thread(h::go).start();\n }\n } catch (BindException be) {\n log.error(\"Cannot start server\", be);\n JOptionPane.showMessageDialog(null, \"Cannot start server\",\n be.getMessage(), JOptionPane.ERROR_MESSAGE);\n System.exit(1);\n }\n }",
"public static void runServer(int port) throws IOException {\n\t\tserver = new CEMSServer(port);\n\t\tuiController.setServer(server);\n\t\tserver.listen(); // Start listening for connections\n\t}",
"public static void main(String[] args) throws IOException {\n int port = 7788;\n Server server = new Server(port);\n server.listen();\n }",
"public static void main(String[] args) throws IOException {\n int port = 8080;\n\n try {\n if (args.length == 1) {\n port = Integer.parseInt(args[0]);\n }\n ServerSocket serverSocket = new ServerSocket(port);\n ChatServer server = new ChatServer(serverSocket);\n server.startServer();\n } catch (NumberFormatException ne) {\n System.out.println(\"Illegal inputs provided when starting the server!\");\n return;\n }\n }"
] |
[
"0.796015",
"0.78485185",
"0.7609814",
"0.75080127",
"0.7464886",
"0.73687226",
"0.7295995",
"0.7191055",
"0.71605",
"0.71387225",
"0.71254677",
"0.70904404",
"0.7020692",
"0.70107645",
"0.70039314",
"0.6996053",
"0.69921374",
"0.6960187",
"0.69578314",
"0.6955397",
"0.6929649",
"0.6907095",
"0.68966186",
"0.68371093",
"0.6818505",
"0.6805552",
"0.6797002",
"0.6785585",
"0.6783591",
"0.6776618",
"0.67664754",
"0.67504126",
"0.67255765",
"0.66844416",
"0.66692567",
"0.66496074",
"0.6603355",
"0.6570686",
"0.6568166",
"0.6558953",
"0.6558935",
"0.6549824",
"0.6537643",
"0.651803",
"0.65167195",
"0.651421",
"0.6510264",
"0.6503206",
"0.6499124",
"0.64959127",
"0.64952666",
"0.64941156",
"0.6487761",
"0.64783555",
"0.64465",
"0.6440135",
"0.642303",
"0.6417982",
"0.6416177",
"0.6413113",
"0.64120096",
"0.6408169",
"0.6396673",
"0.63921165",
"0.63788617",
"0.6374374",
"0.6373231",
"0.63517624",
"0.6341522",
"0.6341192",
"0.6335461",
"0.6333902",
"0.63188547",
"0.6306434",
"0.6306362",
"0.62950206",
"0.6290346",
"0.62850684",
"0.6279151",
"0.62764287",
"0.62748843",
"0.62668556",
"0.62660336",
"0.6251832",
"0.6249043",
"0.62404335",
"0.6225326",
"0.62249875",
"0.6218829",
"0.6211567",
"0.6206193",
"0.61937255",
"0.6192377",
"0.61889356",
"0.61846924",
"0.6170768",
"0.6166936",
"0.61559683",
"0.61547184",
"0.6148844"
] |
0.8089063
|
0
|
Gets the port of this server instance
|
public int getPort() {
return this.port;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static int getServerPort(){\n return thisServer.getPort();\n }",
"public int getPort() {\n return serverSocket.getLocalPort();\n }",
"public int getServerPort() {\n return Integer.parseInt(this.serverProperties.getProperty(PORT));\n }",
"default Object port() {\n return metadata().get(\"server-port\");\n }",
"public int getServerPort() {\n return serverPort;\n }",
"public static int getServerPort() {\n return serverPort;\n }",
"public String getServerPort() {\r\n\t\treturn this.serverPort;\r\n\t}",
"public int getServerPort() {\n\t\treturn serverPort;\n\t}",
"public int getServerPort(){\n\t\treturn serverPort; \n\t}",
"public static int getServerPort() {\n return _serverPort;\n }",
"public String getServerPort() {\n\t\treturn mServerPort;\n\t}",
"public Integer getServerport() {\n return serverport;\n }",
"default int getPort() {\n return getServer().getPort();\n }",
"public int getPort() {\n return this.config.getPort();\n }",
"public int getPort() {\n return instance.getPort();\n }",
"public int getPort() {\n return instance.getPort();\n }",
"public static int getPort() {\n return port;\n }",
"protected final int getServerPort() {\n return this.serverPort;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public UnsignedShort getServerPort() {\n return this.serverPort;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getPort() {\n return port_;\n }",
"public int getServerPortNumber(){\n return this.serverPortNumber;\n }",
"public static String getPort() {\n\t\treturn port;\r\n\t}",
"public int getPort()\n {\n\t\treturn url.getPort();\n }",
"public Integer port() {\n return this.port;\n }",
"public Integer port() {\n return this.port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\r\n return port;\r\n }",
"public int getPort() {\r\n return port;\r\n }",
"public int getPort() {\r\n return port;\r\n }",
"public Integer getPort() {\n return port;\n }",
"public Integer getPort() {\n return port;\n }",
"@Override\n\tpublic int getPort() {\n\t\treturn socket.getPort();\n\t}",
"public int getPort()\n\t{\n\t\treturn port;\n\t}",
"public int getPort()\n\t{\n\t\treturn port;\n\t}",
"public int getPort() {\n\t\treturn port;\n\t}",
"public int getPort() {\n\t\treturn port;\n\t}",
"public int getPort() {\n\t\treturn port;\n\t}",
"public int getPort() {\n\t\treturn port;\n\t}",
"public int getPort() {\n\t\treturn port;\n\t}",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\n return port;\n }",
"public int getPort() {\r\n\t\treturn port;\r\n\t}",
"public int getPort() {\r\n\t\treturn port;\r\n\t}",
"@java.lang.Override\n public int getPort() {\n return port_;\n }",
"@java.lang.Override\n public int getPort() {\n return port_;\n }",
"public int getPort( ) {\n\t\treturn port;\n\t}",
"public int getPort()\n {\n return port;\n }",
"public Integer getPort() {\n return port;\n }",
"public int getPort() {\n return this.port;\n }",
"public int getPort () {\n return port;\n }",
"@java.lang.Override\n public int getPort() {\n return port_;\n }",
"@java.lang.Override\n public int getPort() {\n return port_;\n }",
"public int getPort() {\n \t\treturn port;\n \t}",
"public int getPort() {\n \t\treturn port;\n \t}",
"public int getPort() {\n if (state >= CONNECTED)\n return remotePort;\n else\n return 0;\n }",
"public Integer getPort() {\n return this.port;\n }",
"@Override\n\tpublic Integer getPort() {\n\t\treturn port;\n\t}",
"public int getTcpServerPort()\n \t{\n \t\treturn tcpServerPort;\n \t}",
"public int getClientPort() {\n int clientPort = CLIENTSOCKET.getPort();\n return clientPort;\n }",
"public int getPort() {\n\t\treturn Integer.parseInt(String.valueOf(port.getValue()));\n\t}",
"public int getPortNumber() {\n return portNumber;\n }",
"public int getPortNumber() {\n return portNumber;\n }",
"public int getPort(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getInt(WorkerController.PORT);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"public int getPort() { return port; }",
"public Integer getServerPortValue() {\n\t\treturn Integer.decode(this.properties.getProperty(PARAM_NAME_SERVER_PORT, DEFAULT_SERVER_PORT));\n\t}",
"public int getPort();",
"public int getPort();",
"public int getPort();",
"public String getPort() throws Exception \n\t{\n\t\tServerSocket socket = new ServerSocket(0);\n\t\tsocket.setReuseAddress(true);\n\t\tString port = Integer.toString(socket.getLocalPort());\n\t\tsocket.close();\n\t\treturn port;\n\t}",
"public int getHttpPort() {\n return httpServer.getPort();\n }",
"public int getLocalPort() {\n return _listenSocket.getLocalPort();\n }",
"public static int getPort(){\n return catalogue.port;\n }",
"public int getPort(){\n\t\treturn this.port;\n\t}",
"public int actualPort() {\n return this.port;\n }",
"public long getPortNumber() {\n return portNumber;\n }",
"public static String getBasePort() {\r\n if (basePort == null) {\r\n basePort = PropertiesProvider.getInstance().getProperty(\"server.port\", \"8080\");\r\n }\r\n return basePort;\r\n }",
"public int port() {\n return alert.getPort();\n }",
"int getPort() {\n return port;\n }",
"public int getPort() {\n\t\treturn messageProcessor.getPort();\n\t}"
] |
[
"0.8667316",
"0.8590406",
"0.85592145",
"0.85109204",
"0.84849256",
"0.84843963",
"0.84621197",
"0.8459367",
"0.8429814",
"0.84251547",
"0.8399838",
"0.83423895",
"0.8338022",
"0.83339524",
"0.8207941",
"0.8207941",
"0.8185698",
"0.8166692",
"0.81515074",
"0.81515074",
"0.81515074",
"0.81515074",
"0.81515074",
"0.81515074",
"0.81487906",
"0.80961835",
"0.80961835",
"0.80961835",
"0.80961835",
"0.80717826",
"0.80469733",
"0.79900634",
"0.7958355",
"0.7958355",
"0.7951867",
"0.7951867",
"0.78939706",
"0.78939706",
"0.78939706",
"0.78939706",
"0.78939706",
"0.78939706",
"0.78939706",
"0.78939706",
"0.7885549",
"0.7885549",
"0.7885549",
"0.78651756",
"0.78651756",
"0.78564966",
"0.78424674",
"0.78424674",
"0.7840358",
"0.7840358",
"0.7840358",
"0.7840358",
"0.7840358",
"0.78111714",
"0.78111714",
"0.78111714",
"0.78111714",
"0.78111714",
"0.7804528",
"0.7804528",
"0.77974755",
"0.77974755",
"0.7784595",
"0.7778999",
"0.7772656",
"0.77602684",
"0.7716867",
"0.77164304",
"0.77164",
"0.77007866",
"0.77007866",
"0.7677822",
"0.7676436",
"0.76594836",
"0.76365805",
"0.75881827",
"0.75816387",
"0.7553463",
"0.7553463",
"0.7552426",
"0.7541069",
"0.75371724",
"0.7529668",
"0.7529668",
"0.7529668",
"0.75288093",
"0.75184166",
"0.7506015",
"0.7478244",
"0.74764395",
"0.7450787",
"0.7445351",
"0.74389815",
"0.74314487",
"0.7407365",
"0.73891956"
] |
0.75916314
|
79
|
Returns a builder for this class
|
public static Builder newBuilder() {
return new Builder();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder() {\n return new Builder();\n }",
"public static Builder builder ()\n {\n\n return new Builder ();\n\n }",
"public static Builder builder(){ return new Builder(); }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public Builder toBuilder() {\n return new Builder(this);\n }",
"public static Builder create() {\n\t\treturn new Builder();\n\t}",
"public static Builder create() {\n\t\treturn new Builder();\n\t}",
"@Contract(\" -> new\")\n public static @NotNull Builder getBuilder()\n {\n return new Builder();\n }",
"public static Builder newBuilder() {\n return new Builder();\n }",
"public static Builder newBuilder() {\n return new Builder();\n }",
"public static Builder newBuilder() {\n return new Builder();\n }",
"public static Builder newBuilder() {\n return new Builder();\n }",
"public static Builder newBuilder() {\n return new Builder();\n }",
"public static Builder newBuilder() {\n return new Builder();\n }",
"public Builder() {}",
"public Builder() {}",
"public Builder() {}",
"public static Builder builder() {\n return new Builder().defaults();\n }",
"static Builder newBuilder() {\n return new Builder();\n }",
"public Builder<X> toBuilder() {\n return new Builder<X>(this);\n }",
"public Builder(){\n }",
"public AriBuilder builder() {\n if ( builder == null ) {\n throw new IllegalArgumentException(\"This version has no builder. Library error for :\" + this.name());\n } else {\n return builder;\n }\n }",
"public Builder() { }",
"private Builder() {}",
"public static Builder newBuilder() {\n return Builder.createDefault();\n }",
"public static Builder newBuilder() {\n return Builder.createDefault();\n }",
"public Builder() {\n\t\t}",
"private Builder() {\n\t\t}",
"public static Object builder() {\n\t\treturn null;\r\n\t}",
"public static Object builder() {\n\t\treturn null;\n\t}",
"public Builder() {\n }",
"public Builder() {\n }",
"public Builder() {\n }",
"protected ClassBuilder getBuilder() {\n return m_classBuilder;\n }",
"public static ProductBuilder builder() {\n return ProductBuilder.of();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"@MavlinkMessageBuilder\n public static Builder builder() {\n return new Builder();\n }",
"private Builder() {\n }",
"private Builder() {\n }",
"public static ComputerBuilder getBuilder() {\n return new ComputerBuilder();\n }",
"public static Builder<?> builder() {\n return new Builder2();\n }",
"public static LinkBuilder builder() {\n return new LinkBuilder();\n }",
"public static Builder builder() {\n return new Report.Builder();\n }",
"private Builder()\n {\n }",
"public static ProxyBuilder getBuilder() {\r\n\t\tClassProxyBuilder builder = new ClassProxyBuilder();\r\n\t\treturn builder;\r\n\t}",
"java.lang.String getBuilder();",
"public Leilao builder() {\n\t\treturn this.leilao;\r\n\t}",
"static Builder builder() {\n return new SourceContextImpl.Builder();\n }",
"public static JSONBuilder newInstance(){\n return new JSONBuilder();\n }",
"public Builder getThis() { return this; }",
"private Builder builder() {\n\n\t\tif (!(message instanceof Builder)) {\n\t\t\tthrow new IllegalStateException(\"Message is not a builder\");\n\t\t}\n\n\t\treturn (Builder) message;\n\n\t}",
"public PaymentType builder()\n {\n return new PaymentType(this);\n }",
"public static NodeConfigBuilder builder() {\n\t\treturn new NodeConfigBuilder();\n\t}",
"public static ApiRequest.ApiRequestBuilder builder() {\n final ApiRequest.ApiRequestBuilder builder = new ApiRequestBuilderCustom();\n return builder\n .requestStartTime(Instant.now().toEpochMilli())\n .requestId(UUID.randomUUID().toString());\n }",
"public io.grafeas.v1.Metadata.Builder getMetadataBuilder() {\n bitField0_ |= 0x00000004;\n onChanged();\n return getMetadataFieldBuilder().getBuilder();\n }",
"public org.apache.drill.exec.proto.UserBitShared.RecordBatchDef.Builder getDefBuilder() {\n bitField0_ |= 0x00000020;\n onChanged();\n return getDefFieldBuilder().getBuilder();\n }",
"public static MPOpenAPIBuilder builder() {\n return new MPOpenAPIBuilder();\n }",
"public static Builder create(){\n return new Builder(Tribit.ZERO);\n }",
"public static FXMLLoaderBuilder builder() {\n return new FXMLLoaderBuilder();\n }",
"@FunctionalInterface\n public interface Builder {\n BuildingModel build(int x, int y, int angle, int floor);\n }",
"public static MappableBuilder createMappableBuilder()\r\n {\r\n\r\n return new MappableBuilder( createMappableBuilderFactory() );\r\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload.Builder getDocumentBuilder() {\n \n onChanged();\n return getDocumentFieldBuilder().getBuilder();\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload.Builder getDocumentBuilder() {\n \n onChanged();\n return getDocumentFieldBuilder().getBuilder();\n }",
"public trinsic.services.common.v1.CommonOuterClass.JsonPayload.Builder getDocumentBuilder() {\n \n onChanged();\n return getDocumentFieldBuilder().getBuilder();\n }",
"public interface Builder<T> {\n\n /**\n * The final function that creates the object built.\n * @return the built object\n */\n T build();\n}",
"public XULTemplateBuilder getBuilder() //readonly\n\t{\n\t\tif(xulTemplateBuilder == null && getDatabase() != null) {\n\t\t\tRDFService rdfService = null; //TODO get the RDFService\n\t\t\txulTemplateBuilder = new XULTemplateBuilderImpl(rdfService, this);\n\t\t}\n\t\treturn xulTemplateBuilder;\n\t}",
"public com.yangtian.matrix.Matrix.Builder getCBuilder() {\n \n onChanged();\n return getCFieldBuilder().getBuilder();\n }",
"public static DataModelBuilder create() {\n return new DataModelBuilder();\n }",
"default StringBuilder builder() {\n return templateBuilder.get();\n }",
"@Incubating\n interface Builder {\n\n /**\n * Sets the root project directory for this Gradle Build.\n *\n * @param projectDir root project directory.\n * @return this\n */\n Builder forProjectDirectory(File projectDir);\n\n /**\n * Specifies the Gradle distribution described in the build should be used.\n *\n * @return this\n */\n Builder useBuildDistribution();\n\n /**\n * Specifies the Gradle distribution to use.\n *\n * @param gradleHome The Gradle installation directory.\n * @return this\n */\n Builder useInstallation(File gradleHome);\n\n /**\n * Specifies the version of Gradle to use.\n *\n * @param gradleVersion The version to use.\n * @return this\n */\n Builder useGradleVersion(String gradleVersion);\n\n /**\n * Specifies the Gradle distribution to use.\n *\n * @param gradleDistribution The distribution to use.\n *\n * @return this\n */\n Builder useDistribution(URI gradleDistribution);\n\n /**\n * Creates an immutable GradleBuild instance based on this builder.\n *\n * @return a new instance, never null.\n */\n GradleBuild create();\n }",
"public com.google.protobuf2.Any.Builder getObjectBuilder() {\n \n onChanged();\n return getObjectFieldBuilder().getBuilder();\n }",
"public com.google.protobuf.Struct.Builder getMetadataBuilder() {\n \n onChanged();\n return getMetadataFieldBuilder().getBuilder();\n }",
"protected Builder stateBuilder() {\n return this.stateBuilder();\n }"
] |
[
"0.8432214",
"0.8432214",
"0.8432214",
"0.8432214",
"0.8375389",
"0.8346206",
"0.8346206",
"0.8346206",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.83443654",
"0.8317208",
"0.83105505",
"0.8057297",
"0.8057297",
"0.8057297",
"0.8057297",
"0.8057297",
"0.8057297",
"0.8057297",
"0.7944933",
"0.7944933",
"0.78369963",
"0.78096366",
"0.77851",
"0.77851",
"0.77851",
"0.77851",
"0.7745266",
"0.77435845",
"0.77435845",
"0.77435845",
"0.7733523",
"0.77212524",
"0.76987725",
"0.7675842",
"0.76719356",
"0.7656053",
"0.76290375",
"0.7612271",
"0.7612271",
"0.7597948",
"0.7580046",
"0.7536678",
"0.7526858",
"0.7464144",
"0.7464144",
"0.7456453",
"0.7424593",
"0.7417136",
"0.7398467",
"0.7398467",
"0.7398467",
"0.7398467",
"0.7393661",
"0.7393661",
"0.73905987",
"0.7385415",
"0.7257639",
"0.7199122",
"0.7185922",
"0.7145747",
"0.7145591",
"0.7118229",
"0.7102843",
"0.7098783",
"0.7068978",
"0.7061154",
"0.70379823",
"0.7015716",
"0.69906795",
"0.69814",
"0.6963056",
"0.689634",
"0.6868551",
"0.6830792",
"0.6800475",
"0.6790654",
"0.6786202",
"0.6786202",
"0.6786202",
"0.67743033",
"0.67719746",
"0.6752286",
"0.67473745",
"0.67410105",
"0.67171156",
"0.6696691",
"0.6692834",
"0.66896397"
] |
0.7747108
|
37
|
Sets up the endpoint that displays stats for the current run of the server enpoints
|
public void setupStatsEndpoint() {
HttpHandler handler =
(httpExchange) -> {
this.increaseEndpointHitFrequency(this.getStatsApiEndpoint());
StringBuilder response = new StringBuilder();
Set<Map.Entry<String, Integer>> frequencySet = this.getEndpointFrequencyEntrySet();
for (Map.Entry<String, Integer> entry : frequencySet) {
response
.append(entry.getKey())
.append(":")
.append(entry.getValue())
.append(System.getProperty("line.separator"));
}
httpExchange.getResponseHeaders().add("Content-Type", "text/html; charset=UTF-8");
httpExchange.sendResponseHeaders(200, response.length());
OutputStream out = httpExchange.getResponseBody();
out.write(response.toString().getBytes());
out.close();
};
this.endpointMap.put(this.statsApiEndpoint, this.server.createContext(this.statsApiEndpoint));
this.setHandler(this.getStatsApiEndpoint(), handler);
System.out.println("Set handler for logging");
this.endpointVisitFrequency.put(this.statsApiEndpoint, 0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setupLoggingEndpoint() {\n HttpHandler handler = (httpExchange) -> {\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(serverLogsArray.toJSONString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));\n this.setHandler(this.getLoggingApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);\n }",
"private void setupEndpoints() {\n post(API_CONTEXT, \"application/json\", (request, response) -> {\n try {\n response.status(201);\n return gameService.startGame(request.body());\n } catch (Exception e) {\n logger.error(\"Failed to create a new game\");\n response.status(400);\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Join a game\n put(API_CONTEXT + \"/:id\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.joinGame(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceJoinException ex) {\n response.status(410);\n return new ErrorMessage(ex.getMessage());\n }\n }, new JsonTransformer());\n\n // Play a game\n post(API_CONTEXT + \"/:id/turns\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n gameService.play(request.params(\":id\"), request.body());\n } catch (GameService.GameServiceIdException ex){\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceMoveException ex) {\n response.status(422);\n return new ErrorMessage(ex.getMessage());\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Describe the game board\n get(API_CONTEXT + \"/:id/board\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeBoard(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // fetch state\n get(API_CONTEXT + \"/:id/state\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeState(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n// get(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.find(request.params(\":id\"));\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to find object with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// get(API_CONTEXT + \"/todos\", \"application/json\", (request, response)-> {\n// try {\n// return todoService.findAll() ;\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(\"Failed to fetch the list of todos\");\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// put(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.update(request.params(\":id\"), request.body());\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to update todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// delete(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// todoService.delete(request.params(\":id\"));\n// response.status(200);\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to delete todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// }\n// return Collections.EMPTY_MAP;\n// }, new JsonTransformer());\n\n }",
"@Override\n public void onStartup() {\n if(jaegerConfig.isEnabled()) {\n Configuration.SamplerConfiguration samplerConfig = new Configuration.SamplerConfiguration().withType(jaegerConfig.getType()).withParam(jaegerConfig.getParam());\n Configuration.ReporterConfiguration reporterConfig = new Configuration.ReporterConfiguration().withLogSpans(true);\n tracer = new Configuration(serverConfig.getServiceId()).withSampler(samplerConfig).withReporter(reporterConfig).getTracer();\n }\n }",
"public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}",
"private static void runClient() {\n long clientStartTime = System.currentTimeMillis();\n \n // Pick a random entry point\n int entryPointId = random.nextInt(entryPointAddresses.size());\n String[] ep = entryPointAddresses.get(entryPointId);\n String entryPointCode = ep[0];\n String entryPointAddress = ep[1];\n \n // User number and id\n int userCount = COUNT.incrementAndGet();\n String userToken = (clientLocation + userCount + \"-\" + Math.abs(random.nextInt(1000)));\n User u = USER_RESOLVER.resolve(userToken);\n \n // Point the client to the entry point\n WebTarget webTarget = entryPointTarget(entryPointAddress, userToken);\n EntryPointResponse response = new EntryPointResponse(null, null);\n try {\n String responseJson = webTarget.request(MediaType.APPLICATION_JSON).get(String.class);\n response = Jsons.fromJson(responseJson, EntryPointResponse.class);\n } catch (Exception e) {\n LOG.log(Level.SEVERE, String.format(\"Could not load responses from entry point %s: %s\", ep[0], ep[1]));\n LOG.log(Level.SEVERE, \"Attempted to connect with: \" + webTarget.getUri().toString());\n }\n \n // current time after the response\n long clientEndTime = System.currentTimeMillis(); \n \n Double latency = null;\n if (response.getRedirectAddress() != null) {\n latency = latencies.get(response.getRedirectAddress());\n }\n \n writer.writeCsv(LOG_LENS, \n sdf.format(new Date()),\n clientStartTime - Main.clientStartTime,\n userCount,\n Main.clientLocation,\n entryPointCode,\n response.getSelectedCloudSiteCode(),\n clientEndTime - clientStartTime,\n latency == null ? \"null\" : String.format(\"%.2f\", latency),\n userToken,\n Arrays.toString(u.getCitizenships().toArray()),\n Arrays.toString(u.getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getProviderCode(),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getLocationCode(),\n response.getDefinition() == null ? \"null\" : Arrays.toString(response.getDefinition().getTags().toArray()),\n response.getDefinition() == null ? \"null\" : response.getDefinition().getCost()\n );\n //writer.flush();\n }",
"public static void loadEndpoints(){\n\t\tStart.loadEndpoints();\n\t\t//add\t\t\n\t\t//e.g.: get(\"/my-endpoint\", (request, response) ->\t\tmyEndpointGet(request, response));\n\t\t//e.g.: post(\"/my-endpoint\", (request, response) ->\t\tmyEndpointPost(request, response));\n\t}",
"void setEndpoint(String endpoint);",
"@Before\n\tpublic static void setup() {\n\t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/MonitoringService\";\n\t\trenderArgs.put(\"location\", location);\n\t}",
"public BasicServerMetricsListener() {\n myServerMetrics = new ConcurrentHashMap<String, BasicServerMetrics>();\n }",
"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}",
"@Override\n public void start(){\n // Retrieve the configuration, and init the verticle.\n JsonObject config = config();\n init(config);\n // Every `period` ms, the given Handler is called.\n vertx.setPeriodic(period, l -> {\n mining();\n send();\n });\n }",
"@Override\n public void start() throws Exception {\n\n Set<String> allowedHeaders = new HashSet<>();\n allowedHeaders.add(HEADER_ACCEPT);\n allowedHeaders.add(HEADER_TOKEN);\n allowedHeaders.add(HEADER_CONTENT_LENGTH);\n allowedHeaders.add(HEADER_CONTENT_TYPE);\n allowedHeaders.add(HEADER_HOST);\n allowedHeaders.add(HEADER_ORIGIN);\n allowedHeaders.add(HEADER_REFERER);\n allowedHeaders.add(HEADER_ALLOW_ORIGIN);\n\n Set<HttpMethod> allowedMethods = new HashSet<>();\n allowedMethods.add(HttpMethod.GET);\n allowedMethods.add(HttpMethod.POST);\n allowedMethods.add(HttpMethod.OPTIONS);\n allowedMethods.add(HttpMethod.DELETE);\n allowedMethods.add(HttpMethod.PATCH);\n allowedMethods.add(HttpMethod.PUT);\n\n /* Create a reference to HazelcastClusterManager. */\n\n router = Router.router(vertx);\n\n /* Define the APIs, methods, endpoints and associated methods. */\n\n router = Router.router(vertx);\n router.route().handler(\n CorsHandler.create(\"*\").allowedHeaders(allowedHeaders).allowedMethods(allowedMethods));\n // router.route().handler(HeadersHandler.create());\n router.route().handler(BodyHandler.create());\n // router.route().handler(AuthHandler.create(vertx));\n\n HTTPRequestValidatiorsHandlersFactory validators = new HTTPRequestValidatiorsHandlersFactory();\n ValidationFailureHandler validationsFailureHandler = new ValidationFailureHandler();\n\n /* NGSI-LD api endpoints */\n router.get(NGSILD_ENTITIES_URL).handler(validators.getValidation4Context(\"ENTITY\"))\n .handler(AuthHandler.create(vertx)).handler(this::handleEntitiesQuery)\n .failureHandler(validationsFailureHandler);\n\n router\n .get(NGSILD_ENTITIES_URL + \"/:domain/:userSha/:resourceServer/:resourceGroup/:resourceName\")\n .handler(validators.getValidation4Context(\"LATEST\")).handler(AuthHandler.create(vertx))\n .handler(this::handleLatestEntitiesQuery).failureHandler(validationsFailureHandler);\n\n router.post(NGSILD_POST_QUERY_PATH).consumes(APPLICATION_JSON)\n .handler(validators.getValidation4Context(\"POST\")).handler(AuthHandler.create(vertx))\n .handler(this::handlePostEntitiesQuery).failureHandler(validationsFailureHandler);\n\n router.get(NGSILD_TEMPORAL_URL).handler(validators.getValidation4Context(\"TEMPORAL\"))\n .handler(AuthHandler.create(vertx)).handler(this::handleTemporalQuery)\n .failureHandler(validationsFailureHandler);\n\n router.post(NGSILD_SUBSCRIPTION_URL).handler(AuthHandler.create(vertx))\n .handler(this::handleSubscriptions);\n // append sub\n router.patch(NGSILD_SUBSCRIPTION_URL + \"/:domain/:userSHA/:alias\")\n .handler(AuthHandler.create(vertx)).handler(this::appendSubscription);\n // update sub\n router.put(NGSILD_SUBSCRIPTION_URL + \"/:domain/:userSHA/:alias\")\n .handler(AuthHandler.create(vertx)).handler(this::updateSubscription);\n // get sub\n router.get(NGSILD_SUBSCRIPTION_URL + \"/:domain/:userSHA/:alias\")\n .handler(AuthHandler.create(vertx)).handler(this::getSubscription);\n // delete sub\n router.delete(NGSILD_SUBSCRIPTION_URL + \"/:domain/:userSHA/:alias\")\n .handler(AuthHandler.create(vertx)).handler(this::deleteSubscription);\n\n /* Management Api endpoints */\n // Exchange\n router.post(IUDX_MANAGEMENT_EXCHANGE_URL).handler(AuthHandler.create(vertx))\n .handler(this::createExchange);\n router.delete(IUDX_MANAGEMENT_EXCHANGE_URL + \"/:exId\").handler(AuthHandler.create(vertx))\n .handler(this::deleteExchange);\n router.get(IUDX_MANAGEMENT_EXCHANGE_URL + \"/:exId\").handler(AuthHandler.create(vertx))\n .handler(this::getExchangeDetails);\n // Queue\n router.post(IUDX_MANAGEMENT_QUEUE_URL).handler(AuthHandler.create(vertx))\n .handler(this::createQueue);\n router.delete(IUDX_MANAGEMENT_QUEUE_URL + \"/:queueId\").handler(AuthHandler.create(vertx))\n .handler(this::deleteQueue);\n router.get(IUDX_MANAGEMENT_QUEUE_URL + \"/:queueId\").handler(AuthHandler.create(vertx))\n .handler(this::getQueueDetails);\n // bind\n router.post(IUDX_MANAGEMENT_BIND_URL).handler(AuthHandler.create(vertx))\n .handler(this::bindQueue2Exchange);\n // unbind\n router.post(IUDX_MANAGEMENT_UNBIND_URL).handler(AuthHandler.create(vertx))\n .handler(this::unbindQueue2Exchange);\n // vHost\n router.post(IUDX_MANAGEMENT_VHOST_URL).handler(AuthHandler.create(vertx))\n .handler(this::createVHost);\n router.delete(IUDX_MANAGEMENT_VHOST_URL + \"/:vhostId\").handler(AuthHandler.create(vertx))\n .handler(this::deleteVHost);\n // adapter\n router.post(IUDX_MANAGEMENT_ADAPTER_URL + \"/register\").handler(AuthHandler.create(vertx))\n .handler(this::registerAdapter);\n router.delete(IUDX_MANAGEMENT_ADAPTER_URL + \"/:domain/:userSHA/:resourceServer/:resourceGroup\")\n .handler(AuthHandler.create(vertx)).handler(this::deleteAdapter);\n router.get(IUDX_MANAGEMENT_ADAPTER_URL + \"/:domain/:userSHA/:resourceServer/:resourceGroup\")\n .handler(AuthHandler.create(vertx)).handler(this::getAdapterDetails);\n router.post(IUDX_MANAGEMENT_ADAPTER_URL + \"/heartbeat\").handler(AuthHandler.create(vertx))\n .handler(this::publishHeartbeat);\n router.post(IUDX_MANAGEMENT_ADAPTER_URL + \"/downstreamissue\").handler(AuthHandler.create(vertx))\n .handler(this::publishDownstreamIssue);\n router.post(IUDX_MANAGEMENT_ADAPTER_URL + \"/dataissue\").handler(AuthHandler.create(vertx))\n .handler(this::publishDataIssue);\n router.post(IUDX_MANAGEMENT_ADAPTER_URL + \"/entities\").handler(AuthHandler.create(vertx))\n .handler(this::publishDataFromAdapter);\n\n /**\n * Documentation routes\n */\n /* Static Resource Handler */\n /* Get openapiv3 spec */\n router.get(ROUTE_STATIC_SPEC).produces(MIME_APPLICATION_JSON).handler(routingContext -> {\n HttpServerResponse response = routingContext.response();\n response.sendFile(\"docs/openapi.yaml\");\n });\n /* Get redoc */\n router.get(ROUTE_DOC).produces(MIME_TEXT_HTML).handler(routingContext -> {\n HttpServerResponse response = routingContext.response();\n response.sendFile(\"docs/apidoc.html\");\n });\n\n /* Read ssl configuration. */\n isSSL = config().getBoolean(\"ssl\");\n\n /* Read server deployment configuration. */\n isProduction = config().getBoolean(\"production\");\n\n HttpServerOptions serverOptions = new HttpServerOptions();\n\n if (isSSL) {\n LOGGER.debug(\"Info: Starting HTTPs server\");\n\n /* Read the configuration and set the HTTPs server properties. */\n\n keystore = config().getString(\"keystore\");\n keystorePassword = config().getString(\"keystorePassword\");\n\n /* Setup the HTTPs server properties, APIs and port. */\n\n serverOptions.setSsl(true)\n .setKeyStoreOptions(new JksOptions().setPath(keystore).setPassword(keystorePassword));\n\n } else {\n LOGGER.debug(\"Info: Starting HTTP server\");\n\n /* Setup the HTTP server properties, APIs and port. */\n\n serverOptions.setSsl(false);\n if (isProduction) {\n port = 80;\n } else {\n port = 8080;\n }\n }\n\n serverOptions.setCompressionSupported(true).setCompressionLevel(5);\n server = vertx.createHttpServer(serverOptions);\n server.requestHandler(router).listen(port);\n\n /* Get a handler for the Service Discovery interface. */\n\n database = DatabaseService.createProxy(vertx, DATABASE_SERVICE_ADDRESS);\n\n authenticator = AuthenticationService.createProxy(vertx, AUTH_SERVICE_ADDRESS);\n\n databroker = DataBrokerService.createProxy(vertx, BROKER_SERVICE_ADDRESS);\n\n latestDataService = LatestDataService.createProxy(vertx, LATEST_SEARCH_ADDRESS);\n\n managementApi = new ManagementApiImpl();\n subsService = new SubscriptionService();\n catalogueService = new CatalogueService(vertx, config());\n validator = new Validator(catalogueService);\n\n }",
"public void reportStats() {\n System.out.println(\"Number of requests: \" + (requestCount - warmUpRequests));\n System.out.println(\"Number of hits: \" + hitCount);\n System.out.println(\"hit ratio: \" + (double) hitCount / (requestCount - warmUpRequests));\n System.out.println(\"Average hit cost: \" + (double) hitCost / hitCount);\n }",
"public Server() {\n print_addr();\n follow_updates();\n }",
"private void statsOutput(long startTime, long endTime ,Stat stat, int taskSize, List<Stat> listStat) {\n\n System.out.println();\n System.out.println(\" !!! END OF REQUEST !!!\");\n System.out.println();\n System.out.println(\"----------------------------------\");\n System.out.println(\" STATISTICS\");\n System.out.println(\"----------------------------------\");\n System.out.println(\"1. Number of threads: \" + taskSize);\n System.out.println(\"2. Total run time: \" + (endTime - startTime));\n System.out.println(\"3. Total request sent: \" + stat.getSentRequestsNum());\n System.out.println(\"4. Total successful request: \" + stat.getSuccessRequestsNum());\n System.out.println(\"5. Mean latency: \" + stat.getMeanLatency());\n System.out.println(\"6. Median latency: \" + stat.getMedianLatency());\n System.out.println(\"7. 95th percentile latency: \" + stat.get95thLatency());\n System.out.println(\"8. 99th percentile latency: \" + stat.get99thLatency());\n\n if(listStat!=null){\n OutputChart outputChart = new OutputChart(listStat);\n outputChart.generateChart(\"Part 1\");\n }\n\n }",
"public StatisticsServlet() {\n\t\tsuper();\n\t}",
"void onServerStarted();",
"ResponseDTO startAllServers();",
"@Override public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n\n }",
"protected void serverStarted()\n {\n // System.out.println\n // (\"Server listening for connections on port \" + getPort());\n }",
"public void onStart(ITestContext testContext) {\n\t\tString timeStamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy_MM_dd_HH_mm_ss\"));\n\t\tString reportName= \"NetBanking_Report_\"+timeStamp+\".html\";\n\t\textent = new ExtentReports();\n\t\tspark = new ExtentSparkReporter(\"./test-output/\"+reportName);\n\t\ttry {\n\t\t\tspark.loadXMLConfig(\"./extent-config.xml\");\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\textent.attachReporter(spark);\n\t\textent.setSystemInfo(\"Host name\", \"localHost\");\n\t\textent.setSystemInfo(\"Environment\", \"QA\");\n\t\textent.setSystemInfo(\"user\", \"Ashis\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic void init(EndpointConfig arg0) {\n\t\t\r\n\t}",
"public View runStartUp() {\r\n Controller contr = new Controller();\r\n contr.addObserver(InspectionStatsView.getObserver());\r\n Logger firstLogger = new FileLogger();\r\n return new View(contr, firstLogger);\r\n }",
"@Override\n\tpublic void init(EndpointConfig arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void init(EndpointConfig arg0) {\n\t\t\n\t}",
"void configureEndpoint(Endpoint endpoint);",
"ManagedEndpoint next();",
"public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }",
"@Override\n public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n }",
"@GET\n @Path(\"/endpoints\")\n @Produces(ApiOverviewRestEndpoint.MEDIA_TYPE_JSON_V1)\n @Cache\n Response getAvailableEndpoints(@Context final Dispatcher dispatcher);",
"protected void serverStarted()\n {\n System.out.println(\"Server listening for connections on port \" + getPort());\n }",
"public void addHTTPEndpoint() {\n\t\tConfigTestElement configTestElement = new ConfigTestElement();\n\n\t\tTestElementProperty elementProperty = new TestElementProperty();\n\t\telementProperty.setName(\"HTTPsampler.Arguments\");\n\n\t\tArguments args = new Arguments();\n\t\targs.setProperty(TestElement.TEST_CLASS, Arguments.class.getName());\n\t\targs.setProperty(TestElement.GUI_CLASS, HTTPArgumentsPanel.class.getName());\n\t\telementProperty.setElement(args);\n\t\tconfigTestElement.setProperty(elementProperty);\n\n\t\tconfigTestElement.setProperty(\"HTTPSampler.domain\", this.httpUrl);\n\t\tconfigTestElement.setProperty(\"HTTPSampler.port\", this.httpPort);\n\t\tconfigTestElement.setProperty(\"HTTPSampler.protocol\", \"http\");\n\t\tconfigTestElement.setProperty(\"HTTPSampler.path\", this.httpPath);\n\t\tconfigTestElement.setProperty(\"HTTPSampler.implementation\", \"HttpClient3.1\");\n\t\tconfigTestElement.setProperty(\"HTTPSampler.concurrentPool\", \"6\");\n\t\tconfigTestElement.setEnabled(true);\n\t\tconfigTestElement.setName(\"Requests Defaults\");\n\t\tconfigTestElement.setProperty(TestElement.TEST_CLASS, ConfigTestElement.class.getName());\n\t\tconfigTestElement.setProperty(TestElement.GUI_CLASS, HttpDefaultsGui.class.getName());\n\n\t\tthis.testPlanHashTree.add(configTestElement);\n\t}",
"public StatusEndPoint(String id) {\n\n super(id);\n System.out.println(\"id = \" + id);\n// System.out.println(\"stop = \" + stop);\n// System.out.println(\"run = \" + run);\n }",
"public abstract void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing);",
"public static void main(String[] args) {\n\t\tEndpoint.publish(\"http://127.0.0.1:1111/cs\", new Calculator());\r\n\t\tSystem.out.println(\"Server has started\");\r\n\r\n\t}",
"void watchEndpointData(String clusterName, EndpointWatcher watcher) {\n }",
"@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public final void contextInitialized(final ServletContextEvent sce) {\n context = sce.getServletContext();\n\n String apiSrvDaemonPath = context.getRealPath(PS);\n System.setProperty(\"APISrvDaemonPath\", context.getRealPath(\"/\"));\n System.setProperty(\"APISrvDaemonVersion\",\n \"v.0.0.2-22-g2338f25-2338f25-40\");\n\n // Notify execution\n System.out.println(\"--- \" + \"Starting APIServerDaemon \"\n + System.getProperty(\"APISrvDaemonVersion\") + \" ---\");\n System.out.println(\"Java vendor : '\" + VN + \"'\");\n System.out.println(\"Java vertion: '\" + VR + \"'\");\n System.out.println(\"Running as : '\" + US + \"' username\");\n System.out.println(\"Servlet path: '\" + apiSrvDaemonPath + \"'\");\n\n // Initialize log4j logging\n String log4jPropPath =\n apiSrvDaemonPath + \"WEB-INF\" + PS + \"log4j.properties\";\n File log4PropFile = new File(log4jPropPath);\n\n if (log4PropFile.exists()) {\n System.out.println(\"Initializing log4j with: \" + log4jPropPath);\n PropertyConfigurator.configure(log4jPropPath);\n } else {\n System.err.println(\n \"WARNING: '\" + log4jPropPath\n + \" 'file not found, so initializing log4j \"\n + \"with BasicConfigurator\");\n BasicConfigurator.configure();\n }\n\n // Make a test with jdbc/geApiServerPool\n // jdbc/UserTrackingPool\n // jdbc/gehibernatepool connection pools\n String currentPool = \"not yet defined!\";\n String poolPrefix = \"java:/comp/env/\";\n String[] pools = {\"jdbc/fgApiServerPool\",\n \"jdbc/UserTrackingPool\",\n \"jdbc/gehibernatepool\"};\n Connection[] connPools = new Connection[pools.length];\n\n for (int i = 0; i < pools.length; i++) {\n try {\n Context initContext = new InitialContext();\n Context envContext =\n (Context) initContext.lookup(\"java:comp/env\");\n\n currentPool = pools[i];\n\n // DataSource ds =\n // (DataSource)initContext.lookup(poolPrefix+currentPool);\n DataSource ds = (DataSource) envContext.lookup(currentPool);\n\n connPools[i] = ds.getConnection();\n System.out.println(\"PERFECT: \" + currentPool + \" was ok\");\n } catch (Exception e) {\n System.err.println(\"WARNING: \" + currentPool + \" failed\" + LS\n + e.toString());\n } finally {\n try {\n connPools[i].close();\n } catch (Exception e) {\n System.err.println(\"WARNING: \" + currentPool\n + \" failed to close\" + LS + e.toString());\n }\n }\n }\n\n // Register MySQL driver\n APIServerDaemonDB.registerDriver();\n\n // Initializing the daemon\n if (asDaemon == null) {\n asDaemon = new APIServerDaemon();\n }\n\n asDaemon.startup();\n }",
"@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }",
"@RequestMapping(value = \"/endpoint_manager\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManager(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, false));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }",
"private static void testES(final ESEndpoint esEndpoint, final AsyncClient client) throws Exception {\n\n try {\n final Request esIndexRequest =\n esEndpoint.getRequestBuilder(esEndpoint.buildIndexStatsURI(null)).create();\n final Response esIndexResponse = client.send(esIndexRequest);\n switch(esIndexResponse.getStatusCode()) {\n case 200:\n return;\n default:\n throw new Exception(\"ES communication error (\" + esIndexResponse.getStatusCode() + \")\");\n }\n } catch(IOException ioe) {\n throw new Exception(\"ES endpoint appears to be down\", ioe);\n }\n }",
"public ServersHT() {\n table = new ServerDescEntry[initialCapacity];\n threshold = (int)(initialCapacity * loadFactor);\n }",
"@Scheduled(fixedRate = 2000)\n private void doSendRpcUsage() {\n List<MethodCallDTO> items = stats.values()\n .stream()\n .map(stat -> new MethodCallDTO(\n stat.name,\n stat.count.longValue(),\n stat.lastCall.longValue(),\n stat.lastResult.get(),\n stat.curl))\n .sorted((s1, s2) -> s1.getMethodName().compareTo(s2.getMethodName()))\n .collect(Collectors.toList());\n\n clientMessageService.sendToTopic(\"/topic/rpcUsage\", items);\n }",
"@Override\n \t\tprotected void setup(Context context){\n \t\t\tint port = 5701 + context.getTaskAttemptID().getId()%numInstances;\n \t\t\t//System.out.println(\"Connecting to port \" + port);\n \t\t\tClientConfig clientConfig = new ClientConfig();\n \t\t\tclientConfig.addAddress(\"127.0.0.1:\" + port);\n \t\t\tthis.client = HazelcastClient.newHazelcastClient(clientConfig);\n \t\t\tthis.map = client.getMap(\"kmer\");\n \t\t}",
"@Activate\n public void activate(ComponentContext ctx) {\n try {\n this.serverContainer.addEndpoint(RealTimeWebSocketServerMsgHandler.class);\n LOG.info(\"Hydra Data-collection service Websocket: Server endpoint for key-value stream deployed\"); //endpoint is immediately available //$NON-NLS-1$\n this.serverContainer.addEndpoint(MessageWebSocketServerMsgHandler.class);\n LOG.info(\"Hydra Data-collection service Websocket: Server endpoint for messages deployed\"); //endpoint is immediately available //$NON-NLS-1$\n } catch (DeploymentException e) {\n LOG.error(\"Hydra Data-collection service Websocket: Error occurred while deploying the server endpoint\", e); //$NON-NLS-1$\n }\n }",
"@Override\n public void start() {\n // HINT: comment setPeriodic and uncomment setTimer to test more easily if exponential backoff works as expected\n // vertx.setTimer(5000, this::updateCache);\n vertx.setPeriodic(120000, this::updateCache);\n }",
"public IntegrationServicesProviderServlet() {\n this.engine = ExpandedOsgiEngine.getInstance();\n }",
"@Override\n public void start() {\n try {\n hostname = InetAddress.getLocalHost().getHostName().split(\"\\\\.\")[0];\n }catch (Exception ex2) {\n logger.warn(\"Unknown error occured\", ex2);\n }\n \n collectorRunnable.server = this;\n if (service.isShutdown() || service.isTerminated()) {\n service = Executors.newSingleThreadScheduledExecutor();\n }\n service.scheduleWithFixedDelay(collectorRunnable, 0,\n pollFrequency, TimeUnit.SECONDS);\n\n }",
"private void setupEndpoints() {\n\t\tpost(API_CONTEXT + \"/users\", \"application/json\", (request, response) -> {\n\t\t\t//response.status(201);\n\t\t\treturn userService.createNewUser(request.body());\n\t\t}, new JsonTransformer());\n\t\t\n\t\tpost(API_CONTEXT + \"/login\", \"application/json\", (request, response) -> {\n\t\t\t//response.status(201);\n\t\t\treturn userService.find(request.body());\n\t\t}, new JsonTransformer());\n\t\t\n\t\tput(API_CONTEXT + \"/users\", \"application/json\", (request, response)\n\t\t\t\t-> userService.update(request.body()), new JsonTransformer());\n\t\t\n\t\tdelete(API_CONTEXT + \"/users/:email\", \"application/json\", (request, response)\n\t\t\t\t-> userService.deleteUser(request.params(\":email\")), new JsonTransformer());\n\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n sampleGauges();\n // serve data using Prometheus built in client.\n super.doGet(req, resp);\n }",
"protected void serverStarted()\r\n {\r\n System.out.println\r\n (\"Server listening for connections on port \" + getPort());\r\n }",
"public static void main(String[] args) {\n\n\t\tProperties configFile = new Properties();\n\t\ttry {\n\t\t\tconfigFile.load(Setpointcontroller.class.getClassLoader().getResourceAsStream(\"config.properties\"));\n\n\t\t\tNSCL_BASE_URL = configFile.getProperty(\"NSCL_BASE_URL\");\n\t\t\tAUTH = configFile.getProperty(\"AUTH\");\t\t\n\t\t\tAPOC_URL = configFile.getProperty(\"APOC_URL\");\t\n\n\t\t\ttry{\n\t\t\t\tAPOC_PORT = Integer.parseInt(configFile.getProperty(\"APOC_PORT\")); // Convert the argument to ensure that is it valid\n\t\t\t}catch ( Exception e ){\n\t\t\t\tSystem.out.println( \"APOC_PORT parameter invalid.\" ) ;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tAPOC = APOC_URL + \":\" + APOC_PORT;\n\t\t\t\n\t\t\ttry{\n\t\t\t\tDEADBAND = Integer.parseInt( configFile.getProperty(\"DEADBAND\") );\n\t\t\t}catch ( Exception e ){\n\t\t\t\tSystem.out.println( \"DEADBAND parameter invalid.\" ) ;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\tDEFAULT_SETPOINT = Integer.parseInt( configFile.getProperty(\"DEFAULT_SETPOINT\") );\n\t\t\t}catch ( Exception e ){\n\t\t\t\tSystem.out.println( \"DEFAULT_SETPOINT parameter invalid.\" ) ;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlogger.info(\"GeyserSetpointcontroller started with: \" + configFile.toString());\n\n\t\t} catch (IOException e) {\n\t\t\tlogger.fatal(\"Error in configuration file \\\"config.properties\\\"\", e);\n\t\t\treturn;\n\t\t}\n\n\t\t//---------------------------------------------------------------------------------------------------------------\n\n\t\t/* ***************************** START APOC SERVER ************************************************/\n\t\tServer server = new Server(APOC_PORT);\n\n\t\tServletHandler handler = new ServletHandler();\n\t\tserver.setHandler(handler);\n\n\t\t// IMPORTANT:\n\t\t// This is a raw Servlet, not a Servlet that has been configured\n\t\t// through a web.xml @WebServlet annotation, or anything similar.\n\t\thandler.addServletWithMapping(ApocServlet.class, \"/*\");\n\n\t\ttry {\n\t\t\tserver.start();\n\t\t\tlogger.info(\"Apoc server started.\");\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Apoc server failed to start.\", e);\n\t\t\treturn;\n\t\t}\n\t\t/* ********************************************************************************************/\n\n\n\t\t//nscl = new SCLapi(\"nscl\", NSCL_IP_ADD, \"8080\", \"admin:admin\");\n\t\tif(AUTH.equalsIgnoreCase(\"NONE\"))\n\t\t\tnscl = new SCLapi(NSCL_BASE_URL);\t//OpenMTC\n\t\telse\n\t\t\tnscl = new SCLapi(NSCL_BASE_URL, AUTH); //OM2M\n\n\t\tnscl.registerApplication(app_ID);\n\n\t\t//Look for all existing GEYSER applications and subscribe to them.\n\t\tList<String> appList = nscl.retrieveApplicationList();\n\t\tfor(String app : appList){\n\t\t\tif(app.startsWith(\"geyser\")){\n\t\t\t\tlong geyser_id = getGeyserIdFromString(app);\n\t\t\t\tgeyser_setpoint_map.put(geyser_id, DEFAULT_SETPOINT);\n\t\t\t\tnscl.createContainer(app_ID, \"SETPOINT_\"+geyser_id);\n\t\t\t\tnscl.createContentInstance(app_ID, \"SETPOINT_\"+geyser_id, String.valueOf(DEFAULT_SETPOINT));\n\t\t\t\tnscl.subscribeToContent(app_ID, \"SETPOINT_\"+geyser_id, setpoint_settings_URI+\"_\"+geyser_id, APOC);\n\t\t\t\tnscl.subscribeToContent(geyser_id, \"DATA\", setpoint_data_URI, APOC);\n\t\t\t}\n\n\t\t}\n\n\t\tnscl.subscribeToApplications(setpoint_app_URI, APOC);\n\n\t}",
"public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/plain\");\n\t\t\t\t\n\t\t\t\t if(query_type.equals(\"/target\")){\n\t\t\t\t\t String key = req.params().get(\"targetID\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequest(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t String key = \"1\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequestRange(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}).listen(80);\n\t\t} else {\n\t\t\tSystem.out.println(\"Please make sure that both your DCI are up and running\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"@Inject\n\tpublic RestIndicesStatsAction(Settings settings, Client client, RestController controller) {\n\t\tsuper(settings, client);\n\t\tcontroller.registerHandler(GET, \"/_stats\", this);\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats\", this);\n\n\t\tcontroller.registerHandler(GET, \"_stats/docs\", new RestDocsStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/docs\", new RestDocsStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/store\", new RestStoreStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/store\", new RestStoreStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/indexing\", new RestIndexingStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/indexing\", new RestIndexingStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/_stats/indexing/{indexingTypes1}\", new RestIndexingStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/indexing/{indexingTypes2}\", new RestIndexingStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/search\", new RestSearchStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/search\", new RestSearchStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/_stats/search/{searchGroupsStats1}\", new RestSearchStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/search/{searchGroupsStats2}\", new RestSearchStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/get\", new RestGetStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/get\", new RestGetStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/refresh\", new RestRefreshStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/refresh\", new RestRefreshStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/merge\", new RestMergeStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/merge\", new RestMergeStatsHandler());\n\n\t\tcontroller.registerHandler(GET, \"/_stats/flush\", new RestFlushStatsHandler());\n\t\tcontroller.registerHandler(GET, \"/{index}/_stats/flush\", new RestFlushStatsHandler());\n\t}",
"void setupEndpoint(String userId,\n String assetManagerGUID,\n String assetManagerName,\n boolean assetManagerIsHome,\n String connectionGUID,\n String endpointGUID,\n Date effectiveFrom,\n Date effectiveTo,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;",
"protected void addedServer(final BasicServerMetrics metrics) {\n // Nothing - Extension point.\n }",
"@ApiOperation(value = \"Check the heart beat.\")\r\n @GetMapping(path = RestfulEndPoints.AUTHENTICATION_HEALTH_CHECK)\r\n public String healthCheck() {\r\n return \"Hello, I am 'Authentication Service' and running quite healthy at port: \"\r\n + env.getProperty(\"local.server.port\");\r\n }",
"public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}",
"public PointServlet() {\n\t\tsuper();\n\t}",
"protected void onEndpointConnected(Endpoint endpoint) {}",
"@RequestMapping(value = \"/setup\", method = RequestMethod.GET)\n\tString setup() {\n\t\thueUseCase.addIp();\n\n\t\treturn \"setup\";\n\t}",
"@Override\n public void startEndpoint() throws IOException, InstantiationException {\n setRunning(true);\n \n rampUpProcessorTask();\n registerComponents();\n\n startPipelines();\n startListener();\n }",
"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 void init(EndpointConfig arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void run(String... args) throws Exception {\n\n\t\t System.out.println(\"using environment:\" + myConfig.getEnvironment());\n\t System.out.println(\"name:\" + myConfig.getName());\n\t System.out.println(\"servers:\" + myConfig.getServers());\n\t\t\n\t}",
"@Override\n public synchronized void receiveStats(String entityName, PerfMetricSet metricSet) {\n MOREFRetriever morefRetriever = this.context.getMorefRetriever();\n Integer frequencyInSeconds = this.context.getConfiguration().getFrequencyInSeconds();\n\n try {\n String entityNameParsed = \"\";\n logger.debug(\"MetricsReceiver in receiveStats\");\n if (metricSet != null) {\n String cluster = null;\n\n if((metricSet.getEntityName().contains(\"VirtualMachine\")) || (metricSet.getEntityName().contains(\"HostSystem\"))){\n\n entityNameParsed = morefRetriever.parseEntityName(metricSet.getEntityName());\n\n if(entityNameParsed.equals(\"\")){\n logger.warn(\"Received Invalid Managed Entity. Failed to Continue.\");\n return;\n }\n cluster = String.valueOf(clusterMap.get(entityNameParsed.replace(\" \", \"_\")));\n if(cluster == null || cluster.equals(\"\")){\n logger.warn(\"Cluster Not Found for Entity \" + entityNameParsed.replace(\" \", \"_\"));\n return;\n }\n logger.debug(\"Cluster and Entity: \" + cluster + \" : \" + entityNameParsed.replace(\" \", \"_\"));\n }\n\n String instanceName = (this.rules.get(\"instanceName\") != null)? RuleUtils.applyRules(metricSet.getInstanceId(),this.rules.get(\"instanceName\")):metricSet.getInstanceId();\n \n if( ( this.globalInstance == true ) && ( instanceName == null || instanceName.isEmpty() ) )\n {\n instanceName = \"global\";\n }\n\n String statType=metricSet.getStatType();\n\n\n int interval=metricSet.getInterval();\n\n String rollup;\n String hostName = null;\n if(entityName.contains(\"[VirtualMachine]\")) {\n hostName = (this.rules.get(\"hostName\") != null)?RuleUtils.applyRules(entityNameParsed,this.rules.get(\"hostName\")):entityNameParsed;\n }\n\n String eName = Utils.getEName(this.use_entity_type_prefix, this.use_fqdn, entityName, entityNameParsed, this.rules.get(\"eName\"));\n logger.debug(\"Container Name :\" + morefRetriever.getContainerName(eName) + \" Interval: \"+Integer.toString(interval)+ \" Frequency :\"+Integer.toString(frequencyInSeconds));\n\n /*\n Finally node contains these fields (depending on properties)\n graphite_prefix.cluster.eName.groupName.instanceName.metricName_rollup_statType\n graphite_prefix.cluster.eName.groupName.instanceName.metricName_statType_rollup\n\n NOTES: if cluster is null cluster name disappears from node string.\n if instanceName is null instanceName name disappears from node string.\n */\n //Get group name (xxxx) metric name (yyyy) and rollup (zzzz)\n // from \"xxxx.yyyyyy.xxxxx\" on the metricName\n if(cluster != null) {\n cluster = (this.rules.get(\"cluster\") != null)?RuleUtils.applyRules(cluster,this.rules.get(\"cluster\")):cluster;\n\n }\n\n String[] counterInfo = Utils.splitCounterName(metricSet.getCounterName());\n String groupName = counterInfo[0];\n String metricName = counterInfo[1];\n rollup = counterInfo[2];\n\n Map<String,String> graphiteTree = new HashMap<String, String>();\n graphiteTree.put(\"graphite_prefix\", this.props.getProperty(\"prefix\"));\n graphiteTree.put(\"cluster\", cluster); //\n graphiteTree.put(\"eName\", eName); //\n graphiteTree.put(\"groupName\", groupName);\n graphiteTree.put(\"instanceName\", instanceName); //\n graphiteTree.put(\"metricName\", metricName);\n graphiteTree.put(\"statType\", statType);\n graphiteTree.put(\"rollup\", rollup);\n graphiteTree.put(\"counterName\", metricSet.getCounterName());\n graphiteTree.put(\"hostName\", hostName); //\n\n String node = Utils.getNode(graphiteTree, place_rollup_in_the_end, this.isHostMap, this.hostMap);\n\n metricsCount += metricSet.size();\n if(node != null) {\n if(this.instanceMetrics) {\n if(instanceName == null || instanceName.isEmpty()) {\n this.sendMetric(metricSet, node, rollup);\n }\n } else {\n this.sendMetric(metricSet, node, rollup);\n }\n }\n } else {\n logger.debug(\"MetricsReceiver MetricSet is NULL\");\n }\n } catch(Exception e){\n logger.fatal(\"Unexpected error occurred during metrics collection.\", e);\n }\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_stats_activity);\n\t\tgetWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n\n\t\tconnectionSettings = getSharedPreferences(AdminTools.CONN_PREFS_NAME,\n\t\t\t\tMODE_MULTI_PROCESS);\n\n\t\tLog.d(\"qwe\", \"StatsActivity.onCreate()\");\n\n\t\t// host = this.getIntent().getStringExtra(AdminTools.HOST);\n\t\t// port = this.getIntent().getIntExtra(AdminTools.PORT, 0);\n\t\t// key = this.getIntent().getStringExtra(AdminTools.KEY);\n\t\t// interval = this.getIntent().getIntExtra(AdminTools.INTERVAL, 1000);\n\n\t\thost = connectionSettings.getString(AdminTools.HOST, \"\");\n\t\tport = Integer.parseInt(connectionSettings.getString(AdminTools.PORT,\n\t\t\t\t\"\"));\n\t\tkey = connectionSettings.getString(AdminTools.KEY, \"\");\n\t\tinterval = connectionSettings.getInt(AdminTools.INTERVAL, 2000);\n\n\t\tserverInfo = (TextView) findViewById(R.id.textView_server_name);\n\t\tString serverName = host + \":\" + port;\n\t\tserverInfo.setText(serverName);\n\n\t\tlinearLayoutAlertsInternal = (LinearLayout) findViewById(R.id.linearLayout_alerts_internal);\n\t\tlinearLayoutAlertsBounding = (LinearLayout) findViewById(R.id.linearLayout_alerts);\n\n\t\tagentsArray = new AgentArrayAdapter(this);\n\t\t// longClickListener = new LongClickItemListener(this);\n\n\t\tlistView = (ListView) findViewById(R.id.listView_agents_data);\n\t\tlistView.setAdapter(agentsArray);\n\t\t// listView.setLongClickable(true);\n\t\t// listView.setOnItemLongClickListener(longClickListener);\n\n\t\tisServiceBinded = bindService(\n\t\t\t\tnew Intent(this, ConnectionService.class), this,\n\t\t\t\tContext.BIND_AUTO_CREATE);\n\n\t\tsetResult(RESULT_OK); // na wstępie zakładamy że jest ok\n\t}",
"@Override\n public String getEndPoint() {\n return \"/v1/json/schedule\";\n }",
"public ProfileService(String endpoint, int cacheSize) {\n \t\tsuper(endpoint, cacheSize);\n \t\tinitializeCache(cacheSize);\n \t}",
"public void authFailure(BundleDescriptor desc, Endpoint ep, Principal principal) {\n if (ep == null) {\n _logger.fine(\"Endpoint is null for \" + desc.getModuleID());\n return;\n }\n // get the endpoint's fully qualified name\n String fqn =WebServiceMgrBackEnd.getManager().getFullyQualifiedName(ep);\n if (fqn == null) {\n _logger.fine(\"Fully Qualified could not be computed for the selector \" +\n ep.getEndpointSelector());\n return;\n }\n\n WebServiceEndpointStatsProviderImpl impl = (\n WebServiceEndpointStatsProviderImpl) StatsProviderManager.\n getInstance().getEndpointStatsProvider(fqn);\n \n // set auth failure time stamp\n if (impl != null) {\n impl.setAuthFailure(System.currentTimeMillis());\n }\n try {\n ConfigProvider cfgProv = ConfigFactory.getConfigFactory().getConfigProvider();\n if (cfgProv != null) {\n WebServiceConfig wsc = cfgProv.getWebServiceConfig(fqn);\n if ((wsc == null) || (wsc.getMonitoringLevel() == null) \n || (wsc.getMonitoringLevel().equals(\"OFF\"))) {\n // in this case, there wont be any stats \n _logger.fine(\"Monitoring is OFF for webservice endpoint \" +\n fqn);\n return;\n }\n }\n // get its corresponding stats provider\n if (impl == null) {\n if (cfgProv != null) {\n String msg = _stringMgr.getString(\"Auth.StatsNotReg\", fqn);\n throw new RuntimeException(msg);\n }\n return;\n }\n } catch (Exception e) {\n _logger.fine(\"Config provider could not be initialized \" +\n e.getMessage());\n }\n \n\n /** enable the following code, once bug# 6418025 is fixed.\n ** Need a way to HTTP headers and client host information.\n ** SOAPMessageContext needed to be passed to this method.\n **\n // create empty message trace for this element\n List l =\n FilterRegistry.getInstance().getFilters(Filter.POST_PROCESS_RESPONSE,\n fqn); \n Iterator itr = l.iterator();\n while (itr.hasNext()) {\n Object o = itr.next();\n if (o instanceof MessageFilter) {\n MessageTraceImpl m = new MessageTraceImpl(\n new Integer(GlobalMessageListenerImpl.newSequenceNumber())\n .toString());\n m.setRequestSize(0);\n m.setResponseSize(0);\n m.setRequestContent(null);\n m.setResponseContent(null);\n //m.setTransportType();\n //m.setHTTPRequestHeaders();\n //m.setHTTPResponseHeaders();\n //m.setClientHost();\n // Setting principal name to principal.getName() causing issues\n m.setPrincipalName(null);\n m.setResponseTime(0);\n m.setFaultCode(\"999\");\n m.setFaultString(null);\n m.setFaultActor(null);\n m.setTimeStamp(System.currentTimeMillis());\n //m.setCallFlowEnabled(false);\n m.setEndpointName(fqn);\n m.setApplicationID(null);\n\n ((MessageFilter)o)._handler.addMessage(m);\n return;\n }\n }\n */\n }",
"public ServerInfo(String urlEndPoint, Store store, Crypto crypto)\n {\n\tthis.urlEndPoint = urlEndPoint;\n\tthis.store = store;\n\tthis.crypto = crypto;\n }",
"@Override\n public String toString() {\n return endpoint;\n }",
"protected void setup() {\n\t\t\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\t\t\tdfd.setName(getAID());\n\t\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\t\tsd.setType(\"wHOST\");\n\t\t\t\t\tsd.setName(\"wumpus-host-\" + Math.random());\n\t\t\t\t\tdfd.addServices(sd);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDFService.register(this, dfd);\n\t\t\t\t\t\thostMap = new WumpusMapHost();\n\t\t\t\t\t\tSystem.out.println(\"Registered as a host in the DF Service.\");\n\t\t\t\t\t\tlogic = new WumpusLogic();\n\t\t\t\t\t\tlogic.setHostMap(hostMap.getMap());\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\tcatch (FIPAException fe) {\n\t\t\t\t\t\tfe.printStackTrace();\n\t\t\t\t\t}\n\t\t\n\t\t// Printing out a message stating that the agent is ready for service.\n\t\tSystem.out.println(\"Wumpus host \"+getAID().getName()+\" is ready.\");\n\t\t\n\t\taddBehaviour(new TickerBehaviour(this, 1000) {\n\t\t\tprotected void onTick() {\n\t\t\t\tmyAgent.addBehaviour(new HandleRequest());\n\t\t\t}\n\t\t});\n\t \t\n\t\t\n\t}",
"@Override\n public void onContextCreated() {\n HeartbeatJob.updateBinaryServiceClusterChanges(serversService);\n registersHeartbeatJob();\n registerCallHomeJob();\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 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 }",
"private void initRoutes() {\n if (MODUM_TOKENAPP_ENABLE_CORS) {\n options(\"/*\", (request, response) -> {\n String accessControlRequestHeaders = request.headers(\"Access-Control-Request-Headers\");\n if (accessControlRequestHeaders != null) {\n response.header(\"Access-Control-Allow-Headers\", accessControlRequestHeaders);\n }\n\n String accessControlRequestMethod = request.headers(\"Access-Control-Request-Method\");\n if (accessControlRequestMethod != null) {\n response.header(\"Access-Control-Allow-Methods\", accessControlRequestMethod);\n }\n\n return \"OK\";\n });\n }\n\n get(\"/\", (req, res) -> {\n if (MODUM_TOKENAPP_ENABLE_CORS) {\n res.header(\"Access-Control-Allow-Origin\", \"*\");\n res.header(\"Access-Control-Request-Method\", \"*\");\n res.header(\"Access-Control-Allow-Headers\", \"*\");\n }\n return getTotalRaisedUSD().toString();\n });\n }",
"@Setup(Level.Trial)\n public void setupGraph() {\n initializeMethod();\n prepareRequest();\n emitFrontEnd();\n }",
"@Setup(Level.Trial)\n public void setupGraph() {\n initializeMethod();\n prepareRequest();\n emitFrontEnd();\n }",
"@Setup(Level.Trial)\n public void setupGraph() {\n initializeMethod();\n prepareRequest();\n emitFrontEnd();\n }",
"@Scheduled(fixedRate = 3600_000, initialDelay = 3600_000)\n public static void showAllStatsJob() {\n showStats(allStats, \"All stats\");\n }",
"public void increaseEndpointHitFrequency(String endpoint) {\n if (!endpointVisitFrequency.containsKey(endpoint)) {\n throw new IllegalArgumentException(\"Frequency increasing method: Endpoint does not exist\");\n }\n endpointVisitFrequency.put(endpoint, endpointVisitFrequency.get(endpoint) + 1);\n }",
"private void applicationHealthHandler(RoutingContext routingContext) {\n HttpServerResponse httpServerResponse = routingContext.response();\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(\"myRetailApplication is up and running\");\n }",
"private void configureServerInstance() {\n final String myUrl = \"http://68.71.213.88/pepinstances/json\";\n final HttpClient client = HttpClientBuilder.create().build();\n final HttpPost httpPost = new HttpPost(myUrl);\n\n httpPost.addHeader(\"Connection\", \"keep-alive\");\n httpPost.addHeader(\"X-Conversation-Id\", \"BeepBeep123456\");\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n httpPost.addHeader(\"X-API-Version\", \"1\");\n httpPost.addHeader(\"Accept\", \"application/json;apiversion=1\");\n httpPost.addHeader(\"Authorization\", \"BEARER \" + token);\n httpPost.addHeader(\"X-Disney-Internal-PoolOverride-WDPROAPI\",\n \"XXXXXXXXXXXXXXXXXXXXXXXXX\");\n\n final String bodyRequest = \"\";\n HttpEntity entity;\n try {\n entity = new ByteArrayEntity(bodyRequest.getBytes(\"UTF-8\"));\n httpPost.setEntity(entity);\n\n final HttpResponse response = client.execute(httpPost);\n final HttpEntity eResponse = response.getEntity();\n final String responseBody = EntityUtils.toString(eResponse);\n final JSONObject lampStack = new JSONObject(responseBody)\n .getJSONObject(\"LAMPSTACK\");\n if (lampStack.getString(\"LIVE INSTANCE\").equals(\"A\")) {\n setServerInstance(\"A\");\n } else if (lampStack.getString(\"LIVE INSTANCE\").equals(\"B\")) {\n setServerInstance(\"B\");\n } else {\n setServerInstance(\"B\");\n }\n\n } catch (final Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"public TomcatWebConnectorStatsImpl() {\n requestTime = new TimeStatisticImpl(\"Request Time\", StatisticImpl.UNIT_TIME_MILLISECOND,\n \"The time to process all requests\");\n activeRequestCount = new CountStatisticImpl(\"Active Request Count\", StatisticImpl.UNIT_COUNT,\n \"currently active requests \", 0);\n errorCount = new CountStatisticImpl(\"Error Count\", StatisticImpl.UNIT_COUNT,\n \"The numbet of Errors during the observed period\", 0);\n bytesSentCount = new CountStatisticImpl(\"Bytes Sent\", StatisticImpl.UNIT_COUNT,\n \"The number of bytes sent during the observerd period\", 0);\n bytesReceivedCount = new CountStatisticImpl(\"Bytes Received\", StatisticImpl.UNIT_COUNT,\n \"The number of bytes received during the observerd period\", 0);\n openConnectionCount = new RangeStatisticImpl(\"\" + \"Open Connections\", StatisticImpl.UNIT_COUNT,\n \"Range for connections opened during the observed period\", 0); // all 0's\n busyThreads = new BoundedRangeStatisticImpl(\"Busy Threads\", StatisticImpl.UNIT_COUNT,\n \"BoundedRange for Threads currently busy serving requests\", 0, 0, 0);\n addStat(\"RequestTime\", requestTime); // better name\n addStat(\"activeRequestCount\", activeRequestCount);\n addStat(\"errorCount\", errorCount);\n addStat(\"bytesSent\", bytesSentCount);\n addStat(\"bytesReceived\", bytesReceivedCount);\n addStat(\"openConnectionCount\", openConnectionCount);\n addStat(\"busyThreads\", busyThreads);\n }",
"@RequestMapping(value = \"/endpoint_managerd\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManagerDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, true));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }",
"@Test public void adminEndpoints() throws Exception {\n try {\n // Documented as supported in our zipkin-server/README.md\n assertThat(get(\"/health\").isSuccessful()).isTrue();\n assertThat(get(\"/info\").isSuccessful()).isTrue();\n assertThat(get(\"/metrics\").isSuccessful()).isTrue();\n assertThat(get(\"/prometheus\").isSuccessful()).isTrue();\n\n // Check endpoints we formerly redirected to. Note we never redirected to /actuator/metrics\n assertThat(get(\"/actuator/health\").isSuccessful()).isTrue();\n assertThat(get(\"/actuator/info\").isSuccessful()).isTrue();\n assertThat(get(\"/actuator/prometheus\").isSuccessful()).isTrue();\n } catch (RuntimeException | IOException e) {\n fail(String.format(\"unexpected error!%s%n%s\", e.getMessage(), zipkin.consoleOutput()));\n }\n }",
"public String getEndpoint() {\n return this.endpoint;\n }",
"public String getEndpoint() {\n return this.endpoint;\n }",
"@GetMapping(PRODUCT_HEALTH_CHECK)\n public String index() {\n return serviceName + \", system time: \" + System.currentTimeMillis();\n }",
"@Before\n \tpublic static void setup() {\n \t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/RawService.wsdl\";\n \t\trenderArgs.put(\"wsdl\", location);\n \t}",
"public ProfileService(String endpoint, int cacheSize) {\n\t\tsuper(endpoint, cacheSize);\n\t}",
"public static void initializeHandler() {\n\t\t\n\t\t//Check not already initialized\n\t\tif(cepRT == null) {\n\t\t\t\n\t\t\t//The Configuration is meant only as an initialization-time object.\n\t\t Configuration cepConfig = new Configuration();\n\t\t \n\t\t /*\n\t\t * Basic EVENTS\n\t\t */\n\t\t addEventTypes(cepConfig);\n\t\t \n\t\t // We setup the engine\n\t\t EPServiceProvider cep = EPServiceProviderManager.getProvider(\"myCEPEngine\", cepConfig);\n\t\t \n\t\t cepRT = cep.getEPRuntime();\n\t\t cepAdm = cep.getEPAdministrator();\n\t\t \n\t\t /*\n\t\t * Additional EVENTS\n\t\t */\n\t\t EsperStatements.defineAnomalyEvents(cepAdm);\n\t\t EsperStatements.defineSystemEvents(cepAdm);\n\t\t \n\t\t /*\n\t\t * TABLES and NAMED WINDOWS\n\t\t */\n\t\t // TRACES WINDOW (traceId PK)\n\t\t EsperStatements.defineTracesWindow(cepAdm, retentionTime);\n\t\t // PROCESSES TABLE (hashProcess PK, process)\n\t\t EsperStatements.defineProcessesTable(cepAdm);\n\t\t // SPANS WINDOW (span, hashProcess, serviceName)\n\t\t EsperStatements.defineSpansWindow(cepAdm, retentionTime);\n\t\t // DEPENDENCIES WINDOW (traceIdHexFrom, spanIdFrom, traceIdHexTo, spanIdTo)\n\t\t EsperStatements.defineDependenciesWindow(cepAdm, retentionTime);\n\t\t \n\t\t // MEAN DURATION PER OPERATION TABLE (serviceName PK, operationName PK, meanDuration, m2, counter)\n\t\t //Welford's Online algorithm to compute running mean and variance\n\t\t EsperStatements.defineMeanDurationPerOperationTable(cepAdm);\n\t//\t EsperStatements.defineMeanDurationPerOperationTableResetCounter(cepAdm, 1000);\n\t\t \n\t\t //TRACES TO BE SAMPLED WINDOW (traceId)\n\t\t EsperStatements.defineTracesToBeSampledWindow(cepAdm, retentionTime);\n\t\t \n\t\t /*\n\t\t * STATEMENTS\n\t\t */\n\t//\t EsperStatements.gaugeRequestsPerHostname(cepAdm, retentionTime);\n\t//\t EsperStatements.errorLogs(cepAdm);\n\t\t \n\t//\t EsperStatements.topKOperationDuration(cepAdm, \"10\");\n\t//\t EsperStatements.perCustomerDuration(cepAdm);\n\t\t \n\t\t // RESOURCE USAGE ATTRIBUTION\n\t\t // CE -> Contained Event Selection\n\t//\t EsperStatements.resourceUsageCustomerCE(cepAdm, retentionTime);\n\t//\t EsperStatements.resourceUsageCustomer(cepAdm, retentionTime);\n\t//\t EsperStatements.resourceUsageSessionCE(cepAdm, retentionTime);\n\t//\t EsperStatements.resourceUsageSession(cepAdm, retentionTime);\n\t\t \n\t\t // ANOMALIES DETECTION\n\t\t // Three-sigma rule to detect anomalies (info https://en.wikipedia.org/wiki/68–95–99.7_rule)\n\t\t EsperStatements.highLatencies(cepAdm);\n\t\t EsperStatements.reportHighLatencies(cepAdm, \"./anomalies.csv\");\n\t\t EsperStatements.insertProcessCPUHigherThan80(cepAdm);\n\t\t \n\t\t // TAIL SAMPLING\n\t\t EsperStatements.tailSampling(cepAdm, \"./sampled.txt\"); \n\t\t \n\t\t //PATTERN\n\t\t EsperStatements.anomalyAfterCommit(cepAdm, \"15min\");\n\t\t EsperStatements.highCPUandHighLatencySameHost(cepAdm, \"10sec\");\n\t\t \n\t\t /*\n\t\t * EVENTS\n\t\t */\n\t\t EsperStatements.insertCommitEvents(cepAdm); \n\t\t EsperStatements.systemEvents(cepAdm);\n\t\t \n\t\t /*\n\t\t * DEBUG socket\n\t\t */\n\t\t EsperStatements.debugStatements(cepAdm);\n\t\t \n\t\t /*\n\t\t * START API\n\t\t */\n\t\t Thread APIThread = new Thread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tKaijuAPI.initAPI();\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t \n\t\t APIThread.run();\n\t\t}\n\t \n\t}",
"public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n this.mServerList = new ArrayList<>();\n this.mServerList.add(NetworkDiagnosticsUtils.getCaptivePortalServer(this));\n this.mServerList.add(NetworkDiagnosticsUtils.getDefaultCaptivePortalServer());\n this.mNetworkUri = Uri.parse(URI_NA_TRAFFIC_STATS);\n mNetworkDiagnosticsManager = NetworkDiagnosticsManager.getInstance(this.mAppContext);\n initView();\n registerConnectionReceiver();\n registerSignalStrengthListener();\n }",
"private void startServer(String ip, int port, String contentFolder) throws IOException{\n HttpServer server = HttpServer.create(new InetSocketAddress(ip, port), 0);\n \n //Making / the root directory of the webserver\n server.createContext(\"/\", new Handler(contentFolder));\n //Making /log a dynamic page that uses LogHandler\n server.createContext(\"/log\", new LogHandler());\n //Making /online a dynamic page that uses OnlineUsersHandler\n server.createContext(\"/online\", new OnlineUsersHandler());\n server.setExecutor(null);\n server.start();\n \n //Needing loggin info here!\n }",
"private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}",
"public Builder url(URI endpoint) {\n return server(endpoint);\n }",
"public static void main(String[] args) {\n\t\tfor (int i = 0; i < 3; i++)\n\t\t\tcreateEndpoint(Webhook.startingDestinationsPort + i);\n\t}",
"@Override\n public void run() {\n CuratorLocker locker = new CuratorLocker(schedulerBuilder.getServiceSpec());\n\n Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n LOGGER.info(\"Shutdown initiated, releasing curator lock\");\n locker.unlock();\n }));\n locker.lock();\n\n SchedulerConfig schedulerConfig = SchedulerConfig.fromEnv();\n Metrics.configureStatsd(schedulerConfig);\n AbstractScheduler scheduler = schedulerBuilder.build();\n scheduler.start();\n Optional<Scheduler> mesosScheduler = scheduler.getMesosScheduler();\n if (mesosScheduler.isPresent()) {\n SchedulerApiServer apiServer = new SchedulerApiServer(schedulerConfig, scheduler.getResources());\n apiServer.start(new AbstractLifeCycle.AbstractLifeCycleListener() {\n @Override\n public void lifeCycleStarted(LifeCycle event) {\n scheduler.markApiServerStarted();\n }\n });\n\n runScheduler(\n scheduler.frameworkInfo,\n mesosScheduler.get(),\n schedulerBuilder.getServiceSpec(),\n schedulerBuilder.getSchedulerConfig(),\n schedulerBuilder.getStateStore());\n } else {\n /**\n * If no MesosScheduler is provided this scheduler has been deregistered and should report itself healthy\n * and provide an empty COMPLETE deploy plan so it may complete its UNINSTALL.\n *\n * See {@link UninstallScheduler#getMesosScheduler()}.\n */\n Plan emptyDeployPlan = new Plan() {\n @Override\n public List<Phase> getChildren() {\n return Collections.emptyList();\n }\n\n @Override\n public Strategy<Phase> getStrategy() {\n return new SerialStrategy<>();\n }\n\n @Override\n public UUID getId() {\n return UUID.randomUUID();\n }\n\n @Override\n public String getName() {\n return Constants.DEPLOY_PLAN_NAME;\n }\n\n @Override\n public List<String> getErrors() {\n return Collections.emptyList();\n }\n };\n\n PlanManager emptyPlanManager = DefaultPlanManager.createProceeding(emptyDeployPlan);\n PlansResource emptyPlanResource = new PlansResource();\n emptyPlanResource.setPlanManagers(Arrays.asList(emptyPlanManager));\n\n schedulerBuilder.getStateStore().clearAllData();\n\n SchedulerApiServer apiServer = new SchedulerApiServer(\n schedulerConfig,\n Arrays.asList(\n emptyPlanResource,\n new HealthResource()));\n apiServer.start(new AbstractLifeCycle.AbstractLifeCycleListener() {\n @Override\n public void lifeCycleStarted(LifeCycle event) {\n LOGGER.info(\"Started trivially healthy API server.\");\n }\n });\n }\n }",
"@Override\n public void onEndpointDiscovered(String id, String name) {\n Log.d(TAG, \"endpoint discovered: \" + id + \" \" + name);\n }"
] |
[
"0.6042301",
"0.57996017",
"0.5741895",
"0.564135",
"0.5599702",
"0.5587448",
"0.5522214",
"0.5517727",
"0.55134404",
"0.54471284",
"0.5395681",
"0.535385",
"0.5331241",
"0.5330857",
"0.53162086",
"0.5285752",
"0.52338976",
"0.52270496",
"0.5209987",
"0.5204196",
"0.5189872",
"0.51797223",
"0.51721483",
"0.5160092",
"0.5160092",
"0.5151561",
"0.5144154",
"0.5136128",
"0.5123297",
"0.51188207",
"0.5111563",
"0.5109447",
"0.50863653",
"0.5071432",
"0.5037907",
"0.502978",
"0.5020525",
"0.501698",
"0.5014382",
"0.5006617",
"0.5005348",
"0.5002848",
"0.50016445",
"0.4995575",
"0.49950227",
"0.49922192",
"0.49901974",
"0.49850217",
"0.49846163",
"0.49830347",
"0.49820215",
"0.49791425",
"0.49787694",
"0.4977733",
"0.4975147",
"0.49719626",
"0.49705175",
"0.496156",
"0.49592713",
"0.4952854",
"0.4932486",
"0.49303573",
"0.4929409",
"0.4928526",
"0.49272192",
"0.49171647",
"0.49137822",
"0.48979542",
"0.48920122",
"0.48913938",
"0.48913756",
"0.48912",
"0.4891182",
"0.4888027",
"0.48876145",
"0.48829988",
"0.48799986",
"0.48787627",
"0.48787627",
"0.48787627",
"0.48760107",
"0.48739982",
"0.48717284",
"0.4870476",
"0.48700097",
"0.48604748",
"0.4858173",
"0.48556152",
"0.48556152",
"0.48468778",
"0.4844799",
"0.4842165",
"0.4840725",
"0.4826048",
"0.48241317",
"0.48229158",
"0.48216566",
"0.4821498",
"0.48119882",
"0.48078448"
] |
0.7679129
|
0
|
Sets up the endpoint that displays the logs
|
public void setupLoggingEndpoint() {
HttpHandler handler = (httpExchange) -> {
httpExchange.getResponseHeaders().add("Content-Type", "text/html; charset=UTF-8");
httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());
OutputStream out = httpExchange.getResponseBody();
out.write(serverLogsArray.toJSONString().getBytes());
out.close();
};
this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));
this.setHandler(this.getLoggingApiEndpoint(), handler);
System.out.println("Set handler for logging");
this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setupStatsEndpoint() {\n HttpHandler handler =\n (httpExchange) -> {\n this.increaseEndpointHitFrequency(this.getStatsApiEndpoint());\n StringBuilder response = new StringBuilder();\n Set<Map.Entry<String, Integer>> frequencySet = this.getEndpointFrequencyEntrySet();\n for (Map.Entry<String, Integer> entry : frequencySet) {\n response\n .append(entry.getKey())\n .append(\":\")\n .append(entry.getValue())\n .append(System.getProperty(\"line.separator\"));\n }\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, response.length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(response.toString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.statsApiEndpoint, this.server.createContext(this.statsApiEndpoint));\n this.setHandler(this.getStatsApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.statsApiEndpoint, 0);\n }",
"public void viewLogs() {\n\t}",
"void initializeLogging();",
"private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }",
"private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}",
"private Logger configureLogging() {\r\n\t Logger rootLogger = Logger.getLogger(\"\");\r\n\t rootLogger.setLevel(Level.FINEST);\r\n\r\n\t // By default there is one handler: the console\r\n\t Handler[] defaultHandlers = Logger.getLogger(\"\").getHandlers();\r\n\t defaultHandlers[0].setLevel(Level.CONFIG);\r\n\r\n\t // Add our logger\r\n\t Logger ourLogger = Logger.getLogger(serviceLocator.getAPP_NAME());\r\n\t ourLogger.setLevel(Level.FINEST);\r\n\t \r\n\t // Add a file handler, putting the rotating files in the tmp directory \r\n\t // \"%u\" a unique number to resolve conflicts, \"%g\" the generation number to distinguish rotated logs \r\n\t try {\r\n\t Handler logHandler = new FileHandler(\"/%h\"+serviceLocator.getAPP_NAME() + \"_%u\" + \"_%g\" + \".log\",\r\n\t 1000000, 3);\r\n\t logHandler.setLevel(Level.FINEST);\r\n\t ourLogger.addHandler(logHandler);\r\n\t logHandler.setFormatter(new Formatter() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String format(LogRecord record) {\r\n\t\t\t\t\t\tString result=\"\";\r\n\t\t\t\t\t\tif(record.getLevel().intValue() >= Level.WARNING.intValue()){\r\n\t\t\t\t\t\t\tresult += \"ATTENTION!: \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MMM-yyyy HH:mm:ss\");\r\n\t\t\t\t\t\tDate d = new Date(record.getMillis());\r\n\t\t\t\t\t\tresult += df.format(d)+\" \";\r\n\t\t\t\t\t\tresult += \"[\"+record.getLevel()+\"] \";\r\n\t\t\t\t\t\tresult += this.formatMessage(record);\r\n\t\t\t\t\t\tresult += \"\\r\\n\";\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t } catch (Exception e) { // If we are unable to create log files\r\n\t throw new RuntimeException(\"Unable to initialize log files: \"\r\n\t + e.toString());\r\n\t }\r\n\r\n\t return ourLogger;\r\n\t }",
"public Logs() {\n initComponents();\n }",
"public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"static public void setup() throws IOException {\n Logger logger = Logger.getLogger(\"\");\n\n logger.setLevel(Level.INFO);\n Calendar cal = Calendar.getInstance();\n //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String dateStr = sdf.format(cal.getTime());\n fileTxt = new FileHandler(\"log_\" + dateStr + \".txt\");\n fileHTML = new FileHandler(\"log_\" + dateStr + \".html\");\n\n // Create txt Formatter\n formatterTxt = new SimpleFormatter();\n fileTxt.setFormatter(formatterTxt);\n logger.addHandler(fileTxt);\n\n // Create HTML Formatter\n formatterHTML = new LogHTMLFormatter();\n fileHTML.setFormatter(formatterHTML);\n logger.addHandler(fileHTML);\n }",
"public HtShowDetailedLog() {\n\t}",
"public static void main(String[] args){ \r\n\t\t /* PropertyConfigurator.configure(\"application.properties\");\r\n\t\t log.debug(\"Hello this is a debug message\"); \r\n\t log.info(\"Hello this is an info message\"); \r\n\t System.out.println(\"Hi..Cool\");\r\n\t URLTest u=new URLTest();\r\n\t u.sendGET();*/\r\n\t\t\r\n\t\t System.out.println(\"Hi..IMI\");\r\n\t }",
"@GetMapping(\"/log-test\")\n public String logTest(){\n String name = \"Spring\";\n // System.out.println(\"name = \" + name);\n\n // 로그 레벨 낮은 레벨 --> 높은 레벨\n log.trace(\"trace log={}\", name);\n log.debug(\"debug log={}\", name);\n log.info(\"info log={}\", name);\n log.warn(\"warn log={}\", name);\n log.error(\"error log={}\", name);\n return \"ok\";\n }",
"void setupFileLogging();",
"public static void setUp() {\n Handler handler = new LoggerHandler();\n handler.setFormatter(new SimpleFormatter());\n getInstance().addHandler(handler);\n }",
"@Override\n public void onStartup() {\n if(jaegerConfig.isEnabled()) {\n Configuration.SamplerConfiguration samplerConfig = new Configuration.SamplerConfiguration().withType(jaegerConfig.getType()).withParam(jaegerConfig.getParam());\n Configuration.ReporterConfiguration reporterConfig = new Configuration.ReporterConfiguration().withLogSpans(true);\n tracer = new Configuration(serverConfig.getServiceId()).withSampler(samplerConfig).withReporter(reporterConfig).getTracer();\n }\n }",
"public void configureRoutes() {\n Service http = Service.ignite();\n\n http.port( 6001 );\n\n http.after( ( (request, response) -> response.type(\"application/json\" ) ) );\n\n http.post( \"/accounts/authenticate\", this.authRoutes.authenticate );\n http.post( \"/restaurants/authenticate\", this.authRoutes.authenticateRestaurant );\n\n http.post( \"*\", (req, res) -> {\n res.status( HttpStatus.NOT_FOUND_404 );\n\n return \"{}\";\n } );\n }",
"public static void loadEndpoints(){\n\t\tStart.loadEndpoints();\n\t\t//add\t\t\n\t\t//e.g.: get(\"/my-endpoint\", (request, response) ->\t\tmyEndpointGet(request, response));\n\t\t//e.g.: post(\"/my-endpoint\", (request, response) ->\t\tmyEndpointPost(request, response));\n\t}",
"@Override\n protected void onStart() {\n super.onStart();\n initializeLogging();\n }",
"@RequestMapping(\"/\")\n String hello(){\n logger.debug(\"Debug message\");\n logger.info(\"Info message\");\n logger.warn(\"Warn message\");\n logger.error(\"Error message\");\n return \"Done\";\n }",
"void initializeLogging(String loggingProperties);",
"public EmployeeServlet()\n {\n logger = Logger.getLogger(getClass().getName());\n }",
"@Override\n public void logs() {\n \n }",
"public EchoServlet()\n {\n super();\n\n // Create a logging instance\n this.log = Logger.getLogger(EchoServlet.class.getName());\n\n log.info(\"Constructed new EchoServlet\");\n }",
"private static void setupLogger() {\n\t\tLogManager.getLogManager().reset();\n\t\t// set the level of logging.\n\t\tlogger.setLevel(Level.ALL);\n\t\t// Create a new Handler for console.\n\t\tConsoleHandler consHandler = new ConsoleHandler();\n\t\tconsHandler.setLevel(Level.SEVERE);\n\t\tlogger.addHandler(consHandler);\n\n\t\ttry {\n\t\t\t// Create a new Handler for file.\n\t\t\tFileHandler fHandler = new FileHandler(\"HQlogger.log\");\n\t\t\tfHandler.setFormatter(new SimpleFormatter());\n\t\t\t// set level of logging\n\t\t\tfHandler.setLevel(Level.FINEST);\n\t\t\tlogger.addHandler(fHandler);\n\t\t}catch(IOException e) {\n\t\t\tlogger.log(Level.SEVERE, \"File logger not working! \", e);\n\t\t}\n\t}",
"private void initLog() {\n _logsList = (ListView) findViewById(R.id.lv_log);\n setupLogger();\n }",
"@BeforeClass\n\tpublic void setup() {\n\t\tlogger = Logger.getLogger(\"AveroRestAPI\");\n\t\tPropertyConfigurator.configure(\"Log4j.properties\");\n\t\tlogger.setLevel(Level.DEBUG);\n\n\t}",
"public 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}",
"private void setupLogging() {\n\t\t// Ensure all JDK log messages are deferred until a target is registered\n\t\tLogger rootLogger = Logger.getLogger(\"\");\n\t\tHandlerUtils.wrapWithDeferredLogHandler(rootLogger, Level.SEVERE);\n\n\t\t// Set a suitable priority level on Spring Framework log messages\n\t\tLogger sfwLogger = Logger.getLogger(\"org.springframework\");\n\t\tsfwLogger.setLevel(Level.WARNING);\n\n\t\t// Set a suitable priority level on Roo log messages\n\t\t// (see ROO-539 and HandlerUtils.getLogger(Class))\n\t\tLogger rooLogger = Logger.getLogger(\"org.springframework.shell\");\n\t\trooLogger.setLevel(Level.FINE);\n\t}",
"@Override\n public void configure() throws Exception {\n restConfiguration()\n .component(\"netty-http\")\n .host(\"0.0.0.0\")\n .port(8099);\n\n rest()\n .post(\"/webhook\")\n .route()\n .setBody(constant(\"{\\\"ok\\\": true}\"))\n .endRest()\n .post(\"/slack/api/conversations.list\")\n .route()\n .setBody(constant(\n \"{\\\"ok\\\":true,\\\"channels\\\":[{\\\"id\\\":\\\"ABC12345\\\",\\\"name\\\":\\\"general\\\",\\\"is_channel\\\":true,\\\"created\\\":1571904169}]}\"))\n .endRest()\n .post(\"/slack/api/conversations.history\")\n .route()\n .setBody(constant(\n \"{\\\"ok\\\":true,\\\"messages\\\":[{\\\"type\\\":\\\"message\\\",\\\"subtype\\\":\\\"bot_message\\\",\\\"text\\\":\\\"Hello Camel Quarkus Slack\\\"\"\n + \",\\\"ts\\\":\\\"1571912155.001300\\\",\\\"bot_id\\\":\\\"ABC12345C\\\"}],\\\"has_more\\\":true\"\n + \",\\\"channel_actions_ts\\\":null,\\\"channel_actions_count\\\":0}\"));\n }",
"private void setupEndpoints() {\n\t\tpost(API_CONTEXT + \"/users\", \"application/json\", (request, response) -> {\n\t\t\t//response.status(201);\n\t\t\treturn userService.createNewUser(request.body());\n\t\t}, new JsonTransformer());\n\t\t\n\t\tpost(API_CONTEXT + \"/login\", \"application/json\", (request, response) -> {\n\t\t\t//response.status(201);\n\t\t\treturn userService.find(request.body());\n\t\t}, new JsonTransformer());\n\t\t\n\t\tput(API_CONTEXT + \"/users\", \"application/json\", (request, response)\n\t\t\t\t-> userService.update(request.body()), new JsonTransformer());\n\t\t\n\t\tdelete(API_CONTEXT + \"/users/:email\", \"application/json\", (request, response)\n\t\t\t\t-> userService.deleteUser(request.params(\":email\")), new JsonTransformer());\n\n\t}",
"@Override\n public EndPointResponseDTO getEndPointLog() {\n\n //getting all called apis\n List<Logger> loggers = loggerRepository.findAll();\n List<EndPointLoggerDTO> endPointLoggerDTOs;\n ModelMapper modelMapper = new ModelMapper();\n\n //decoding header and bodies, mapping o dto class\n endPointLoggerDTOs = loggers.stream().map(n -> {\n n.setHeader(getDecod(n.getHeader()));\n n.setBody(getDecod(n.getBody()));\n return modelMapper.map(n, EndPointLoggerDTO.class);\n }).collect(Collectors.toList());\n\n //wrapping dto to response object\n EndPointResponseDTO endPointResponseDTO = new EndPointResponseDTO();\n endPointResponseDTO.setCount(endPointLoggerDTOs.size()/2);\n endPointResponseDTO.setEndPointLoggerDTOList(endPointLoggerDTOs);\n\n return endPointResponseDTO;\n }",
"@Override\n\tpublic void onApplicationEvent(ContextRefreshedEvent event) {\n\t\tlogger.info(\"XD Home: \" + environment.resolvePlaceholders(\"${XD_HOME}\"));\n\t\tlogger.info(\"Transport: \" + environment.resolvePlaceholders(\"${XD_TRANSPORT}\"));\n\t\tlogHadoopDistro();\n\t\tlogConfigLocations();\n\t\tif (isContainer) {\n\t\t\tlogContainerInfo();\n\t\t}\n\t\telse {\n\t\t\tlogAdminUI();\n\t\t}\n\t\tlogZkConnectString();\n\t\tlogZkNamespace();\n\t\tlogger.info(\"Analytics: \" + environment.resolvePlaceholders(\"${XD_ANALYTICS}\"));\n\t\tif (\"true\".equals(environment.getProperty(\"verbose\"))) {\n\t\t\tlogAllProperties();\n\t\t}\n\t}",
"@Override\n\tpublic void configure() {\n\t final SlackComponent slackComponent = (SlackComponent) this.getContext().getComponent(\"slack\");\n\t // set the webhook URL\n\t slackComponent.setWebhookUrl(\"https://hooks.slack.com/services/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\");\n\t\t\n\t\tfrom(from)\n\t\t.routeId(routeId)\n\t\t.setHeader(\"applicationId\", constant(applicationId))\n .process(processor)\n\t\t.to(toUris)\n\t\t.tracing(tracing)\n\t\t.log(log);\n\t}",
"@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }",
"public LogPoster() {\n\t\t\n\t}",
"private void configureRoutesAndExceptions() {\n\n }",
"@Test public void adminEndpoints() throws Exception {\n try {\n // Documented as supported in our zipkin-server/README.md\n assertThat(get(\"/health\").isSuccessful()).isTrue();\n assertThat(get(\"/info\").isSuccessful()).isTrue();\n assertThat(get(\"/metrics\").isSuccessful()).isTrue();\n assertThat(get(\"/prometheus\").isSuccessful()).isTrue();\n\n // Check endpoints we formerly redirected to. Note we never redirected to /actuator/metrics\n assertThat(get(\"/actuator/health\").isSuccessful()).isTrue();\n assertThat(get(\"/actuator/info\").isSuccessful()).isTrue();\n assertThat(get(\"/actuator/prometheus\").isSuccessful()).isTrue();\n } catch (RuntimeException | IOException e) {\n fail(String.format(\"unexpected error!%s%n%s\", e.getMessage(), zipkin.consoleOutput()));\n }\n }",
"@Before\n\tpublic static void setup() {\n\t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/MonitoringService\";\n\t\trenderArgs.put(\"location\", location);\n\t}",
"public static void main(String[] args) throws Exception {\n \n// // Log actions into a text file\n// String currentDirectory = System.getProperty(\"user.dir\");\n// String configurationFilename = \"logging.properties\";\n// String configFilePath = currentDirectory + \"/\" + configurationFilename;\n// try {\n// FileInputStream config = new FileInputStream(configFilePath);\n// LogManager.getLogManager().readConfiguration(config);\n// String logFilename = System.getProperty(\"user.home\") + \"/.ihale/log.txt\";\n// // Allow appending to the logging file.\n// Handler fh = new FileHandler(logFilename, true);\n// Logger.getLogger(\"\").setLevel(Level.OFF);\n// Logger.getLogger(\"\").addHandler(fh);\n// }\n// catch (IOException ioe) {\n// // CheckStyle was complaining about use of tabs when there wasn't so this long string is\n// // placed into a String variable to comply with the warning.\n// System.out.println(\"Error, logging properties file not found at \" + configFilePath);\n// System.out.println(\"Log messages will be appended to the console\");\n// }\n \n Server server = new Server(port);\n Context context = new Context(server, \"/\" + contextPath, Context.SESSIONS);\n\n ServletHolder servletHolder = new ServletHolder(new WicketServlet());\n servletHolder.setInitParameter(\"applicationClassName\", applicationClass);\n servletHolder.setInitOrder(1);\n context.addServlet(servletHolder, \"/*\");\n try {\n server.start();\n System.out.printf(\"%nApplication at http://localhost:%s/%s. Press return to exit.%n\", port,\n contextPath);\n while (System.in.available() == 0) {\n Thread.sleep(5000);\n }\n server.stop();\n server.join();\n }\n catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }",
"@RequestMapping(value = \"/api/logs/create\", method = RequestMethod.POST)\n public String logs(@RequestBody String body) throws IOException\n {\n String[] parts = body.split(\"router - \");\n String log = parts[0] + \"router - [] \" + (parts.length > 1 ? parts[1] : \"\");\n\n // Knows how to speak the language of syslog => turn syslog => into a map => into a json => into a string\n RFC6587SyslogDeserializer parser = new RFC6587SyslogDeserializer();\n InputStream is = new ByteArrayInputStream(log.getBytes());\n Map<String, ?> messages = parser.deserialize(is);\n\n // Parse json to string\n ObjectMapper mapper = new ObjectMapper();\n String json = mapper.writeValueAsString(messages);\n\n // Get Producer through dependency injection\n MessageChannel toKafka = context.getBean(\"toKafka\", MessageChannel.class);\n\n // Sends message through kafka producer\n // Send is not async, kafka producer in a background thread will queue up each message and send into the broker in batches\n // Send them in batches of the type of message that is sent\n toKafka.send(new GenericMessage<>(json));\n\n return \"ok\";\n }",
"@Override public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n\n }",
"private void configure() {\r\n LogManager manager = LogManager.getLogManager();\r\n String className = this.getClass().getName();\r\n String level = manager.getProperty(className + \".level\");\r\n String filter = manager.getProperty(className + \".filter\");\r\n String formatter = manager.getProperty(className + \".formatter\");\r\n\r\n //accessing super class methods to set the parameters\r\n\r\n\r\n }",
"@RequestMapping(\"/log-test\")\n public String logTest() {\n String name = \"Spring\";\n\n /**\n * log.trace(\" trace log= \" + name); +로 사용 하면 안 되는 이유\n * 현재 로그 레벨은 debug 상태 출력시 나오지 그래서 trace는 출력 되지 않음\n * 그럼에도 불구하고, +를 사용하여 연산이 일어남\n * 연산이 일어나도 그 뒤에 trace 파라미터 넘길려니 확인 후 안 넘김\n * 연산은 곧 리소스 사용 그래서 리소스 낭비가 일어난다.\n *\n * log.trace(\" trace log={}\", name); 경우\n * trace에 파라미터를 넘기는 형식이라\n * 실행 시 trace 메소드를 보고 로그 중지\n * 리소스 낭비 될 일이 없다.\n */\n log.trace(\" trace log= \" + name);\n log.trace(\" trace log={}\", name);\n\n log.debug(\" debug log={}\", name);\n log.info(\" info log={}\", name);\n log.warn(\" warn log={}\", name);\n log.error(\" error log={}\", name);\n\n\n return \"ok\";\n }",
"@Test\n public void configure()\n {\n String message = \"This message should be logged\";\n \n LoggingBean loggingBean = new LoggingBean();\n loggingBean.log(message);\n assertTrue(SYSTEM_OUT_REDIRECT.toString().contains(message));\n }",
"abstract void initiateLog();",
"public String getLogCollectionUploadServerUrl();",
"public ServicioLogger() {\n }",
"public void setup (SProperties config) throws IOException {\n\tString sysLogging =\n\t System.getProperty (\"java.util.logging.config.file\");\n\tif (sysLogging != null) {\n\t System.out.println (\"Logging configure by system property\");\n\t} else {\n\t Logger eh = getLogger (config, \"error\", null, \"rabbit\",\n\t\t\t\t \"org.khelekore.rnio\");\n\t eh.info (\"Log level set to: \" + eh.getLevel ());\n\t}\n\taccessLog = getLogger (config, \"access\", new AccessFormatter (),\n\t\t\t \"rabbit_access\");\n }",
"@Override\n\tpublic void initLogger() {\n\t\t\n\t}",
"public void enableLogging();",
"@Override\n public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n }",
"public TActLogsExample() {\n oredCriteria = new ArrayList<Criteria>();\n offset = 0;\n limit = Integer.MAX_VALUE;\n }",
"LogTailer startTailing();",
"void configureEndpoint(Endpoint endpoint);",
"@FXML\n private void seeAllLogsEvent() throws IOException {\n loadNextScene(rootPane, \"/views/LogPane.fxml\");\n }",
"@Override\r\n\tpublic void configure() throws Exception {\n\t\tfrom(\"timer:foo?period=1s\")\r\n\t\t.transform()\r\n\t\t.simple(\"HeartBeatRouter3 rounting at ${date:now:yyyy-MM-dd HH:MM:SS}\")\r\n\t\t.to(\"stream:out\");\r\n\t}",
"private void setupEndpoints() {\n post(API_CONTEXT, \"application/json\", (request, response) -> {\n try {\n response.status(201);\n return gameService.startGame(request.body());\n } catch (Exception e) {\n logger.error(\"Failed to create a new game\");\n response.status(400);\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Join a game\n put(API_CONTEXT + \"/:id\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.joinGame(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceJoinException ex) {\n response.status(410);\n return new ErrorMessage(ex.getMessage());\n }\n }, new JsonTransformer());\n\n // Play a game\n post(API_CONTEXT + \"/:id/turns\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n gameService.play(request.params(\":id\"), request.body());\n } catch (GameService.GameServiceIdException ex){\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceMoveException ex) {\n response.status(422);\n return new ErrorMessage(ex.getMessage());\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Describe the game board\n get(API_CONTEXT + \"/:id/board\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeBoard(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // fetch state\n get(API_CONTEXT + \"/:id/state\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeState(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n// get(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.find(request.params(\":id\"));\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to find object with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// get(API_CONTEXT + \"/todos\", \"application/json\", (request, response)-> {\n// try {\n// return todoService.findAll() ;\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(\"Failed to fetch the list of todos\");\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// put(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.update(request.params(\":id\"), request.body());\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to update todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// delete(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// todoService.delete(request.params(\":id\"));\n// response.status(200);\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to delete todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// }\n// return Collections.EMPTY_MAP;\n// }, new JsonTransformer());\n\n }",
"protected void initLogger() {\n initLogger(\"DEBUG\");\n }",
"@Override\n public void configure() throws Exception {TODO: implement using data generators\n// final SensorDataProcessor sensorDataProcessor = new SensorDataProcessor();\n//\n// from(restBaseUri() + \"/sensorData?httpMethodRestrict=GET\")\n// .setHeader(\"address\", simple(CONFIG.getSensorAddress()))\n// .setBody(simple(\"\"))\n// .to(\"bulldog:i2c?readLength=2\")\n// .process(sensorDataProcessor)\n// .marshal().json(JsonLibrary.Jackson, true);\n//\n from(\"timer:sensorBroadcast?period=5000\")\n .setBody(simple(\"\\\"temperature\\\" : 10, \\\"humidity\\\" : 100, \"))\n .log(\"firing\")\n .to(\"websocket:weather?sendToAll=true\");\n\n HouseBean houseBean = HouseBean.getInstance();\n\n from(restBaseUri() + \"/all?httpMethodRestrict=GET\")\n .setProperty(\"type\", simple(Object.class.getSimpleName()))\n .bean(houseBean, \"objInfo\")\n .marshal().json(JsonLibrary.Jackson, true);\n\n\n }",
"public ExLoggingHandler() {\n super();\n }",
"@BeforeAll\n public static void configureLogger() {\n new SuperStructure(null, null, null, null, null);\n\n Logger.configure(null);\n Logger.start();\n }",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"public LoggingPage(ClientController controller )\n\t{\n\t\tthis.controller = controller;\n\t\tinitComponents();\n\t}",
"public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}",
"@Override\n public void configure() throws Exception {\n\n JacksonDataFormat jacksonDataFormat = new JacksonDataFormat(objectMapper, Event.class);\n\n\n from(\"{{application.input.endpoint}}\")\n .routeId(ROUTE_ID)\n .noMessageHistory()\n .autoStartup(true)\n .log(DEBUG, logger, \"Message headers - [${header}]\")\n .log(DEBUG, logger, \"Message headers - ${body}\")\n .unmarshal(jacksonDataFormat)\n .setHeader(\"Authorization\", simple(\"Basic \" + Base64.encodeBase64String((username + \":\" + password).getBytes())))\n .setHeader(Exchange.HTTP_METHOD, constant(\"POST\"))\n .doTry()\n .to(\"{{application.output.endpoint}}\")\n .doCatch(HttpOperationFailedException.class)\n .process(exchange -> {\n HttpOperationFailedException exception = (HttpOperationFailedException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);\n logger.error(\"Http call failed - response body is \" + exception.getResponseBody());\n logger.error(\"Http call failed - response headers are \" + exception.getResponseHeaders());\n throw exception;\n })\n .end();\n\n }",
"public void configure() {\n from(INBOUND_URI + \"?serviceClass=\" + WsTwitterService.class.getName())\n .marshal().xmljson() // convert xml to json\n .transform().jsonpath(\"$.query\") // extract arg0 contents\n .removeHeaders(\"*\")\n .setHeader(Exchange.HTTP_METHOD, new SimpleExpression(\"GET\"))\n // Note, prefer HTTP_PATH + to(<uri>) instead of toD(<uri with path>) for easier unit testing\n .setHeader(Exchange.HTTP_PATH, new SimpleExpression(\"/twitter/${body}\"))\n .to(TWITTER_URI)\n .removeHeader(Exchange.HTTP_PATH)\n .convertBodyTo(byte[].class) // load input stream to memory\n .setHeader(Exchange.HTTP_METHOD, new SimpleExpression(\"POST\"))\n .setHeader(\"recipientList\", new SimpleExpression(\"{{env:WS_RECIPIENT_LIST:http4://localhost:8882/filesystem/}}\"))\n .recipientList().header(\"recipientList\")\n .transform().constant(null);\n }",
"public TOpLogs() {\n this(DSL.name(\"t_op_logs\"), null);\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tString index() {\n\t\tif (StringUtil.isNullOrEmpty(configuration.getHue().getIp())\n\t\t\t\t|| StringUtil.isNullOrEmpty(configuration.getHue().getUser())) {\n\t\t\treturn \"redirect:/setup\";\n\t\t}\n\n\t\treturn \"redirect:/dailySchedules\";\n\t}",
"private void initLogger(BundleContext bc) {\n\t\tBasicConfigurator.configure();\r\n\t\tlogger = Logger.getLogger(Activator.class);\r\n\t\tLogger.getLogger(\"org.directwebremoting\").setLevel(Level.WARN);\r\n\t}",
"public void setLogFilesUrls() {\n String s = \"\";\n s = s + makeLink(\"NODE-\" + getNodeName() + \"-out.log\");\n s = s + \"<br>\" + makeLink(\"NODE-\" + getNodeName() + \"-err.log\");\n s = s + \"<br>\" + makeLink(\"log-\" + getNodeName() + \".html\");\n logFilesUrls = s;\n }",
"private void initLoggers() {\n _logger = LoggerFactory.getInstance().createLogger();\n _build_logger = LoggerFactory.getInstance().createAntLogger();\n }",
"public Slf4jLogService() {\n this(System.getProperties());\n }",
"@PostConstruct\r\n\tpublic void demoOnly() {\r\n\t\t// Can't do this in the constructor because the RestTemplate injection\r\n\t\t// happens afterwards.\r\n\t\tlogger.warning(\"The RestTemplate request factory is \"\r\n\t\t\t\t+ restTemplate.getRequestFactory());\r\n\t}",
"public static void setupLoggers() {\n SLF4JBridgeHandler.removeHandlersForRootLogger();\n\n // add SLF4JBridgeHandler to j.u.l's root logger\n SLF4JBridgeHandler.install();\n }",
"public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}",
"public ServletLogChute()\r\n {\r\n }",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"public AdminLog() {\n initComponents();\n setSize(1450,853);\n setLocation (250,130);\n }",
"private void loggerEinrichten() {\n\t\tlogger.setLevel(Level.INFO);\n//\t\tHandler handler = new FileHandler(\"/home/programmieren/TestFiles/iCalender/temp.log\");\n\t\tHandler handler = new ConsoleHandler();\n\t\thandler.setLevel(Level.FINEST);\n\t\thandler.setFormatter(new Formatter() {\n\t\t\t@Override\n\t\t\tpublic String format(LogRecord record) {\n\t\t\t\treturn record.getSourceClassName() + \".\" + record.getSourceMethodName() + \": \" + record.getMessage()\n\t\t\t\t\t\t+ \"\\n\";\n\t\t\t}\n\t\t});\n\t\tlogger.addHandler(handler);\n\t\tlogger.setUseParentHandlers(false);\n\t\tlogger.finest(\"begonnen\");\n\t}",
"@GetMapping(\"/debu\")\n public String debug() {\n log.debug(\"log: debug\");\n return \"debug\";\n }",
"public LogMessageController() {\n\t}",
"public void configLogger() {\n Logger.addLogAdapter(new AndroidLogAdapter());\n }",
"void setEndpoint(String endpoint);",
"public static void main(final String[] args) throws Exception {\n Resource.setDefaultUseCaches(false);\n Integer SERVER_PORT = Integer.parseInt(ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.port\"));\n String SERVER_HOST = ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.host\");\n String CONTEXT_PATH = ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.context_path\");\n \n final Server server = new Server(SERVER_PORT);\n System.setProperty(AppConfig.SERVER_PORT, SERVER_PORT.toString());\n System.setProperty(AppConfig.SERVER_HOST, SERVER_HOST);\n System.setProperty(AppConfig.CONTEXT_PATH, CONTEXT_PATH);\n \n\n // Configuring Apache CXF servlet and Spring listener \n final ServletHolder servletHolder = new ServletHolder(new CXFServlet());\n final ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/\");\n context.addServlet(servletHolder, \"/\" + CONTEXT_PATH + \"/*\");\n context.addEventListener(new ContextLoaderListener());\n context.setInitParameter(\"contextClass\", AnnotationConfigWebApplicationContext.class.getName());\n context.setInitParameter(\"contextConfigLocation\", AppConfig.class.getName());\n \n FilterHolder filterHolder = context.addFilter(CrossOriginFilter.class,\"/*\",EnumSet.allOf(DispatcherType.class));\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_ORIGINS_PARAM,\"*\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_HEADERS_PARAM,\"Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_METHODS_PARAM,\"GET,PUT,POST,DELETE,OPTIONS\");\n filterHolder.setInitParameter(CrossOriginFilter.PREFLIGHT_MAX_AGE_PARAM,\"5184000\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOW_CREDENTIALS_PARAM,\"true\");\n\n\n // Configuring Swagger as static web resource\n final ServletHolder swaggerHolder = new ServletHolder(new DefaultServlet());\n final ServletContextHandler swagger = new ServletContextHandler();\n swagger.setContextPath(\"/swagger\");\n swagger.addServlet(swaggerHolder, \"/*\");\n swagger.setResourceBase(new ClassPathResource(\"/webapp\").getURI().toString());\n\n final HandlerList handlers = new HandlerList();\n handlers.addHandler(swagger);\n handlers.addHandler(context);\n\n server.setHandler(handlers);\n server.start();\n server.join();\n }",
"private static void configureLogging(String currentDirectory) {\n System.out.println(\"Looking for watchdog.properties within current working directory : \" + currentDirectory);\n try {\n LogManager manager = LogManager.getLogManager();\n manager.readConfiguration(new FileInputStream(WATCHDOG_LOGGING_PROPERTIES));\n try {\n fileHandler = new FileHandler(WatchDogConfiguration.watchdogLogfilePath, true); //file\n SimpleFormatter simple = new SimpleFormatter();\n fileHandler.setFormatter(simple);\n logger.addHandler(fileHandler);//adding Handler for file\n } catch (IOException e) {\n System.err.println(\"Exception during configuration of logging.\");\n }\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n logger.info(String.format(\"Monitoring: %s\", WatchDogConfiguration.watchdogDirectoryMonitored));\n logger.info(String.format(\"Processed: %s\", WatchDogConfiguration.watchdogDirectoryProcessed));\n logger.info(String.format(\"Logfile: %s\", WatchDogConfiguration.watchdogLogfilePath));\n }",
"private void setupRoutes() {\n\t\tpost(\"/messages\", (req, res) -> {\n\n\t\t\ttry {\n\t\t\t\tMessage newMessage = mapper.readValue(req.body(), Message.class);\n\t\t\t\t// Message newMessage = gson.fromJson(req.body(),\n\t\t\t\t// Message.class);\n\t\t\t\tif (!newMessage.isValid()) {\n\t\t\t\t\tres.status(HTTP_BAD_REQUEST);\n\t\t\t\t\treturn res;\n\t\t\t\t}\n\t\t\t\tservice.messagePost(newMessage);\n\t\t\t\tres.status(HTTP_OK_REQUEST);\n\t\t\t\treturn res;\n\t\t\t} catch (Exception e) {\n\t\t\t\tres.status(HTTP_BAD_REQUEST);\n\t\t\t\treturn res;\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * \n\t\t */\n\t\tget(\"/messages/syntesis\", (request, response) -> {\n\t\t\treturn new Synthesis(1, 12l, 12l, 12L);\n\t\t} , new JsonTransformer());\n\n\t}",
"@Override\n public void initialize() {\n\n try {\n /* Bring up the API server */\n logger.info(\"loading API server\");\n apiServer.start();\n logger.info(\"API server started. Say Hello!\");\n /* Bring up the Dashboard server */\n logger.info(\"Loading Dashboard Server\");\n if (dashboardServer.isStopped()) { // it may have been started when Flux is run in COMBINED mode\n dashboardServer.start();\n }\n logger.info(\"Dashboard server has started. Say Hello!\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"private static void setupLogger(Application application) {\n\n\t\tapplication.addComponentMenu(Logger.class, \"Logger\", 0);\n\t\tapplication.addComponentMenuElement(Logger.class, \"Clear log\",\n\t\t\t\t(ActionEvent e) -> application.flushLoggerOutput());\n\t\tapplication.addComponentMenuElement(Logger.class, \"Fine level\", (ActionEvent e) -> logger.setLevel(Level.FINE));\n\t\tapplication.addComponentMenuElement(Logger.class, \"Info level\", (ActionEvent e) -> logger.setLevel(Level.INFO));\n\t\tapplication.addComponentMenuElement(Logger.class, \"Warning level\",\n\t\t\t\t(ActionEvent e) -> logger.setLevel(Level.WARNING));\n\t\tapplication.addComponentMenuElement(Logger.class, \"Severe level\",\n\t\t\t\t(ActionEvent e) -> logger.setLevel(Level.SEVERE));\n\t\tapplication.addComponentMenuElement(Logger.class, \"OFF logging\", (ActionEvent e) -> logger.setLevel(Level.OFF));\n\t}",
"private void getAdminLogs(WebSocketConnector aConnector, Token aToken) {\n\t\tif (mService == null) {\n\t\t\tmService = new AdminPlugInService(NS_ADMIN, mNumberOfDays, getServer());\n\t\t}\n\n\t\tif (mLog.isDebugEnabled()) {\n\t\t\tmLog.debug(\"Processing 'getAdminLogs'...\");\n\t\t}\n\n\t\tgetServer().sendToken(aConnector, mService.getAdminLogs(aConnector, aToken));\n\t}",
"public static void set(ServerLoggingConfiguration config) {\r\n LogImplServer.config = config;\r\n }",
"public ShowServlet() {\n\t\tsuper();\n\t}",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"@Override\n public void initializeLogging() {\n // Wraps Android's native log framework.\n LogWrapper logWrapper = new LogWrapper();\n // Using Log, front-end to the logging chain, emulates android.util.log method signatures.\n Log.setLogNode(logWrapper);\n\n // Filter strips out everything except the message text.\n MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();\n logWrapper.setNext(msgFilter);\n\n // On screen logging via a fragment with a TextView.\n //LogFragment logFragment = (LogFragment) getSupportFragmentManager()\n // .findFragmentById(R.id.log_fragment);\n //msgFilter.setNext(logFragment.getLogView());\n\n mLogFragment = (LogFragment) getSupportFragmentManager()\n .findFragmentById(R.id.log_fragment);\n msgFilter.setNext(mLogFragment.getLogView());\n\n Log.i(TAG, \"Ready\");\n }",
"private LogService()\n {\n logWriter = new CleanSweepLogWriterImpl();\n\n Calendar date = Calendar.getInstance();\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH)+1;\n int day = date.get(Calendar.DAY_OF_MONTH);\n\n todaysDate=\"\";\n if(day<10) {\n todaysDate += year + \"\" + month + \"0\" + day;\n }\n else\n {\n todaysDate += year + \"\" + month + \"\" + day;\n }\n\n }",
"private void initCemsLogger() {\n if (logger == null) {\n final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n final Formatter formatter = new Formatter() {\n @Override\n public String format(LogRecord record) {\n final StringBuilder sb = new StringBuilder();\n sb.append(dateFormat.format(new Date(record.getMillis())));\n sb.append(\" - \");\n sb.append(record.getLevel().getName());\n sb.append(\": \");\n sb.append(record.getMessage());\n sb.append(\"\\n\");\n @SuppressWarnings(\"ThrowableResultOfMethodCallIgnored\")\n final Throwable thrown = record.getThrown();\n if (thrown != null) {\n sb.append(thrown.toString());\n sb.append(\"\\n\");\n }\n return sb.toString();\n }\n };\n\n final ConsoleHandler handler = new ConsoleHandler();\n handler.setFormatter(formatter);\n handler.setLevel(Level.ALL);\n\n logger = Logger.getLogger(\"ga.cems\");\n final Handler[] handlers = logger.getHandlers();\n for (Handler h : handlers) {\n logger.removeHandler(h);\n }\n\n logger.setUseParentHandlers(false);\n logger.addHandler(handler);\n }\n// logger.setLevel(Level.INFO);\n logger.setLevel(logLevel);\n }",
"public MyLogs() {\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tGson gson = new GsonBuilder().serializeNulls().create();\r\n\t\t\r\n\t\tHttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor() ;\r\n\t\tloggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\r\n\t\t\r\n\t\tOkHttpClient okhttp = new OkHttpClient.Builder()\r\n\t\t\t\t.addInterceptor(loggingInterceptor)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tRetrofit retrofit = new Retrofit.Builder()\r\n\t\t\t\t.baseUrl(\"https://jsonplaceholder.typicode.com/\")\r\n\t\t\t\t.addConverterFactory(GsonConverterFactory.create(gson))\r\n\t\t\t\t.client(okhttp)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tLogAPI logAPI = retrofit.create(LogAPI.class);\r\n\t\t\r\n\t\tCall<LogDataModel> call = logAPI.getLog();\r\n\t\tcall.enqueue(new Callback<LogDataModel>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(Call<LogDataModel> call, Throwable t) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(Call<LogDataModel> call, Response<LogDataModel> response) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(response.code() !=200) {\r\n\t\t\t\t\tSystem.out.println(\"Error in Connection\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString value= \"\";\r\n\t\t\t\tvalue+=\"ID: \" + response.body().getId();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Data: \\n \" + value);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}",
"private void configureLogging() throws FileNotFoundException, IOException {\n\t\tConfigurationSource source = new ConfigurationSource(new FileInputStream(CONFIG_LOG_LOCATION));\r\n\t\tConfigurator.initialize(null, source);\r\n\t\tlog = LogManager.getLogger(SekaiClient.class);\r\n\t}",
"private void initLogConfig() {\n\t\t logConfigurator = new LogConfigurator();\n\t\t// Setting append log coudn't cover by a new log.\n\t\tlogConfigurator.setUseFileAppender(true);\n\t\t// Define a file path for output log.\n\t\tString filename = StorageUtils.getLogFile();\n\t\tLog.i(\"info\", filename);\n\t\t// Setting log output\n\t\tlogConfigurator.setFileName(filename);\n\t\t// Setting log's level\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setFilePattern(\"%d %-5p [%c{2}]-[%L] %m%n\");\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 5);\n\t\t// Set up to use the cache first and then output to a file for a period\n\t\t// of time\n\t\tlogConfigurator.setImmediateFlush(false);\n\t\tlogConfigurator.setUseLogCatAppender(true);\n\t\t// logConfigurator.setResetConfiguration(true);\n\t\tlogConfigurator.configure();\n\t}",
"public SearchLogs() {\n this(\"search_logs\", null);\n }"
] |
[
"0.66121095",
"0.63692003",
"0.6003976",
"0.5955815",
"0.5880498",
"0.5822728",
"0.5769628",
"0.57695013",
"0.57405156",
"0.56982833",
"0.56522775",
"0.5616512",
"0.5588188",
"0.5585834",
"0.55637294",
"0.55578464",
"0.5553334",
"0.554249",
"0.55025136",
"0.54939026",
"0.54743254",
"0.54663587",
"0.54373074",
"0.53928936",
"0.53867143",
"0.5374618",
"0.53643906",
"0.5362705",
"0.5318829",
"0.5310851",
"0.531062",
"0.5299702",
"0.52476656",
"0.5246327",
"0.523464",
"0.52286446",
"0.5225066",
"0.52126133",
"0.52097136",
"0.5209269",
"0.520025",
"0.5191415",
"0.5183811",
"0.51727134",
"0.5171874",
"0.51677364",
"0.5163901",
"0.51573163",
"0.515209",
"0.51391214",
"0.51270455",
"0.51237553",
"0.5120471",
"0.5110435",
"0.51103514",
"0.5103766",
"0.5101574",
"0.5091096",
"0.5085047",
"0.5080707",
"0.5065546",
"0.50530994",
"0.50405574",
"0.5022398",
"0.5016004",
"0.5014298",
"0.50132287",
"0.50117457",
"0.5005398",
"0.5005277",
"0.50038105",
"0.49686554",
"0.49614912",
"0.4958219",
"0.495382",
"0.49493226",
"0.4945584",
"0.49452165",
"0.49446842",
"0.4928263",
"0.4925196",
"0.49249518",
"0.49168065",
"0.4913249",
"0.49101728",
"0.49003032",
"0.4897752",
"0.48926738",
"0.4891068",
"0.48893705",
"0.48870188",
"0.48817664",
"0.48816213",
"0.48782277",
"0.48687175",
"0.4866526",
"0.48601672",
"0.48591205",
"0.48575625",
"0.48548642"
] |
0.7927983
|
0
|
Increase the frequency hit of the endpoint
|
public void increaseEndpointHitFrequency(String endpoint) {
if (!endpointVisitFrequency.containsKey(endpoint)) {
throw new IllegalArgumentException("Frequency increasing method: Endpoint does not exist");
}
endpointVisitFrequency.put(endpoint, endpointVisitFrequency.get(endpoint) + 1);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void increseHitCount() {\n\r\n\t}",
"@Override\n public final void onHit(final K key) {\n if (!freqHitMap.containsKey(key)) {\n freqHitMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqHitMap.put(key, freqHitMap.get(key) + 1);\n }",
"public void incrementActiveRequests() \n {\n ++requests;\n }",
"void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }",
"@Override\n public void addNew(int latency) {\n count.getAndIncrement();\n }",
"public void increaseAttackFrequency(int f) {\r\n\t\tattackFrequency -= f;\r\n\t\tif(attackFrequency < 0) {\r\n\t\t\tattackFrequency = 0;\r\n\t\t}\r\n\t}",
"public void setupStatsEndpoint() {\n HttpHandler handler =\n (httpExchange) -> {\n this.increaseEndpointHitFrequency(this.getStatsApiEndpoint());\n StringBuilder response = new StringBuilder();\n Set<Map.Entry<String, Integer>> frequencySet = this.getEndpointFrequencyEntrySet();\n for (Map.Entry<String, Integer> entry : frequencySet) {\n response\n .append(entry.getKey())\n .append(\":\")\n .append(entry.getValue())\n .append(System.getProperty(\"line.separator\"));\n }\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, response.length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(response.toString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.statsApiEndpoint, this.server.createContext(this.statsApiEndpoint));\n this.setHandler(this.getStatsApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.statsApiEndpoint, 0);\n }",
"double getHitRate();",
"double getHitRate();",
"default void hit() {\n\t\tcount(1);\n\t}",
"public void increaseNumHits() {\n\t\tthis.numHits += 1;\n\t}",
"void requestRateLimited();",
"public void discovered(Endpoint endpoint, long packetId) {\n Entry entry = entries.get(endpoint);\n if (entry != null && packetId < entry.getLastSeenPacketId()) {\n log.debug(\"Ignore staled round trip discovery on {} (packet_id: {})\", endpoint, packetId);\n return;\n }\n\n Instant expireAt = clock.instant().plus(expireDelay);\n entries.put(endpoint, new Entry(packetId, expireAt));\n timeouts.computeIfAbsent(expireAt, key -> new HashSet<>()).add(endpoint);\n\n if (entry == null) {\n log.info(\"Register round trip status entry for {}\", endpoint);\n }\n\n // Emits each registered round trip event. Some ISLs monitor can ignore some round trip ACTIVATE events as part\n // of race conditions prevention fight.\n carrier.linkRoundTripActive(endpoint);\n }",
"public void incrementRefusals() {\n\t}",
"private static void incrementFlightTakeOffCounter()\r\n\t{\r\n\t\tflightTakeOffCounter++;\r\n\t}",
"public void increaseFrequency(int stackHeight, int value);",
"@Override\n\tpublic void increaseSpeed() {\n\t\tSystem.out.println(\"increaseSpeed\");\n\t\t\n\t}",
"@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}",
"public static void addPageHit(long time) {\r\n _count++;\r\n _time += time;\r\n if (_serverStarted == -1)\r\n _serverStarted = System.currentTimeMillis();\r\n }",
"public void counter(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n addlink(tp);\n }\n }",
"bool setFrequency(double newFrequency);",
"public void incrementFitness()\n {\n this.fitness++;\n }",
"@Override\n public final void onPut(final K key, final V value) {\n if (!freqPutMap.containsKey(key)) {\n freqPutMap.put(key, 1);\n return;\n }\n\n // Add 1 to times used in map\n freqPutMap.put(key, freqPutMap.get(key) + 1);\n }",
"private static void updateHitrate(String s) {\n long _missCountSum = getCounterResult(\"missCount\");\n long _opCountSum = getCounterResult(\"opCount\");\n if (_opCountSum == 0L) {\n return;\n }\n double _hitRate = 100.0 - _missCountSum * 100.0 / _opCountSum;\n System.err.println(Thread.currentThread() + \" \" + s + \", opSum=\" + _opCountSum + \", missSum=\" + _missCountSum + \", hitRate=\" + _hitRate);\n setResult(\"hitrate\", _hitRate, \"percent\", AggregationPolicy.AVG);\n }",
"@Override\r\n public void increment(String metricId, int incrementValue) {\r\n route(metricId, metricAggregator -> metricAggregator.increment(resolve(metricId), incrementValue));\r\n }",
"public void countHits() {\nif (this.hitpoints <= 0) {\nreturn;\n}\nthis.hitpoints = this.hitpoints - 1;\n}",
"public void incrementNumExtendedRequests() {\n this.numExtendedRequests.incrementAndGet();\n }",
"void emit() {\n counter.increment(METRIC_VALUE);\n }",
"public void accelerate(){\n speed += 5;\n }",
"private void incrementUsageCount() {\n usageCount++;\n }",
"public int incrementHopCount() {\n return ++this.hopCount;\n }",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"protected long hit() {\n return numHits.incrementAndGet();\n }",
"void setValue(Endpoint endpoint, double value) {\n endpoint.setValue(this, value);\n }",
"public void increaseSpeed() {\r\n\tupdateTimer.setDelay((int)Math.floor(updateTimer.getDelay()*0.95));\r\n\t\t}",
"public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }",
"public void incrementNumBindRequests() {\n this.numBindRequests.incrementAndGet();\n }",
"int updateCount(double dist);",
"public void incCount() { }",
"@Override\n public void start() {\n // HINT: comment setPeriodic and uncomment setTimer to test more easily if exponential backoff works as expected\n // vertx.setTimer(5000, this::updateCache);\n vertx.setPeriodic(120000, this::updateCache);\n }",
"public void setHitCount(int count) {\nthis.hitpoints = count;\n}",
"void incUsage() {\n incUsage(1);\n }",
"public void incrementNumAttacked( ){\n this.numAttacked++;\n }",
"public void increment() {\n long cnt = this.count.incrementAndGet();\n if (cnt > max) {\n max = cnt;\n // Remove this after refactoring to Timer Impl. This is inefficient\n }\n this.lastSampleTime.set(getSampleTime ());\n }",
"public void setRefreshFreq(int freq) {\n m_refreshFrequency = freq;\n }",
"private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }",
"@Override\r\n\t\t\tpublic void handle(final HttpServerRequest req) {\n\t\t\t\tString startTime = \"1355562000000\"; //--multi-dist\r\n\t\t\t\tIterator<EventInfo> iter = \r\n\t\t\t\t\t\tdataService.events()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(EventInfo.class).iterator();\r\n\t\t\t\tEventCounter multiCounter = new EventCounter(\"/multi\");\r\n\t\t\t\tint processed = 0;\r\n\t\t\t\twhile (iter.hasNext() && processed < limit) {\r\n\t\t\t\t\tEventInfo event = iter.next();\r\n\t\t\t\t\tmultiCounter.countEvent(event);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treq.response.setChunked(true);\r\n\t\t\t\tmultiCounter.printDistance(req, \"multidist\");\r\n\t\t\t\t//multiCounter.printResponse(req, \"multidist\");\r\n\t\t\t\t//use response time data\r\n\t\t\t\tIterator<ResponseInfo> respIter = \r\n\t\t\t\t\t\tdataService.response()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(ResponseInfo.class).iterator();\r\n\t\t\t\tResponseCounter responseCounter = new ResponseCounter();\r\n\t\t\t\tprocessed = 0;\r\n\t\t\t\twhile (respIter.hasNext() && processed < limit) {\r\n\t\t\t\t\tResponseInfo resp = respIter.next();\r\n\t\t\t\t\tresponseCounter.count(resp);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\tresponseCounter.printResponse(req, \"multidist\");\r\n\r\n\t\t\t\treq.response.end();\r\n\t\t\t}",
"public void Increase()\n {\n Increase(1);\n }",
"public void defaultUpdateCount(AcBatchFlight e)\n {\n }",
"void incrementCount();",
"public void timer()\n {\n timer += .1; \n }",
"public void increaseHour() {\n\t\tthis.total++;\n\t}",
"private float getRefreshRate() {\n return 1;\n }",
"public void addGETEvent()\r\n\t{\r\n\t\tfor(Event recordedEvent : eventsCount)\r\n\t\t{\r\n\t\t\tif(recordedEvent.getRequestType().equals(RequestMethod.GET))\r\n\t\t\t{\r\n\t\t\t\trecordedEvent.setAccessCount(recordedEvent.getAccessCount() + 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void incrementCount() {\n count++;\n }",
"public void updatePeriodic() {\r\n }",
"private synchronized void increaseWebhook(String clientId) {\n clientWebhooks.put(clientId, webhookCount(clientId) + 1);\n }",
"public void oneSecond() {\r\n int routeSize = connections.size();\r\n if (routeSize != 0) {\r\n // if the signal is green.\r\n if (connections.get(lightIndex).getTrafficLight().getSignal()\r\n == TrafficSignal.GREEN) {\r\n currentGreenTime ++;\r\n if (currentGreenTime + yellowTime == duration) {\r\n connections.get(lightIndex).getTrafficLight().setSignal\r\n (TrafficSignal.YELLOW);\r\n currentGreenTime = 0;\r\n }\r\n }\r\n // if the signal is yellow.\r\n else if (connections.get(lightIndex).getTrafficLight().getSignal()\r\n == TrafficSignal.YELLOW) {\r\n currentYellowTime ++;\r\n if (currentYellowTime == yellowTime) {\r\n connections.get(lightIndex).getTrafficLight().setSignal\r\n (TrafficSignal.RED);\r\n currentYellowTime = 0;\r\n if(lightIndex == connections.size() - 1){\r\n lightIndex = 0;\r\n } else {\r\n lightIndex ++;\r\n }\r\n connections.get(lightIndex).getTrafficLight().setSignal\r\n (TrafficSignal.GREEN);\r\n }\r\n }\r\n }\r\n }",
"public void incrementCount() {\n\t\tcount++;\n\t}",
"public void addPutEvent()\r\n\t{\r\n\t\tfor(Event recordedEvent : eventsCount)\r\n\t\t{\r\n\t\t\tif(recordedEvent.getRequestType().equals(RequestMethod.PUT))\r\n\t\t\t{\r\n\t\t\t\trecordedEvent.setAccessCount(recordedEvent.getAccessCount() + 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void incrementNumSearchRequests() {\n this.numSearchRequests.incrementAndGet();\n }",
"public static void performanceCountEnable(int event) { }",
"private synchronized void increment() {\n ++count;\n }",
"@Scheduled(fixedRate = 2000)\n private void doSendRpcUsage() {\n List<MethodCallDTO> items = stats.values()\n .stream()\n .map(stat -> new MethodCallDTO(\n stat.name,\n stat.count.longValue(),\n stat.lastCall.longValue(),\n stat.lastResult.get(),\n stat.curl))\n .sorted((s1, s2) -> s1.getMethodName().compareTo(s2.getMethodName()))\n .collect(Collectors.toList());\n\n clientMessageService.sendToTopic(\"/topic/rpcUsage\", items);\n }",
"protected void pingReceived(){\r\n\t\tpings++;\r\n\t\troundTrip = System.currentTimeMillis() - pingSent;\r\n\t\tlastPing = System.currentTimeMillis();\r\n\t\tlog.trace(\"\\\"\" + getName() + \"\\\" responded to ping after \" + roundTrip + \"ms\");\r\n\t}",
"void incrementAccessCounter();",
"public void incrementNumAddRequests() {\n this.numAddRequests.incrementAndGet();\n }",
"public void setFrequency(float speed) { \n \tmouseJointDef.frequencyHz = speed; \n }",
"private void elementHit(K key) {\n\t\tint i = hitMap.get(key);\n\t\ti++;\n\t\thitMap.put(key, i);\n\t}",
"public static void throughput(BasicGraphService bgs) {\n \tRandom random = new Random();\n \tlong timer = System.currentTimeMillis();\n\t\tlong dif = 0l;\n\t\tint ops = 0;\n\t\twhile(dif < 1000) {\n\t\t\tint key = random.nextInt(maxRandInt);\n\t\t\tbgs.getConnections(key);\n\t\t\tdif = System.currentTimeMillis() - timer;\n\t\t\tops++;\n\t\t}\n\t\tdebug(debug, \"operations in 1 second: \" + ops);\n }",
"@Override\n\tpublic void addURLVisitCount(String shortUrl){\t\t\n\t\t \t\t\t\t \t\t\n\t\t \t\tint visitCount = getVisitCountList(shortUrl).getVisitCount();\t\t\n\t\t \t\tvisitCount++;\t\t\n\t\t \t\tString SQL = \"UPDATE GlobalUrlDB SET visitCount = (?) WHERE shortUrl = (?)\";\t\t\n\t\t \t\tObject[] params = new Object[] { visitCount, shortUrl };\t\t\n\t\t \t\ttry{\t\t\n\t\t \t\t\tjdbcTemplateObject.update( SQL, params);\t\t\n\t\t \t\t}\t\t\n\t\t \t\tcatch(Exception e){\t\t\n\t\t \t\t\te.printStackTrace();\t\t\n\t\t \t\t}\t\t\n\t\t \t\t\n\t\t \t}",
"public void setFrequency(int f){\n this.frequency = f;\n }",
"public void incrementCount(){\n count+=1;\n }",
"public void incrementFitnessBy2()\n {\n this.fitness=this.fitness+2;\n }",
"@Override\n public synchronized void increment() {\n count++;\n }",
"@Override\r\n\tpublic void perSecond() {\n\r\n\t}",
"public void increaseCount(){\n myCount++;\n }",
"@Override\n public void stress() {\n _brain.heart.accelerate(2);\n }",
"@Override\r\n public void update(long timePassed) {\n\r\n }",
"public <T extends Number> void incrementSpeedPerFrame(T increment){\r\n\t\tspeed += increment.doubleValue();\r\n\t\tif(speed <= 0){\r\n\t\t\tspeed = 1;\r\n\t\t}\r\n\t}",
"public void addCount()\n {\n \tcount++;\n }",
"public void update(int count){\n\t\tthis.count += count;\n\n\t\tif(this.count >= totalCount)\n\t\t\tachieved = true;\n\t}",
"@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}",
"@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}",
"public void tick() {\n Instant now = clock.instant();\n SortedMap<Instant, Set<Endpoint>> range = timeouts.headMap(now);\n\n Set<Endpoint> processed = new HashSet<>();\n for (Set<Endpoint> batch : range.values()) {\n for (Endpoint endpoint : batch) {\n if (processed.contains(endpoint)) {\n continue;\n }\n processed.add(endpoint);\n checkExpiration(now, endpoint);\n }\n }\n range.clear();\n }",
"void increase();",
"void increase();",
"void incrementAccessCounterForSession();",
"public void addPoint() {\n points += 1;\n }",
"public void increment(long delta) {\n long cnt = this.count.addAndGet(delta);\n if(cnt > max) {\n max = cnt;\n }\n this.lastSampleTime.set(getSampleTime());\n }",
"public void increaseNumberOfVisit(String shortUrl) {\n ShortenerMapping shortenerMappings = shortenerRepository.findShortenerMappingsByShortUrl(shortUrl);\n shortenerMappings.setVisits(shortenerMappings.getVisits() + 1);\n Browsers currentVisitingBrowsers = getBrowserAgent();\n if (currentVisitingBrowsers == Browsers.CHROME) {\n shortenerMappings.setChrome(shortenerMappings.getChrome() + 1);\n } else if (currentVisitingBrowsers == Browsers.FIREFOX) {\n shortenerMappings.setFirefox(shortenerMappings.getFirefox() + 1);\n } else if (currentVisitingBrowsers == Browsers.SAFARI) {\n shortenerMappings.setSafari(shortenerMappings.getSafari() + 1);\n } else if (currentVisitingBrowsers == Browsers.OPERA) {\n shortenerMappings.setOpera(shortenerMappings.getOpera() + 1);\n } else if (currentVisitingBrowsers == Browsers.EDGE) {\n shortenerMappings.setEdge(shortenerMappings.getEdge() + 1);\n } else if (currentVisitingBrowsers == Browsers.INTERNET_EXPLORER) {\n shortenerMappings.setInternet_explorer(shortenerMappings.getInternet_explorer() + 1);\n } else if (currentVisitingBrowsers == Browsers.POSTMAN) {\n shortenerMappings.setPostman(shortenerMappings.getPostman() + 1);\n } else if (currentVisitingBrowsers == Browsers.POWERSHELL) {\n shortenerMappings.setPowershell(shortenerMappings.getPowershell() + 1);\n } else {\n shortenerMappings.setUnknown(shortenerMappings.getUnknown() + 1);\n }\n shortenerRepository.save(shortenerMappings);\n }",
"public void increaseFeatureCount() {\n this.featureCount++;\n }",
"public void addPoint_action()\r\n/* */ {\r\n/* 94 */ this.points_action += 1;\r\n/* */ }",
"public void updateRate(double r){\r\n rate *= r;\r\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"public void updateOnAction(int update)\n {\n this.points += update;\n }",
"private void doPing()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n CHARGE_NODE_JSON_DATA, \r\n PING_URL,\r\n SN_HOST,\r\n null, \r\n cookieData,\r\n false,\r\n token,\r\n secret ) );\r\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }"
] |
[
"0.62735945",
"0.6191941",
"0.6149731",
"0.60988766",
"0.60636705",
"0.5969307",
"0.58798593",
"0.5856671",
"0.5856671",
"0.58495384",
"0.58047754",
"0.5767087",
"0.5708661",
"0.57008564",
"0.56943536",
"0.56775737",
"0.5673653",
"0.56459224",
"0.5601383",
"0.55309933",
"0.5527905",
"0.55103433",
"0.5483133",
"0.54683",
"0.5428745",
"0.5426102",
"0.54070336",
"0.5381713",
"0.5380028",
"0.53784716",
"0.53688985",
"0.5366198",
"0.5361181",
"0.5349167",
"0.5348249",
"0.5332903",
"0.53268814",
"0.5322956",
"0.5322497",
"0.53196865",
"0.531814",
"0.53071713",
"0.53063095",
"0.5301741",
"0.5288682",
"0.52860373",
"0.5284469",
"0.5276952",
"0.5258622",
"0.5258481",
"0.52545995",
"0.52339584",
"0.52231175",
"0.5218642",
"0.52159214",
"0.5215531",
"0.5198794",
"0.51892287",
"0.5176903",
"0.5173925",
"0.5173266",
"0.5164721",
"0.51605964",
"0.5159687",
"0.5153116",
"0.51465",
"0.51407576",
"0.51376224",
"0.5134603",
"0.51282245",
"0.5126612",
"0.51261735",
"0.512018",
"0.51196045",
"0.51192343",
"0.5114583",
"0.51107144",
"0.5108115",
"0.5107739",
"0.51022494",
"0.5093929",
"0.50912917",
"0.5077598",
"0.5077598",
"0.5077295",
"0.5075355",
"0.5075355",
"0.50741106",
"0.5072735",
"0.50700295",
"0.5068232",
"0.50661117",
"0.5061485",
"0.5053715",
"0.5051709",
"0.5051709",
"0.50385165",
"0.50376105",
"0.5035188",
"0.5035188"
] |
0.8135067
|
0
|
Increment and get the ID of the request
|
public long incrementAndGetID() {
return ++id;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static long newId() {\n return REQUEST_ID.getAndIncrement();\n }",
"private static synchronized String getNextRequestId()\n {\n if (++nextRequestId < 0)\n {\n nextRequestId = 0;\n }\n String id = Integer.toString(nextRequestId);\n return id;\n }",
"private synchronized int getNextRequestCode(){\r\n return currentRequestCode++;\r\n }",
"public void incrementActiveRequests() \n {\n ++requests;\n }",
"int nextId() {\n return mAckId.incrementAndGet();\n }",
"java.lang.String getRequestID();",
"public int nextId() throws IllegalIdRequestException {\r\n\t\tif (currentId < players.size()) {\r\n\t\t\treturn currentId++;\r\n\t\t} else {\r\n\t\t\tthrow new IllegalIdRequestException(\"all available IDs have been assigned to players.\");\r\n\t\t}\r\n\t}",
"public int getR_Request_ID();",
"private static int nextID() {\r\n\t\treturn ID++;\r\n\t}",
"public static synchronized int getNewID() {\r\n\t\treturn Entity.IDCount++;\r\n\t}",
"private int nextValidID() {\n return nextId++;\n }",
"public void incrementNumAddRequests() {\n this.numAddRequests.incrementAndGet();\n }",
"public synchronized long getNextTransactionID(){\n\t\treturn this.id++;\n\t}",
"private synchronized long nextId() {\n\t\treturn ++curID;\n\t}",
"static synchronized int nextID() {\n\t\treturn g_nID++;\n\t}",
"private static int generateId() {\n\t\treturn ++sId;\n\t}",
"public String getIdrequest() {\r\n\t\treturn idrequest;\r\n\t}",
"public int make() { return this.atomicId.incrementAndGet(); }",
"public static int getRequestNum(){\n return requestNum;\n }",
"public int generateId(){\n return repository.getCount()+1;\n }",
"private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }",
"private void setId() {\n id = count++;\n }",
"private long generateID() {\n\t\treturn ++lastID;\n\t}",
"int nextId();",
"int incExperimentId();",
"public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}",
"public String getAndIncrement() {\n Integer value = transactionId.get();\n transactionId.set(value + 1);\n return String.format(\"T_%08d\", value);\n }",
"public String getCurrentRequestId()\n\t{\n\t\tString reqID = (String) MDC.get(REQUEST_ID);\n\t\tif (reqID == null || \"\".equals(reqID))\n\t\t{\n\t\t\treqID = \"RID_\" + UUID.randomUUID().toString();\n\t\t\tMDC.put(REQUEST_ID, reqID);\n\t\t}\n\t\treturn reqID;\n\t}",
"public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }",
"public int counter (){\n return currentID;\n }",
"public int getRequestNumber() {\n return requestNumber;\n }",
"protected String createRequestId(HttpServletRequest ignored) {\n return idGenerator.next();\n }",
"public void incrementNumDeleteRequests() {\n this.numDeleteRequests.incrementAndGet();\n }",
"long requestId();",
"long requestId();",
"private static int generateMarkerId(){\n return snextMarkerId.incrementAndGet();\n\n }",
"public void incrementNumAbandonRequests() {\n this.numAbandonRequests.incrementAndGet();\n }",
"private int getNextSessionID() {\n\t\treturn sessionNum++;\n\t}",
"public int incrementPlayersNumber(){//setter/incrementer di numberofplayers chiamato da ServerRoom: qua ho cambiato! è qui che si setta il client id, e il primo della stanza ha id=1 scritta come era prima!\r\n\t\tint idToSend=numberOfPlayers;\r\n\t\tnumberOfPlayers++;\r\n\t\treturn idToSend;\r\n\t}",
"private static synchronized long nextProxyId() {\n return _proxyId++;\n }",
"public long getUserID() {\n //userID++;\n return userID++;\n }",
"@Override\n public long generateNewContractId() {\n return idCounter++;\n }",
"II addId();",
"public void incrementNumModifyRequests() {\n this.numModifyRequests.incrementAndGet();\n }",
"@java.lang.Override\n public long getRequesterId() {\n return requesterId_;\n }",
"public int generateId() {\n if (allMessage.size() ==0) {\n return 1000;\n }\n return allMessage.get(allMessage.size() - 1).getId() + 1;\n }",
"public String generateReferenceId(){\n String lastSequenceNumber = databaseAccessResource.getLastRequestSequenceNumber();\n //ToDo : write the logic to generate the next sequence number.\n return null;\n }",
"@java.lang.Override\n public long getRequesterId() {\n return requesterId_;\n }",
"public void setIdrequest(String idrequest) {\r\n\t\tthis.idrequest = idrequest;\r\n\t}",
"public static int getNumeroId(){\r\n idConsecutivo++;\r\n return idConsecutivo;\r\n }",
"@CallSuper\n public long incrementAndGet() {\n return addAndGet(1);\n }",
"void requestId(long requestId);",
"void requestId(long requestId);",
"public String getNextId() {\n while (!isIdFree(this.nextId)) {\n this.nextId += 1;\n }\n return Integer.toString(this.nextId);\n }",
"@Override\n\tpublic synchronized long assignNewId(RepositoryModel repository) {\n\t\tJedis jedis = pool.getResource();\n\t\ttry {\n\t\t\tString key = key(repository, KeyType.counter, null);\n\t\t\tString val = jedis.get(key);\n\t\t\tif (isNull(val)) {\n\t\t\t\tlong lastId = 0;\n\t\t\t\tSet<Long> ids = getIds(repository);\n\t\t\t\tfor (long id : ids) {\n\t\t\t\t\tif (id > lastId) {\n\t\t\t\t\t\tlastId = id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tjedis.set(key, \"\" + lastId);\n\t\t\t}\n\t\t\tlong ticketNumber = jedis.incr(key);\n\t\t\treturn ticketNumber;\n\t\t} catch (JedisException e) {\n\t\t\tlog.error(\"failed to assign new ticket id in Redis @ \" + getUrl(), e);\n\t\t\tpool.returnBrokenResource(jedis);\n\t\t\tjedis = null;\n\t\t} finally {\n\t\t\tif (jedis != null) {\n\t\t\t\tpool.returnResource(jedis);\n\t\t\t}\n\t\t}\n\t\treturn 0L;\n\t}",
"public String getNextId() {\n while (!this.isIdFree(this.nextId)) {\n this.nextId += 1;\n }\n return Integer.toString(this.nextId);\n }",
"public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }",
"private Integer getNewId(){\n List<Integer> allIds = new ArrayList<>();\n for (T entity : allEntities) {\n allIds.add(entity.getId());\n }\n return allIds.size() > 0 ? Collections.max(allIds) + 1 : 1;\n }",
"public static long incrementRequestN(long existing, long toAdd) {\n long l = existing + toAdd;\n return l < 0 ? Long.MAX_VALUE : l;\n }",
"public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }",
"protected Long getIdRendicion(HttpServletRequest request){\n\t\tLong idRendicion = null;\n\t\t\n\t\tif (validateParameter(request,\"id\")){\n\t\t\tidRendicion = new Long(request.getParameter(\"id\"));\n\t\t}\n\t\treturn idRendicion;\n\t}",
"public void incrementNumExtendedRequests() {\n this.numExtendedRequests.incrementAndGet();\n }",
"private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }",
"public static int getIdcounter() {\n return idcounter;\n }",
"private static int generateCircleId(){\n return snextCircleId.incrementAndGet();\n\n }",
"private int getRequestCode() {\n return Thread.currentThread().hashCode();\n }",
"private Long createId() {\n return System.currentTimeMillis() % 1000;\n }",
"public void incrementNumSearchRequests() {\n this.numSearchRequests.incrementAndGet();\n }",
"private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}",
"private Request addRequest(Session session, long idPackage, Date receiveTime,\n Concentrator concentrator) {\n \n Request req = new Request(idPackage, receiveTime, concentrator, null);\n session.save(req);\n int idReq = ((BigInteger) session.createSQLQuery(\"SELECT LAST_INSERT_ID()\")\n .uniqueResult()).intValue();\n req.setIdRequest(idReq);\n return req;\n }",
"public abstract ID nextId();",
"protected abstract long getNextID(long ID);",
"public final Integer getNewId(final String key){\r\n\t\tmaxId++;\r\n\t\twhile (idKeyMap.containsKey(maxId)){\r\n\t\t\tmaxId++; // probably not going to happen...\r\n\t\t}\r\n\t\tidKeyMap.put(maxId, key);\r\n\t\tkeyIdMap.put(key, maxId);\r\n\t\treturn maxId;\r\n\t}",
"private static long getGlobalId() {\n return globalId++;\n }",
"public final Integer getRequestSeq() {\n return requestSeq;\n }",
"public static int GetIncrement(){\n\t\treturn m_Incrementer;\n\t}",
"public long getReportID() {\n //reportID++;\n return reportID++;\n }",
"public static int getCurrentId() {\n return currentId;\n }",
"public interface RequestId {\n\n\n /**\n * The of the request.\n *\n * @return the id\n */\n String getId();\n\n /**\n * Generates a unique request ID.\n * <p>\n * A default implementation is provided uses random UUIDs as the ID value.\n * To supply your own implementation, put an implementation of this interface upstream from the {@link #bind() binding handler}.\n */\n public interface Generator {\n\n /**\n * Generate a request ID with a “unique” ID value.\n *\n * @param context the handling context\n * @return a unique request ID\n */\n RequestId generate(Context context);\n }\n\n /**\n * Creates a new request ID (using the {@link Generator} from the context) and inserts it into the request registry.\n * <p>\n * The {@code RequestId} can then be obtained from the request registry and used in response headers for example.\n * <pre class=\"java\">{@code\n * import ratpack.handling.RequestId;\n * import ratpack.http.client.ReceivedResponse;\n * import ratpack.test.embed.EmbeddedApp;\n * import static org.junit.Assert.*;\n *\n * public class Example {\n * public static void main(String... args) throws Exception {\n * EmbeddedApp.fromHandlers(chain -> chain\n * .handler(RequestId.bind())\n * .handler(ctx -> {\n * ctx.getResponse().getHeaders().add(\"X-Request-Id\", ctx.getRequest().get(RequestId.class).getId());\n * ctx.render(\"ok\");\n * })\n * ).test(httpClient -> {\n * ReceivedResponse response = httpClient.get();\n * assertEquals(\"ok\", response.getBody().getText());\n *\n * // Default request ID generator generates random UUIDs (i.e. 36 chars long)\n * assertEquals(36, response.getHeaders().get(\"X-Request-Id\").length());\n * });\n * }\n * }\n * }</pre>\n * <p>\n * To use a different strategy for generating IDs, put your own implementation of {@link Generator} into the context registry before this handler.\n *\n * @return a handler that generates a request ID and adds it to the request registry\n */\n static Handler bind() {\n return ctx -> {\n Generator generator = ctx.maybeGet(Generator.class).orElse(UuidBasedRequestIdGenerator.INSTANCE);\n RequestId requestId = generator.generate(ctx);\n ctx.getRequest().add(RequestId.class, requestId);\n ctx.next();\n };\n }\n\n // TODO docs here, including explanation of the log format.\n static Handler bindAndLog() {\n return Handlers.chain(bind(), new Handler() {\n private final Logger logger = LoggerFactory.getLogger(RequestId.class);\n\n @Override\n public void handle(Context ctx) throws Exception {\n ctx.onClose((RequestOutcome outcome) -> {\n Request request = ctx.getRequest();\n StringBuilder logLine = new StringBuilder()\n .append(request.getMethod().toString())\n .append(\" \")\n .append(request.getUri())\n .append(\" \")\n .append(outcome.getResponse().getStatus().getCode());\n\n request.maybeGet(RequestId.class).ifPresent(id1 -> {\n logLine.append(\" id=\");\n logLine.append(id1.toString());\n });\n\n logger.info(logLine.toString());\n });\n\n ctx.next();\n }\n });\n }\n\n}",
"public static int nextId(String key) {\n //Setting the id to number of users created + 1 and clearing id file\n try {\n File file = FileHandler.loadFile(key + \".id\");\n InputStream input = new FileInputStream(file);\n Scanner scanner = new Scanner(input);\n int id = scanner.nextInt() + 1;\n scanner.close();\n input.close();\n FileHandler.ClearFile(file);\n //updating id file with new numbers\n PrintStream printStream = new PrintStream(new FileOutputStream(file));\n printStream.println(id);\n printStream.close();\n return id;\n } catch (FileNotFoundException fileNotFoundException) {\n fileNotFoundException.printStackTrace();\n logger.fatal(key + \"id file doesnt exist.\");\n } catch (IOException e) {\n e.printStackTrace();\n logger.error(\"couldn't read from \" + key + \" id file.\");\n }\n return -1;\n }",
"private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }",
"public void increment() {\n sync.increment();\n }",
"public TransactionID(){\r\nthis.id = transCount++;\r\n\r\n}",
"private int getNextAirportID(){\n\t\treturn this.airportIDCounter++;\n\t}",
"public static int getIdCounter() {\n return idCounter;\n }",
"public void incrementNumCompareRequests() {\n this.numCompareRequests.incrementAndGet();\n }",
"public Integer getsId() {\n return sId;\n }",
"@RequestMapping(\"/dept/sessionId\")\n\tpublic Object id(HttpServletRequest request) {\n\t\treturn request.getSession().getId() ;\n\t}",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public void incrementNumModifyDNRequests() {\n this.numModifyDNRequests.incrementAndGet();\n }",
"long incrementAndGet();",
"protected long getRecordNumber() {\n\t\treturn _nextRecordNumber.getAndIncrement();\n\t}",
"public static int getLearningObjectId(HttpServletRequest request)\n {\n Integer temp = getParams(request.getParameterMap()).getLearningObjectId();\n if (temp == null)\n {\n throw new IllegalArgumentException(Constants.ErrorMessages.LearningObjectIdNotSpecified);\n }\n return temp.intValue();\n }",
"private String nextID(String id) throws ConstraintViolationException {\r\n\t if (id == null) { // generate a new id\r\n\t if (idCounter == 0) {\r\n\t idCounter = Calendar.getInstance().get(Calendar.YEAR);\r\n\t } else {\r\n\t idCounter++;\r\n\t }\r\n\t return \"S\" + idCounter;\r\n\t } else {\r\n\t // update id\r\n\t int num;\r\n\t try {\r\n\t num = Integer.parseInt(id.substring(1));\r\n\t } catch (RuntimeException e) {\r\n\t throw new ConstraintViolationException(\r\n\t ConstraintViolationException.Code.INVALID_VALUE, e, new Object[] { id });\r\n\t }\r\n\t \r\n\t if (num > idCounter) {\r\n\t idCounter = num;\r\n\t }\r\n\t \r\n\t return id;\r\n\t }\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t \r\n}",
"public static void resetId() {\r\n nextid=1;\r\n }",
"@Override\r\n\tpublic int selectNewId() {\n\t\treturn messageMapper.selectNewId();\r\n\t}",
"private synchronized int generateItemID(){\r\n\t\tint i;\r\n\t\tfor(i = 1; items.containsKey(i) || finishedItems.containsKey(i);i++);\r\n\t\treturn i;\r\n\t}",
"public void increaseNonce() {\n this.index++;\n }",
"public void increment() {\n increment(1);\n }",
"public void incrementNumBindRequests() {\n this.numBindRequests.incrementAndGet();\n }"
] |
[
"0.82754123",
"0.7352379",
"0.72068036",
"0.6757318",
"0.6755943",
"0.67489684",
"0.6718386",
"0.6705084",
"0.6635394",
"0.6593434",
"0.65707076",
"0.6552878",
"0.6535048",
"0.6531559",
"0.64859194",
"0.64740765",
"0.6424301",
"0.6420011",
"0.6400804",
"0.6395443",
"0.638541",
"0.63839984",
"0.6376767",
"0.63474834",
"0.6341211",
"0.6314595",
"0.6285527",
"0.6252958",
"0.6228376",
"0.62190557",
"0.6188336",
"0.6149978",
"0.6138828",
"0.6123247",
"0.6123247",
"0.61183214",
"0.61181676",
"0.61086893",
"0.6105387",
"0.6096286",
"0.60721093",
"0.606998",
"0.602629",
"0.6006976",
"0.5996533",
"0.5992634",
"0.5969086",
"0.5957603",
"0.5957448",
"0.5933057",
"0.5932551",
"0.5927884",
"0.5927884",
"0.5925514",
"0.59184134",
"0.5896543",
"0.58933276",
"0.5888875",
"0.58868545",
"0.58773494",
"0.5876452",
"0.58641106",
"0.58513826",
"0.5832867",
"0.583167",
"0.5823476",
"0.58184546",
"0.5816965",
"0.58149326",
"0.58091015",
"0.58070344",
"0.5777365",
"0.57690126",
"0.57594824",
"0.57564545",
"0.575397",
"0.5730861",
"0.5729293",
"0.57285345",
"0.57233125",
"0.57210505",
"0.5711128",
"0.5703556",
"0.5701675",
"0.5698127",
"0.5684598",
"0.5683065",
"0.56783223",
"0.56547576",
"0.5645574",
"0.56429434",
"0.56314754",
"0.5624632",
"0.56149364",
"0.5614579",
"0.56130195",
"0.56075877",
"0.5604875",
"0.55987126",
"0.5598666"
] |
0.705392
|
3
|
Add request to server logs
|
public void addRequestToServerLogs(HttpExchange httpExchange, long id) {
JSONObject object = new JSONObject();
object.put("path", httpExchange.getHttpContext().getPath());
object.put("client_ip", httpExchange.getRemoteAddress().getAddress().toString());
object.put("log_time", LocalDateTime.now().toString());
object.put("type", "request");
object.put("id", id);
object.put("log_id", this.logId);
++logId;
serverLogsArray.add(object);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void logHTTPRequest(HttpServletRequest request, Logger logger);",
"public void log(HttpServletRequest request, HttpServletResponse response) {\n\t\tObjectNode ecs = getLoggableMessage(request, response);\n\t\tlog.info(new ObjectMessage(ecs));\n\t}",
"@Override\n protected void append(LoggingEvent event) {\n if (event.getMessage() instanceof WrsAccessLogEvent) {\n WrsAccessLogEvent wrsLogEvent = (WrsAccessLogEvent) event.getMessage();\n\n try {\n HttpServletRequest request = wrsLogEvent.getRequest();\n if (request != null) {\n String pageHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_PAGEHASH));\n String requestHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_REQUESTHASH));\n String sessionId = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_SESSION_ID));\n String requestUrl = request.getRequestURL().toString();\n String reqQuery = request.getQueryString();\n requestUrl += (reqQuery != null ? \"?\" + reqQuery : \"\");\n if (requestUrl.length()> 2000)\n requestUrl = requestUrl.substring(0, 2000);\n String bindingSetName = wrsLogEvent.getBindingSetName();\n if (bindingSetName != null && bindingSetName.length()> 255)\n bindingSetName = bindingSetName.substring(0, 255);\n String requestXML = wrsLogEvent.getRequestDoc()!=null ? Utils.serializeElement(wrsLogEvent.getRequestDoc()) : null;\n\n // log access\n if(AccessSqlLogger.getInstance().isEnabled()) {\n final AccessSqlLogger.LogRecord recordAccess = new AccessSqlLogger.LogRecord(\n sessionId\n , requestUrl\n , pageHash\n , requestHash\n , bindingSetName\n , requestXML\n , wrsLogEvent.getRowCount()\n , wrsLogEvent.getValueCount()\n , wrsLogEvent.getRsStartTime()\n , wrsLogEvent.getRsEndTime()\n , wrsLogEvent.getWriteDuration()\n , wrsLogEvent.getExecuteDuration()\n );\n AccessSqlLogger.getInstance().process(recordAccess);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"private void logRequest(int method, String url) {\n switch (method) {\n\n case Method.GET:\n Log.d(TAG, \"Method : GET \");\n\n break;\n case Method.POST:\n Log.d(TAG, \"Method : POST \");\n break;\n default:\n break;\n }\n Log.d(TAG, \"Request Url : \" + url);\n Log.d(TAG, \"Request Headers : \");\n logHeaders(mRequestHeaders);\n Log.d(TAG, \"Request Params : \");\n logParams(mRequestParams);\n logRequestBodyContent();\n mRequestTime = currentDateTime();\n\n }",
"public void log(Request request, Reply reply, int nbytes, long duration) {\n Client client = request.getClient();\n long date = reply.getDate();\n String user = (String) request.getState(AuthFilter.STATE_AUTHUSER);\n URL urlst = (URL) request.getState(Request.ORIG_URL_STATE);\n String requrl;\n if (urlst == null) {\n URL u = request.getURL();\n if (u == null) {\n requrl = noUrl;\n } else {\n requrl = u.toExternalForm();\n }\n } else {\n requrl = urlst.toExternalForm();\n }\n StringBuffer sb = new StringBuffer(512);\n String logs;\n int status = reply.getStatus();\n if ((status > 999) || (status < 0)) {\n status = 999;\n }\n synchronized (sb) {\n byte ib[] = client.getInetAddress().getAddress();\n if (ib.length == 4) {\n boolean doit;\n edu.hkust.clap.monitor.Monitor.loopBegin(349);\nfor (int i = 0; i < 4; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(349);\n{\n doit = false;\n int b = ib[i];\n if (b < 0) {\n b += 256;\n }\n if (b > 99) {\n sb.append((char) ('0' + (b / 100)));\n b = b % 100;\n doit = true;\n }\n if (doit || (b > 9)) {\n sb.append((char) ('0' + (b / 10)));\n b = b % 10;\n }\n sb.append((char) ('0' + b));\n if (i < 3) {\n sb.append('.');\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(349);\n\n } else {\n sb.append(client.getInetAddress().getHostAddress());\n }\n sb.append(\" - \");\n if (user == null) {\n sb.append(\"- [\");\n } else {\n sb.append(user);\n sb.append(\" [\");\n }\n dateCache(date, sb);\n sb.append(\"] \\\"\");\n sb.append(request.getMethod());\n sb.append(' ');\n sb.append(requrl);\n sb.append(' ');\n sb.append(request.getVersion());\n sb.append(\"\\\" \");\n sb.append((char) ('0' + status / 100));\n status = status % 100;\n sb.append((char) ('0' + status / 10));\n status = status % 10;\n sb.append((char) ('0' + status));\n sb.append(' ');\n if (nbytes < 0) {\n sb.append('-');\n } else {\n sb.append(nbytes);\n }\n if (request.getReferer() == null) {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"-\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"-\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n } else {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n }\n sb.append('\\n');\n logs = sb.toString();\n }\n logmsg(logs);\n }",
"@Override\n public void log(Request request, Response response)\n {\n int committedStatus = response.getCommittedMetaData().getStatus();\n\n // only interested in error cases - bad request & server errors\n if ((committedStatus >= 500) || (committedStatus == 400))\n {\n super.log(request, response);\n }\n else\n {\n System.err.println(\"### Ignored request (response.committed.status=\" + committedStatus + \"): \" + request);\n }\n }",
"void log(HandlerInput input, String message) {\n System.out.printf(\"[%s] [%s] : %s]\\n\",\n input.getRequestEnvelope().getRequest().getRequestId().toString(),\n new Date(),\n message);\n }",
"public void addElement(CharArrayWriter buf, Date date, Request request, Response response, long time)\n/* */ {\n/* 411 */ buf.append(ExtendedAccessLogValve.wrap(urlEncode(request.getParameter(this.parameter))));\n/* */ }",
"public void setupLoggingEndpoint() {\n HttpHandler handler = (httpExchange) -> {\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(serverLogsArray.toJSONString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));\n this.setHandler(this.getLoggingApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);\n }",
"public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"@Override\n\tpublic void doFilter(ServletRequest req, ServletResponse resp, FilterChain filterChain)\n\t\t\tthrows IOException, ServletException {\n\t\tif(filterConfig == null){\n\t\t\tthrow new ServletException(\"FilterConfig not set before first request\");\n\t\t}\n\t\tfilterConfig.getServletContext().log(\"in LoggerFilter\");\n\t\tSystem.out.println(\"in LoggerFilter\");\n\t\t\n\t\tlong starTime=System.currentTimeMillis();\n\t\tString remoteAddress=req.getRemoteAddr();\n\t\tString remoteHost=req.getRemoteHost();\n\t\tHttpServletRequest myReq=(HttpServletRequest) req;\n\t\tString reqURI=myReq.getRequestURI();\n\t\tSystem.out.println(reqURI);\n\t\tSystem.out.println(remoteAddress);\n\t\tSystem.out.println(remoteHost);\n\t\t\treq.setAttribute(\"URI\", reqURI);\n\t\t\treq.setAttribute(\"RAddress\", remoteAddress);\n\t\t\treq.setAttribute(\"RHost\", remoteHost);\n\t\t\tfilterChain.doFilter(req, resp);\n\t}",
"void logHTTPRequest(HttpServletRequest request, Logger logger, List parameterNamesToObfuscate);",
"public void add_to_log(String s){\n }",
"public void addRequest(Request req) {\n\n }",
"public int logRequest(String ipAddress, String requestXML) {\r\n\t\treturn loggingProcess.logRequest(requestXML, ipAddress, appId);\r\n\t}",
"protected void logTrace( HttpServletRequest req, String str ) {\r\n\tif (!isDebugMode()) return;\r\n\ttry {\r\n\t StringBuffer sb = new StringBuffer();\r\n\t sb.append(\"\\n---------- Gateway trace message:\\n\");\r\n\t sb.append(\"Trace message: \" + str + \"\\n\");\r\n\t sb.append(\"Request method: \" + req.getMethod() + \"\\n\");\r\n\t sb.append(\"Query string: \" + req.getQueryString() + \"\\n\");\r\n\t sb.append(\"Content length: \" + req.getContentLength() + \"\\n\");\r\n\t sb.append(\"Cookies: ( session info )\\n\");\r\n\t Cookie[] cookies = req.getCookies();\r\n\t if (cookies == null || cookies.length == 0)\r\n\t\tsb.append(\"No cookies in the HTTP request\\n\");\r\n\t else {\r\n\t\tfor (int i = 0; i < cookies.length; i++) {\r\n\t\t sb.append(\"\\tName: \" + cookies[i].getName() + \"\\t\" + \"Value: \" + cookies[i].getValue() + \"\\n\");\r\n\t\t}\r\n\t }\r\n\t sb.append(\"\\n\");\r\n\t m_ctx.log( sb.toString() );\r\n\t} catch (Exception e) {\r\n\t System.err.println(\"Error logging a message\");\r\n\t}\r\n }",
"public void log(String msg) {\n if(Debug.isEnabled()){ \n filterConfig.getServletContext().log(msg); //Shows in the Tomcat logs \n Debug.println(msg);\n }\n }",
"static Handler bindAndLog() {\n return Handlers.chain(bind(), new Handler() {\n private final Logger logger = LoggerFactory.getLogger(RequestId.class);\n\n @Override\n public void handle(Context ctx) throws Exception {\n ctx.onClose((RequestOutcome outcome) -> {\n Request request = ctx.getRequest();\n StringBuilder logLine = new StringBuilder()\n .append(request.getMethod().toString())\n .append(\" \")\n .append(request.getUri())\n .append(\" \")\n .append(outcome.getResponse().getStatus().getCode());\n\n request.maybeGet(RequestId.class).ifPresent(id1 -> {\n logLine.append(\" id=\");\n logLine.append(id1.toString());\n });\n\n logger.info(logLine.toString());\n });\n\n ctx.next();\n }\n });\n }",
"private void sendRequest(Request request) {\n\t\tif (url==null) {\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tif (request.cmd==null) {\n\t\t\t// allows running custom request in Postman thread\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tif (request.requiresServerToken && this.serverToken==null) {\n\t\t\trequest.response(false, null);\n\t\t\treturn;\n\t\t}\n\t\tJSONObject answer = null;\n\t\ttry {\n\t\t\tHttpURLConnection conn = createHttpURLConnection(url);\n\t\t\tconn.setUseCaches(false);\n\t\t\tconn.setRequestProperty(\"connection\", \"close\"); // disable keep alive\n\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\tif (serverToken!=null) {\n\t\t\t\tconn.setRequestProperty(\"X-EPILOG-SERVER-TOKEN\", serverToken);\n\t\t\t}\n\t\t\tconn.setRequestProperty(\"X-EPILOG-COMMAND\", request.cmd);\n\t\t\tconn.setRequestProperty(\"X-EPILOG-VERSION\", this.plugin.version);\n\t\t\tconn.setRequestProperty(\"X-EPILOG-TIME\", \"\"+System.currentTimeMillis());\n\t\t\tJSONObject info = request.info;\n\t\t\tinfo.put(\"logSendLimit\", this.logSendLimit);\n\t\t\tinfo.put(\"logCacheSize\", this.logQueue.size() + this.pendingLogs.size());\n\t\t\tinfo.put(\"nLogs\", request.data==null ? 0 : request.data.size());\n\t\t\tconn.setRequestProperty(\"X-EPILOG-INFO\", info.toString());\n\t\t\tconn.setDoOutput(true);\n\t\t\t\n\t\t\tGZIPOutputStream out = new GZIPOutputStream(conn.getOutputStream());\n\t\t\tif (request.data!=null) {\n\t\t\t\tfor (JSONObject json : request.data) {\n\t\t\t\t\tout.write(json.toString().getBytes());\n\t\t\t\t\tout.write(0xA); // newline\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t\tInputStream in = conn.getInputStream();\n\t\t\tString response = convertStreamToString(in);\n\t\t\tin.close();\n\t\t\tconn.disconnect();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tanswer = new JSONObject(response);\n\t\t\t\thandleRequestResponse(answer);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthis.plugin.getLogger().warning(\"invalid server response\");\n\t\t\t\tthis.plugin.getLogger().log(Level.INFO, response);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tboolean success = answer!=null;\n\t\tif (success) {\n\t\t\tString status = answer.optString(\"status\");\n\t\t\tif (!status.equalsIgnoreCase(\"ok\")) {\n\t\t\t\tsuccess = false;\n\t\t\t\tthis.plugin.getLogger().warning(\"server error\");\n\t\t\t\tthis.plugin.getLogger().log(Level.INFO, answer.toString());\n\t\t\t}\n\t\t}\n\t\trequest.response(success, answer);\n\t}",
"private void addLog(String log) {\n LogHelper.addIdentificationLog(log);\n }",
"@Bean\n\tpublic CommonsRequestLoggingFilter logFilter() {\n\t\tCommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter();\n\t\tfilter.setIncludeQueryString(true);\n\t\tfilter.setIncludePayload(true);\n\t\tfilter.setMaxPayloadLength(10000);\n\t\tfilter.setIncludeHeaders(false);\n\t\tfilter.setAfterMessagePrefix(\"REQUEST DATA : \");\n\t\treturn filter;\n\t}",
"@Override\n public void addRequest(Request<?> request, Object tag) {\n request.setTag(tag);\n getRequestQueue().add(request);\n }",
"@Override\n public HttpResponse filterRequest(HttpRequest request, HttpMessageContents contents, HttpMessageInfo messageInfo) {\n timestampWriter.write(new HttpRequestDetail(System.currentTimeMillis(), request, contents, messageInfo));\n return null;\n }",
"public void requestAppendLog(AppendLogCommand appendLogCmd) throws PandaException {\r\n\r\n //logger.info(\"request Append in ,UUID : {}\", cmd.getUuid());\r\n // uuid is handled ?\r\n \r\n if(this.counter.size() > 300) return ;\r\n\r\n if (uuidHadRequest(appendLogCmd)) {\r\n\r\n\r\n return;\r\n }\r\n \r\n \r\n\r\n\r\n counter.initCmdCounter(appendLogCmd, corePeer.getMemberPeers().size());\r\n\r\n\r\n corePeer.getStore().appendCommand(appendLogCmd);// leader store\r\n\r\n \r\n leaderHandler.sendToAllFollowers(appendLogCmd);\r\n\r\n\r\n\r\n }",
"private static void logInfo(Request req, Path tempFile) throws IOException, ServletException {\n System.out.println(\"Uploaded file '\" + getFileName(req.raw().getPart(\"uploaded_file\")) + \"' saved as '\" + tempFile.toAbsolutePath() + \"'\");\n }",
"@Override\n public void log()\n {\n }",
"public void addRequest(T request) {\n\t\tinputQueue.add(request);\n\t}",
"public void addRequest(Request q) {\n\t\trequestList.add(q);\n\t}",
"protected final void log(String msg)\r\n {\r\n Debug.println(\"Server: \" + msg);\r\n }",
"private void Log(String action) {\r\n\t}",
"public void startRequestTracking(HttpServletRequest arg0, HttpServletResponse arg1);",
"private ACLMessage respondToLogMessage(ACLMessage request, Action a) {\n\t\t\n\t\tLogMessage logMessage = (LogMessage) a.getAction();\t\t\n\t\tString message = logMessage.getMessage();\n\t\tgetLogger().log(Level.INFO, message);\n\t\t\n\t\treturn null;\n\t}",
"CompletableFuture<LogReplicationResponse> requestLogReplication(\n MemberId server, LogReplicationRequest request);",
"public synchronized void onNewRequest() {\r\n\t\tallRequestsTracker.onNewRequest();\r\n\t\trecentRequestsTracker.onNewRequest();\r\n\t}",
"private void toLog(HttpUtils.HttpResult httpResult) {\n Log.d(DEBUG_REQUEST, \"request url: \" + url);\n Log.d(DEBUG_REQUEST, \"request envelope: \" + envelope);\n Log.d(DEBUG_REQUEST, \"request type: \" + requestType);\n if (httpResult != null) {\n Log.d(DEBUG_REQUEST, \"response code: \" + httpResult.getCode());\n Log.d(DEBUG_REQUEST, \"response envelope: \" + httpResult.getEnvelope());\n } else {\n Log.d(DEBUG_REQUEST, \"response null\");\n }\n }",
"@Override\n public void log(String message) {\n }",
"protected void logging(Message message) throws Fault {\n\t\tif (message.containsKey(LoggingMessage.ID_KEY)) {\n return;\n }\n String id = (String)message.getExchange().get(LoggingMessage.ID_KEY);\n if (id == null) {\n id = LoggingMessage.nextId();\n message.getExchange().put(LoggingMessage.ID_KEY, id);\n }\n message.put(LoggingMessage.ID_KEY, id);\n final LoggingMessage buffer \n = new LoggingMessage(\"Inbound Message\\n--------------------------\", id);\n\n Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE);\n if (responseCode != null) {\n buffer.getResponseCode().append(responseCode);\n }\n\n String encoding = (String)message.get(Message.ENCODING);\n\n if (encoding != null) {\n buffer.getEncoding().append(encoding);\n }\n String httpMethod = (String)message.get(Message.HTTP_REQUEST_METHOD);\n if (httpMethod != null) {\n buffer.getHttpMethod().append(httpMethod);\n }\n String ct = (String)message.get(Message.CONTENT_TYPE);\n if (ct != null) {\n buffer.getContentType().append(ct);\n }\n Object headers = message.get(Message.PROTOCOL_HEADERS);\n\n if (headers != null) {\n buffer.getHeader().append(headers);\n }\n String uri = (String)message.get(Message.REQUEST_URL);\n if (uri != null) {\n buffer.getAddress().append(uri);\n String query = (String)message.get(Message.QUERY_STRING);\n if (query != null) {\n buffer.getAddress().append(\"?\").append(query);\n }\n }\n \n if (!isShowBinaryContent() && isBinaryContent(ct)) {\n buffer.getMessage().append(BINARY_CONTENT_MESSAGE).append('\\n');\n log.handle(RequestLogController.getInstance().getRequestLogLevel(), \n \t\tbuffer.toString());\n return;\n }\n \n InputStream is = message.getContent(InputStream.class);\n if (is != null) {\n CachedOutputStream bos = new CachedOutputStream();\n if (threshold > 0) {\n bos.setThreshold(threshold);\n }\n try {\n // use the appropriate input stream and restore it later\n InputStream bis = is instanceof DelegatingInputStream \n ? ((DelegatingInputStream)is).getInputStream() : is;\n \n IOUtils.copyAndCloseInput(bis, bos);\n bos.flush();\n bis = bos.getInputStream();\n \n // restore the delegating input stream or the input stream\n if (is instanceof DelegatingInputStream) {\n ((DelegatingInputStream)is).setInputStream(bis);\n } else {\n message.setContent(InputStream.class, bis);\n }\n\n if (bos.getTempFile() != null) {\n //large thing on disk...\n buffer.getMessage().append(\"\\nMessage (saved to tmp file):\\n\");\n buffer.getMessage().append(\"Filename: \" + bos.getTempFile().getAbsolutePath() + \"\\n\");\n }\n if (bos.size() > limit) {\n buffer.getMessage().append(\"(message truncated to \" + limit + \" bytes)\\n\");\n }\n writePayload(buffer.getPayload(), bos, encoding, ct); \n \n bos.close();\n } catch (Exception e) {\n throw new Fault(e);\n }\n }\n log.handle(RequestLogController.getInstance().getRequestLogLevel(), \n \t\tbuffer.toString());\n\t}",
"abstract protected void _log(TrackingEvent event) throws Exception;",
"@Override\r\n protected void append(LoggingEvent event)\r\n {\n String category = event.getLoggerName();\r\n String logMessage = event.getRenderedMessage();\r\n String nestedDiagnosticContext = event.getNDC();\r\n String threadDescription = event.getThreadName();\r\n String level = event.getLevel().toString();\r\n long time = event.timeStamp;\r\n LocationInfo locationInfo = event.getLocationInformation();\r\n\r\n // Add the logging event information to a LogRecord\r\n Log4JLogRecord record = new Log4JLogRecord();\r\n\r\n record.setCategory(category);\r\n record.setMessage(logMessage);\r\n record.setLocation(locationInfo.fullInfo);\r\n record.setMillis(time);\r\n record.setThreadDescription(threadDescription);\r\n\r\n if (nestedDiagnosticContext != null) {\r\n record.setNDC(nestedDiagnosticContext);\r\n } else {\r\n record.setNDC(\"\");\r\n }\r\n\r\n if (event.getThrowableInformation() != null) {\r\n record.setThrownStackTrace(event.getThrowableInformation());\r\n }\r\n\r\n try {\r\n record.setLevel(LogLevel.valueOf(level));\r\n } catch (LogLevelFormatException e) {\r\n // If the priority level doesn't match one of the predefined\r\n // log levels, then set the level to warning.\r\n record.setLevel(LogLevel.WARN);\r\n }\r\n MgcLogBrokerMonitor monitor = Lf5MainWindowController.getMonitor();\r\n if (monitor != null) {\r\n monitor.addMessage(record);\r\n }\r\n }",
"private void log(String url, String headers, String body, String response, Date startTime, Date endTime) {\n\n TranslatorLog translatorLog = new TranslatorLog();\n translatorLog.setId(GeneratorKit.getUUID());\n translatorLog.setUrl(url);\n translatorLog.setHeaders(headers);\n translatorLog.setBody(body);\n translatorLog.setResponse(response);\n translatorLog.setStartTime(startTime);\n translatorLog.setEndTime(endTime);\n translatorLogMapper.insertSelective(translatorLog);\n }",
"public static void addLog(int _sid, String _query, int _did, String _action){\n Logger log = new Logger(_sid, _query, _did, _action);\n if(_logs.containsKey(_sid) == false){\n _logs.put(_sid, new Vector<Logger>());\n }\n _logs.get(_sid).add(log);\n }",
"@Override\n public void logs() {\n \n }",
"@Override\n\tpublic void processRequest(RequestEvent requestEvent) {\n\t\t requestEvent.getServerTransaction();\n\t\tSystem.out.println(\"Sending ------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"[]:\"+requestEvent.toString());\n\t}",
"@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n private void addTrafficStatsTag(Request<?> request) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n TrafficStats.setThreadStatsTag(request.getTrafficStatsTag());\n }\n }",
"public void updateRequestTrail(String request) throws RemoteException;",
"public void addLog(Log p) {\n logs.add(p);\n }",
"public void log(final String s) {\n if (this.logWatcher == null) { return; }\n final Date date = Calendar.getInstance().getTime();\n final Timestamp time = new Timestamp(date.getTime());\n this.logWatcher.add(\"[\" + time.toString() + \"] \" + s);\n }",
"private void log(String s) {\n RlogEx.i(TAG, s);\n }",
"public <T> void addToRequestQueue(Request<T> request) {\n getRequestQueue().add(request); // Add the specified request to the request queue\n }",
"public void uploadLogCollection();",
"Response<Void> logApplicationStart(String uniqueIdentifier);",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}",
"void logModuleEvent(ModuleInfo module, String action, String value) {\n\t\tList<NameValuePair> pairs = new ArrayList<NameValuePair>();\n\t\tpairs.add(new BasicNameValuePair(\"user\", module.getUser()));\n\t\tpairs.add(new BasicNameValuePair(\"moduleName\", module.getModuleName()));\n\t\tpairs.add(new BasicNameValuePair(\"moduleType\", module.getModuleType()));\n\t\tpairs.add(new BasicNameValuePair(\"action\", action));\n\t\tpairs.add(new BasicNameValuePair(\"message\", value));\n\t\ttry {\n\t\t\thttpPostLog.setEntity(new UrlEncodedFormEntity(pairs));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(httpPostLog);\n\t\t\tLog.i(\"HttpResponse\", response.getEntity().toString());\n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void appendLog(String log) {\n\t\tif (mTracker != null && mDebugLogFile) {\n\t\t\tmTracker.appendLog(log);\n\t\t}\n\t}",
"void log(String source, String line);",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"protected void log(String s ) {\r\n\tmessageSB.append( s ).append(\"\\r\\n\");\r\n }",
"void log(String line);",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"void log();",
"@Override\r\n\tpublic void update(Observable arg0, Object arg1) {\r\n\t\trequestHandler = (G52APRRequestHandler)arg0;\r\n\t\tloggerState = requestHandler.getLoggerState();\r\n\r\n\t\t/** Depends on different logger state, it will write different kinds of details */\r\n\t\tswitch (loggerState){\r\n\t\tcase '>' :\r\n\t\t\twriter.print(\"\\n\" + formatDate(new Date()) + \", \" + loggerState + \", \" + requestHandler.getFileName()\r\n\t\t\t\t\t+ \", \" + requestHandler.getRequestLine()); break;\r\n\t\tcase '<' :\r\n\t\t\twriter.print(\"\\n\" + formatDate(new Date()) + \", \" + loggerState + \", \" + requestHandler.getFileName()\r\n\t\t\t\t\t+ \", \" + requestHandler.getStatusLine()); break;\r\n\t\t}\r\n\t\twriter.flush();\r\n\t}",
"private String toLoggableString() {\n\t\tString string = canceled ? \"canceled call\" : \"call\";\n\t\tHttpUrl redactedUrl = originalRequest.url().resolve(\"/...\");\n\t\treturn string + \" to \" + redactedUrl;\n\t}",
"private void log(String s) {\n Rlog.i(TAG, s);\n }",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}",
"public <T> void addToRequestQueue(Request<T> req) {\n req.setTag(TAG);\n getRequestQueue().add(req);\n }",
"public <T> void addToRequestQueue(Request<T> req) {\n req.setTag(TAG);\n getRequestQueue().add(req);\n }",
"public <T> void addToRequestQueue(Request<T> req) {\n req.setTag(TAG);\n getRequestQueue().add(req);\n }",
"public void addAccessRequestHistory(AccessRequestHistoryItem item) {\n if (!getAccessRequestHistory().contains(item)) {\n getAccessRequestHistory().add(item);\n }\n }",
"public void insertAllLocationCrwalLog(HttpServletRequest request) throws JoymeDBException, JoymeServiceException {\n String key = request.getParameter(\"key\").trim();\n CrwalLog bean = new CrwalLog();\n bean.setCrwalKey(key);\n bean.setIsFinish(0);\n bean.setIsRunning(0);\n bean.setCreateTime(new Timestamp(System.currentTimeMillis()));\n bean.setCrwalType(1);\n this.insertCrwalLog(null, bean);\n }",
"public boolean append(Request si) throws IOException {\n if (this.snapLog.append(si)) {\n txnCount.incrementAndGet();\n return true;\n }\n return false;\n }",
"protected void logEntry(String logString) {\n\t\tReporter.log(logString, true);\n\t}",
"public void logCall( PeerInfo client, PeerInfo server, String signature, Message request, Message response, String errorMessage, int correlationId, long requestTS, long responseTS );",
"public synchronized void crit_request(int ts,String filename)\n {\n out.println(\"REQUEST\");\n out.println(ts);\n out.println(my_c_id);\n out.println(filename);\n }",
"LogTailer startTailing();",
"public void add_entry(final Link link, ForwardingInfo.action_t action,\r\n\t\t\tstate_t state, final CustodyTimerSpec custody_timer) {\r\n\r\n\t\tlock_.lock();\r\n\r\n\t\ttry {\r\n\t\t\tlog_.add(new ForwardingInfo(state, action, link.name_str(),\r\n\t\t\t\t\t0xffffffff, link.remote_eid(), custody_timer));\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\r\n\t\t}\r\n\t}",
"protected void logError( HttpServletRequest req, HttpServletResponse resp, Exception ex, String str ) {\r\n\ttry {\r\n\t StringBuffer sb = new StringBuffer();\r\n\t sb.append(\"\\n---------- Gateway error:\\n\");\r\n\t sb.append(\"Error message: \" + str + \"\\n\");\r\n\t sb.append(\"Request method: \" + req.getMethod() + \"\\n\");\r\n\t sb.append(\"Query string: \" + req.getQueryString() + \"\\n\");\r\n\t sb.append(\"Content length: \" + req.getContentLength() + \"\\n\");\r\n\t sb.append(\"Cookies: ( session info )\\n\");\r\n\t Cookie[] cookies = req.getCookies();\r\n\t if (cookies == null || cookies.length == 0)\r\n\t\tsb.append(\"No cookies in the HTTP request\\n\");\r\n\t else {\r\n\t\tfor (int i = 0; i < cookies.length; i++) {\r\n\t\t sb.append(\"\\tName: \" + cookies[i].getName() + \"\\t\" + \"Value: \" + cookies[i].getValue() + \"\\n\");\r\n\t\t}\r\n\t }\r\n\t sb.append(\"\\n\");\r\n\t m_ctx.log( sb.toString(), ex );\r\n\t} catch (Exception e) {\r\n\t System.err.println(\"Error logging a message\");\r\n\t}\r\n }",
"public void log(String str)\n\t{\n\t\tDate date = new Date();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm\");\n\t\t\n\t\tString loggable = dateFormat.format(date) + \": \" + str;\n\t\t\n\t\t// Add it to the log\n\t\tthis.log.add(loggable);\n\t\t\n\t\t// Print it out, for now.\n\t\tSystem.out.println(loggable); \n\t}",
"@Override\r\n\t\t\tpublic void handle(final HttpServerRequest req) {\n\t\t\t\tString startTime = \"1355562000000\"; //--multi-dist\r\n\t\t\t\tIterator<EventInfo> iter = \r\n\t\t\t\t\t\tdataService.events()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(EventInfo.class).iterator();\r\n\t\t\t\tEventCounter multiCounter = new EventCounter(\"/multi\");\r\n\t\t\t\tint processed = 0;\r\n\t\t\t\twhile (iter.hasNext() && processed < limit) {\r\n\t\t\t\t\tEventInfo event = iter.next();\r\n\t\t\t\t\tmultiCounter.countEvent(event);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treq.response.setChunked(true);\r\n\t\t\t\tmultiCounter.printDistance(req, \"multidist\");\r\n\t\t\t\t//multiCounter.printResponse(req, \"multidist\");\r\n\t\t\t\t//use response time data\r\n\t\t\t\tIterator<ResponseInfo> respIter = \r\n\t\t\t\t\t\tdataService.response()\r\n\t\t\t\t\t\t\t.find(\"{timestamp:{$gt:\"+startTime+\"}}\")\r\n\t\t\t\t\t\t\t.sort(\"{timestamp:1}\")\r\n\t\t\t\t\t\t\t.as(ResponseInfo.class).iterator();\r\n\t\t\t\tResponseCounter responseCounter = new ResponseCounter();\r\n\t\t\t\tprocessed = 0;\r\n\t\t\t\twhile (respIter.hasNext() && processed < limit) {\r\n\t\t\t\t\tResponseInfo resp = respIter.next();\r\n\t\t\t\t\tresponseCounter.count(resp);\r\n\t\t\t\t\tprocessed++;\r\n\t\t\t\t}\r\n\t\t\t\tresponseCounter.printResponse(req, \"multidist\");\r\n\r\n\t\t\t\treq.response.end();\r\n\t\t\t}",
"@Override\n public void append( LogEvent event ) {\n long eventTimestamp;\n if (event instanceof AbstractLoggingEvent) {\n eventTimestamp = ((AbstractLoggingEvent) event).getTimestamp();\n } else {\n eventTimestamp = System.currentTimeMillis();\n }\n LogEventRequest packedEvent = new LogEventRequest(Thread.currentThread().getName(), // Remember which thread this event belongs to\n event, eventTimestamp); // Remember the event time\n\n if (event instanceof AbstractLoggingEvent) {\n AbstractLoggingEvent dbLoggingEvent = (AbstractLoggingEvent) event;\n switch (dbLoggingEvent.getEventType()) {\n\n case START_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the test case id, which we will later pass to ATS agent\n testCaseState.setTestcaseId(eventProcessor.getTestCaseId());\n\n // clear last testcase id\n testCaseState.clearLastExecutedTestcaseId();\n\n //this event has already been through the queue\n return;\n }\n case END_TEST_CASE: {\n\n // on Test Executor side we block until the test case start is committed in the DB\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n // remember the last executed test case id\n testCaseState.setLastExecutedTestcaseId(testCaseState.getTestcaseId());\n\n // clear test case id\n testCaseState.clearTestcaseId();\n // this event has already been through the queue\n return;\n }\n case GET_CURRENT_TEST_CASE_STATE: {\n // get current test case id which will be passed to ATS agent\n ((GetCurrentTestCaseEvent) event).setTestCaseState(testCaseState);\n\n //this event should not go through the queue\n return;\n }\n case START_RUN:\n\n /* We synchronize the run start:\n * Here we make sure we are able to connect to the log DB.\n * We also check the integrity of the DB schema.\n * If we fail here, it does not make sense to run tests at all\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n Level level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n // create the queue logging thread and the DbEventRequestProcessor\n if (queueLogger == null) {\n initializeDbLogging(null);\n }\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, false);\n //this event has already been through the queue\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n return;\n case END_RUN: {\n /* We synchronize the run end.\n * This way if there are remaining log events in the Test Executor's queue,\n * the JVM will not be shutdown prior to committing all events in the DB, as\n * the END_RUN event is the last one in the queue\n */\n atsConsoleLogger.info(\"Waiting for \"\n + event.getClass().getSimpleName()\n + \" event completion\");\n\n /** disable root logger's logging in order to prevent deadlock **/\n level = LogManager.getRootLogger().getLevel();\n Configurator.setRootLevel(Level.OFF);\n\n AtsConsoleLogger.setLevel(level);\n\n waitForEventToBeExecuted(packedEvent, dbLoggingEvent, true);\n\n /*Revert Logger's level*/\n Configurator.setRootLevel(level);\n AtsConsoleLogger.setLevel(level);\n\n //this event has already been through the queue\n return;\n }\n case DELETE_TEST_CASE: {\n // tell the thread on the other side of the queue, that this test case is to be deleted\n // on first chance\n eventProcessor.requestTestcaseDeletion( ((DeleteTestCaseEvent) dbLoggingEvent).getTestCaseId());\n // this event is not going through the queue\n return;\n }\n default:\n // do nothing about this event\n break;\n }\n }\n\n passEventToLoggerQueue(packedEvent);\n }",
"public <T> void addToRequestQueue(Request<T> req) {\n // set the default tag if tag is empty\n req.setTag(TAG);\n\n getRequestQueue().add(req);\n }",
"@Override\n public void onNext(RequestData request) {\n System.out.println(\"Requestor:\" + request.getName());\n System.out.println(\"Request Message:\" + request.getMessage());\n }",
"protected void slflog(String operation, String repositoryId) {\r\n\t\tif (repositoryId == null) {\r\n\t\t\trepositoryId = \"<none>\";\r\n\t\t}\r\n\r\n\t\tHttpServletRequest request = (HttpServletRequest) getCallContext().get(CallContext.HTTP_SERVLET_REQUEST);\r\n\t\tString userAgent = request.getHeader(\"User-Agent\");\r\n\t\tif (userAgent == null) {\r\n\t\t\tuserAgent = \"<unknown>\";\r\n\t\t}\r\n\r\n\t\tString binding = getCallContext().getBinding();\r\n\r\n\t\tLOG.info(\"Operation: {}, Repository ID: {}, Binding: {}, User Agent: {}\", operation, repositoryId, binding,\r\n\t\t\t\tuserAgent);\r\n\t\t\r\n\t\t// also dump to console for testing\r\n\t\tString result =\r\n\t\tString.format(\"Operation: %s, Repository ID: %s, Binding: %s, User Agent: %s\", \r\n\t\t\t\toperation, repositoryId, binding, userAgent);\r\n\t\tSystem.out.println(result);\r\n\t}",
"public void addRR(Request req) {\n\n }",
"public static void log(String line) {\r\n\t\tcitiesLogger.info(line);\r\n\t}",
"@Override\n\tpublic void insertOrderOutCallLog(Map req) {\n\t\tString log_id=this.baseDaoSupport.getSequences(\"o_outcall_log\");\n\t\treq.put(\"log_id\",log_id);\n//\t\tthis.baseDaoSupport.in\n\t this.baseDaoSupport.insert(\"es_order_outcall_log\", req);\n\t}",
"private void recordPushLog(String configName) {\n PushLog pushLog = new PushLog();\n pushLog.setAppId(client.getAppId());\n pushLog.setConfig(configName);\n pushLog.setClient(IP4s.intToIp(client.getIp()) + \":\" + client.getPid());\n pushLog.setServer(serverHost.get());\n pushLog.setCtime(new Date());\n pushLogService.add(pushLog);\n }",
"private void logRequestComplete(String method) {\n\t\tRetailUnitOfMeasureController.logger.info(\n\t\t\t\tString.format(RetailUnitOfMeasureController.LOG_COMPLETE_MESSAGE, method));\n\t}",
"public void addRequest( Request currentRequest)\r\n\t{\r\n\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"--------- Currently all elevators in the system are Occupied ------\");\t\r\n\t\t\tSystem.out.println(\"--------- Request to Go to Floor \" + currentRequest.getDestinationflour()+\" From Floor\" + currentRequest.getCurrentFlour() +\" has been added to the System --------\");\r\n\t\t\tcheckAvaliableElevators();\t\r\n\t\t}\r\n\t\t\r\n\t\tprocessRequest(currentRequest);\t\t\r\n\t\t\r\n\t}",
"public void addLog(String item) {\n\t\tlong itemTime = System.currentTimeMillis();\r\n\r\n\t\t// Measure total time\r\n\t\tlong itemTotalTime = (itemTime - start) / 1000;\r\n\t\tReporter.log(\"<td> - \" + item + itemTotalTime + \" </td>\");\r\n\t}",
"public void log (Object msg) {\n getLogEvent().addMessage (msg);\n }",
"public void addRequest(LocationRequest request) {\n if (request != null) {\n this.request.addRequest(request);\n enable();\n }\n }",
"public void log(String msg) {\n\n\t}",
"public void add_entry(final Registration reg,\r\n\t\t\tForwardingInfo.action_t action, state_t state) {\r\n\r\n\t\tlock_.lock();\r\n\r\n\t\ttry {\r\n\t\t\tString name = String.format(\"registration-%d\", reg.regid());\r\n\t\t\tCustodyTimerSpec spec = CustodyTimerSpec.getDefaultInstance();\r\n\r\n\t\t\tlog_.add(new ForwardingInfo(state, action, name, reg.regid(), reg\r\n\t\t\t\t\t.endpoint(), spec));\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\r\n\t\t}\r\n\r\n\t}",
"public void logMessage(String msg) {\n messageLogs.add(msg);\n }"
] |
[
"0.72522783",
"0.70939404",
"0.70714426",
"0.70050657",
"0.6772897",
"0.65563667",
"0.6370783",
"0.6136315",
"0.60822386",
"0.603967",
"0.6038959",
"0.603882",
"0.60354817",
"0.6017988",
"0.6000883",
"0.59956133",
"0.5953692",
"0.59304655",
"0.5926742",
"0.5909821",
"0.5871733",
"0.58622396",
"0.5841877",
"0.5810136",
"0.580251",
"0.58014566",
"0.57904446",
"0.5757071",
"0.57439566",
"0.5740953",
"0.57158524",
"0.57146066",
"0.5714024",
"0.57047784",
"0.5677074",
"0.56728673",
"0.5653681",
"0.5639701",
"0.5619085",
"0.5608737",
"0.5593294",
"0.5587579",
"0.5573321",
"0.55668455",
"0.5563942",
"0.5544829",
"0.55370855",
"0.5512393",
"0.5504716",
"0.5504641",
"0.5501605",
"0.5495263",
"0.5487591",
"0.5484104",
"0.5479208",
"0.5476612",
"0.5476406",
"0.54743165",
"0.5457647",
"0.54491425",
"0.54203707",
"0.54155034",
"0.54155034",
"0.54155034",
"0.54120857",
"0.5396604",
"0.5396441",
"0.5385962",
"0.5384611",
"0.53661996",
"0.5364766",
"0.5364766",
"0.5364766",
"0.5364177",
"0.53612524",
"0.53578186",
"0.5352783",
"0.5348759",
"0.5345949",
"0.53432155",
"0.532748",
"0.5326878",
"0.53256005",
"0.53219235",
"0.5311406",
"0.53104764",
"0.5309536",
"0.5304496",
"0.53001374",
"0.5298774",
"0.52982974",
"0.5297885",
"0.52968395",
"0.5296071",
"0.5282253",
"0.5281688",
"0.52795887",
"0.5277241",
"0.52749425",
"0.52747226"
] |
0.6918539
|
4
|
Add response to server logs
|
public void addResponseToServerLogs(HttpExchange httpExchange, int statusCode, String responseMessage, String contentType, long id) {
JSONObject object = new JSONObject();
object.put("path", httpExchange.getHttpContext().getPath());
object.put("client_ip", httpExchange.getRemoteAddress().getAddress().toString());
object.put("log_time", LocalDateTime.now().toString());
object.put("type", "response");
object.put("id", id);
object.put("status_code", statusCode);
object.put("response_message", responseMessage);
object.put("content_type", contentType);
object.put("log_id", logId);
++logId;
serverLogsArray.add(object);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}",
"public void log(HttpServletRequest request, HttpServletResponse response) {\n\t\tObjectNode ecs = getLoggableMessage(request, response);\n\t\tlog.info(new ObjectMessage(ecs));\n\t}",
"public void appendMessage(String response) {\n\t\tthis.append(response + newline);\n\t}",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }",
"private void handleRequestResponse(JSONObject answer) {\n\t\tJSONArray events = answer.optJSONArray(\"events\");\n\t\tif (events!=null) {\n\t\t\tlong time = System.currentTimeMillis();\n\t\t\tint length = events.length();\n\t\t\tfor (int i=0; i<length; i++) {\n\t\t\t\tLogEvent event = LogEvent.fromJSON(events.getJSONObject(i));\n\t\t\t\tevent.time = time;\n\t\t\t\tevent.ignore = true; // don't send back to logging server\n\t\t\t\tthis.plugin.postEvent(event);\n\t\t\t}\n\t\t}\n\t\tJSONObject plugins = answer.optJSONObject(\"plugins\");\n\t\tif (plugins!=null && !plugin.bukkitMode) {\n\t\t\tthis.plugin.updater.setAvailablePlugins(plugins);\n\t\t}\n\t}",
"protected void handlePostExecution(Logger log) {\n \n handleException(log);\n \n // TODO: should status=0 (success?) be left as-is in the response header?\n SolrCore.postDecorateResponse(null, solrRequest, solrResponse);\n addDeprecatedWarning();\n\n if (log.isInfoEnabled() && solrResponse.getToLog().size() > 0) {\n log.info(solrResponse.getToLogAsString(solrCore.getLogId()));\n }\n }",
"@Override\n public void filterResponse(HttpResponse response, HttpMessageContents contents, HttpMessageInfo messageInfo) {\n timestampWriter.write(new HttpResponseDetail(System.currentTimeMillis(), response, contents, messageInfo));\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\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 public void log(Request request, Response response)\n {\n int committedStatus = response.getCommittedMetaData().getStatus();\n\n // only interested in error cases - bad request & server errors\n if ((committedStatus >= 500) || (committedStatus == 400))\n {\n super.log(request, response);\n }\n else\n {\n System.err.println(\"### Ignored request (response.committed.status=\" + committedStatus + \"): \" + request);\n }\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 protected void append(LoggingEvent event) {\n if (event.getMessage() instanceof WrsAccessLogEvent) {\n WrsAccessLogEvent wrsLogEvent = (WrsAccessLogEvent) event.getMessage();\n\n try {\n HttpServletRequest request = wrsLogEvent.getRequest();\n if (request != null) {\n String pageHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_PAGEHASH));\n String requestHash = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_BCD_REQUESTHASH));\n String sessionId = ((String)MDC.get(RequestLifeCycleFilter.MDC_KEY_SESSION_ID));\n String requestUrl = request.getRequestURL().toString();\n String reqQuery = request.getQueryString();\n requestUrl += (reqQuery != null ? \"?\" + reqQuery : \"\");\n if (requestUrl.length()> 2000)\n requestUrl = requestUrl.substring(0, 2000);\n String bindingSetName = wrsLogEvent.getBindingSetName();\n if (bindingSetName != null && bindingSetName.length()> 255)\n bindingSetName = bindingSetName.substring(0, 255);\n String requestXML = wrsLogEvent.getRequestDoc()!=null ? Utils.serializeElement(wrsLogEvent.getRequestDoc()) : null;\n\n // log access\n if(AccessSqlLogger.getInstance().isEnabled()) {\n final AccessSqlLogger.LogRecord recordAccess = new AccessSqlLogger.LogRecord(\n sessionId\n , requestUrl\n , pageHash\n , requestHash\n , bindingSetName\n , requestXML\n , wrsLogEvent.getRowCount()\n , wrsLogEvent.getValueCount()\n , wrsLogEvent.getRsStartTime()\n , wrsLogEvent.getRsEndTime()\n , wrsLogEvent.getWriteDuration()\n , wrsLogEvent.getExecuteDuration()\n );\n AccessSqlLogger.getInstance().process(recordAccess);\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"public void log(Request request, Reply reply, int nbytes, long duration) {\n Client client = request.getClient();\n long date = reply.getDate();\n String user = (String) request.getState(AuthFilter.STATE_AUTHUSER);\n URL urlst = (URL) request.getState(Request.ORIG_URL_STATE);\n String requrl;\n if (urlst == null) {\n URL u = request.getURL();\n if (u == null) {\n requrl = noUrl;\n } else {\n requrl = u.toExternalForm();\n }\n } else {\n requrl = urlst.toExternalForm();\n }\n StringBuffer sb = new StringBuffer(512);\n String logs;\n int status = reply.getStatus();\n if ((status > 999) || (status < 0)) {\n status = 999;\n }\n synchronized (sb) {\n byte ib[] = client.getInetAddress().getAddress();\n if (ib.length == 4) {\n boolean doit;\n edu.hkust.clap.monitor.Monitor.loopBegin(349);\nfor (int i = 0; i < 4; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(349);\n{\n doit = false;\n int b = ib[i];\n if (b < 0) {\n b += 256;\n }\n if (b > 99) {\n sb.append((char) ('0' + (b / 100)));\n b = b % 100;\n doit = true;\n }\n if (doit || (b > 9)) {\n sb.append((char) ('0' + (b / 10)));\n b = b % 10;\n }\n sb.append((char) ('0' + b));\n if (i < 3) {\n sb.append('.');\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(349);\n\n } else {\n sb.append(client.getInetAddress().getHostAddress());\n }\n sb.append(\" - \");\n if (user == null) {\n sb.append(\"- [\");\n } else {\n sb.append(user);\n sb.append(\" [\");\n }\n dateCache(date, sb);\n sb.append(\"] \\\"\");\n sb.append(request.getMethod());\n sb.append(' ');\n sb.append(requrl);\n sb.append(' ');\n sb.append(request.getVersion());\n sb.append(\"\\\" \");\n sb.append((char) ('0' + status / 100));\n status = status % 100;\n sb.append((char) ('0' + status / 10));\n status = status % 10;\n sb.append((char) ('0' + status));\n sb.append(' ');\n if (nbytes < 0) {\n sb.append('-');\n } else {\n sb.append(nbytes);\n }\n if (request.getReferer() == null) {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"-\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"-\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n } else {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n }\n sb.append('\\n');\n logs = sb.toString();\n }\n logmsg(logs);\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(response.toString());\n }",
"public void setupLoggingEndpoint() {\n HttpHandler handler = (httpExchange) -> {\n httpExchange.getResponseHeaders().add(\"Content-Type\", \"text/html; charset=UTF-8\");\n httpExchange.sendResponseHeaders(200, serverLogsArray.toJSONString().length());\n OutputStream out = httpExchange.getResponseBody();\n out.write(serverLogsArray.toJSONString().getBytes());\n out.close();\n };\n this.endpointMap.put(this.loggingApiEndpoint, this.server.createContext(this.loggingApiEndpoint));\n this.setHandler(this.getLoggingApiEndpoint(), handler);\n System.out.println(\"Set handler for logging\");\n this.endpointVisitFrequency.put(this.getLoggingApiEndpoint(), 0);\n }",
"@Override\n public void onResponse(String response) {\n Log.d(DEBUG_TAG, \"Response is: \"+ response);\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n\n response.setContentType(\"text/html\");\n PrintWriter writer = response.getWriter(); \n writer.println(\"<html>\");\n writer.println(\"<head>\");\n writer.println(\"<title>Server Error Log Page</title>\");\n writer.println(\"</head>\");\n writer.println(\"<body bgcolor=white>\");\n writer.println(\"Server Error Logs: </br>\");\n String content = HttpServerUtils.getFileContent(HttpServer.errorLog);\n writer.println(content);\n writer.println(\"</body>\");\n writer.println(\"</html>\");\n }",
"@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }",
"public static void log(LoanResponse loanResponse) {\n }",
"public void addResponseMessage(Node response, String message)\r\n\t{\r\n\r\n\t}",
"private void sendInternalErrorResponse(HttpResponse response,\n\t\t\tString answerMessage, String logMessage) {\n\t\tresponse.clearContent();\n\t\tresponse.setContentType( \"text/plain\" );\n\t\tresponse.setStatus( HttpResponse.STATUS_INTERNAL_SERVER_ERROR );\n\t\tresponse.println ( answerMessage );\n\t\tconnector.logMessage ( logMessage );\n\t}",
"@Override\n public void onResponse(String response) {\n loadSentMessages();\n }",
"private void printResponse(ResponseEntity responseEntity){\n logger.info(JsonUtil.toJson(responseEntity));\n }",
"private void log(String url, String headers, String body, String response, Date startTime, Date endTime) {\n\n TranslatorLog translatorLog = new TranslatorLog();\n translatorLog.setId(GeneratorKit.getUUID());\n translatorLog.setUrl(url);\n translatorLog.setHeaders(headers);\n translatorLog.setBody(body);\n translatorLog.setResponse(response);\n translatorLog.setStartTime(startTime);\n translatorLog.setEndTime(endTime);\n translatorLogMapper.insertSelective(translatorLog);\n }",
"@Override\r\n\tpublic void service(Request request,Response response) {\n\t\tresponse.print(\"lalaa\");\r\n\r\n\t\t\r\n\t}",
"public static void printResponse(String response)\n\t{\n\t\n\t}",
"@Override\n\t\t\tpublic void handle(Response response) throws Exception\n\t\t\t{\n\t\t\t\tif(response ==null){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(response.getStatusCode()==200){\n\t\t\t\t\tSystem.out.println(\"push seccuess\");\n\t\t\t\t}\n\t\t\t\t\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\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\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\tSystem.out.println(arg0);\n\t\t\t\t\t\n\t\t\t\t}",
"private void sendResponse(HttpServletResponse response, String text) {\n try (PrintWriter pw = response.getWriter()) {\n pw.println(text);\n } catch (IOException e) {\n log.error(e);\n }\n }",
"@Override\n public void saveToResponseAdditional(ActionResponse response) {\n }",
"public void addRequestToServerLogs(HttpExchange httpExchange, long id) {\n JSONObject object = new JSONObject();\n object.put(\"path\", httpExchange.getHttpContext().getPath());\n object.put(\"client_ip\", httpExchange.getRemoteAddress().getAddress().toString());\n object.put(\"log_time\", LocalDateTime.now().toString());\n object.put(\"type\", \"request\");\n object.put(\"id\", id);\n object.put(\"log_id\", this.logId);\n ++logId;\n serverLogsArray.add(object);\n }",
"private void clientResponse(String msg) {\n JSONObject j = new JSONObject();\n j.put(\"statuscode\", 200);\n j.put(\"sequence\", ++sequence);\n j.put(\"response\", new JSONArray().add(msg));\n output.println(j);\n output.flush();\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}\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\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}\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}",
"public static void sendResponse(SpRTResponse resp, Logger l, Socket s, OutputStream out) throws NullPointerException, SpRTException{\n\t\t//Send response\n\t\tresp.encode(out);\n\t\t//Message posted to log\n\t\tString msgLog = \"Sent Response: \" + s.getInetAddress() + \":\" + s.getPort() \n\t\t\t\t+ \"-\" + Thread.currentThread().getId() + \" Sent: \" + resp;\n\t\t//Log response\n\t\tl.log(Level.INFO, msgLog + System.getProperty(\"line.separator\"));\n\t}",
"@Override\n public final void accept(PutRecordResponse response, Throwable exception) {\n if (exception != null) {\n failedRequestCount++;\n appender.addError(\"Failed to publish a log entry to kinesis using appender: \" + appenderName, exception);\n } else {\n successfulRequestCount++;\n }\n }",
"protected String logStatus(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {\n StringBuilder msg = new StringBuilder();\n msg.append(\"< status: [\");\n if (responseContext.getStatusInfo() != null) {\n msg.append(responseContext.getStatusInfo().getStatusCode());\n msg.append(\"]; family: [\").append(responseContext.getStatusInfo().getFamily());\n msg.append(\"]; reasonPhrase: [\").append(responseContext.getStatusInfo().getReasonPhrase()).append(\"]\");\n }\n msg.append(\"]\\n\");\n return msg.toString();\n }",
"@Override\r\n\t\t\tpublic void onResponse(Call<LogDataModel> call, Response<LogDataModel> response) {\n\t\t\t\tif(response.code() !=200) {\r\n\t\t\t\t\tSystem.out.println(\"Error in Connection\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString value= \"\";\r\n\t\t\t\tvalue+=\"ID: \" + response.body().getId();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Data: \\n \" + value);\r\n\t\t\t}",
"public boolean hasResponseLog() {\n return result.hasResponseLog();\n }",
"Response<Void> logCustomStat(int index);",
"public void onResponse(Response response) throws Exception;",
"@Override\n public void sendResponse(final Response response) {\n\n }",
"protected final void log(String msg)\r\n {\r\n Debug.println(\"Server: \" + msg);\r\n }",
"@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }",
"void onResponse(String response, int requestId);",
"@Override\n public void onResponse(Response response) throws IOException {\n }",
"@Override\n public void onResponse(String response) {\n Log.i(\"Checking\", response + \" \");\n if(new ServerReply(response).getStatus())\n {\n Toast.makeText(context,new ServerReply(response).getReason(),Toast.LENGTH_LONG).show();\n }\n\n }",
"void sendResponseMessage(HttpResponse response) throws IOException;",
"private void writeResponse(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {\n\t\tresponse.setContentType(\"text/html\");\n\t\tresponse.setCharacterEncoding(\"utf-8\");\n\t\tPrintWriter pw = response.getWriter();\n\t\tpw.print(\"This is a CQ5 Response ... \");\n\t\tpw.print(getPageContent(request, \"/content/helloworld\"));\n\t\tpw.flush();\n\t\tpw.close();\n\t}",
"public void setResponse(final String response) {\n\t\thandler.response = response;\n\t}",
"@Override\n public void onSuccess(Response response) {\n if (Responses.isServerErrorRange(response)\n || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) {\n OptionalInt next = incrementHostIfNecessary(pin);\n instrumentation.receivedErrorStatus(pin, channel, response, next);\n } else {\n instrumentation.successfulResponse(channel.stableIndex());\n }\n }",
"public void addMessage(Response response)\n {\n if (response == null)\n {\n //leave a mark to skip a message\n messageSequence.add(false);\n }\n else\n messageSequence.add(response);\n }",
"Response<Void> logApplicationStart(String uniqueIdentifier);",
"void writeTo(InternalResponse<?> response, InternalRequest<?> request);",
"private void writeResponseLine(final DataOutput out) throws IOException {\n out.writeBytes(HTTP_VERSION);\n out.writeBytes(SP);\n out.writeBytes(code + \"\");\n out.writeBytes(SP);\n if (responseString != null) {\n out.writeBytes(responseString);\n }\n out.writeBytes(CRLF);\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}",
"void logHTTPRequest(HttpServletRequest request, Logger logger);",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"private ACLMessage respondToLogMessage(ACLMessage request, Action a) {\n\t\t\n\t\tLogMessage logMessage = (LogMessage) a.getAction();\t\t\n\t\tString message = logMessage.getMessage();\n\t\tgetLogger().log(Level.INFO, message);\n\t\t\n\t\treturn null;\n\t}",
"public static void postResponseEvent(NginxRequest req, NginxResponse resp) {\n\t\tif (Thread.currentThread() == NGINX_MAIN_THREAD) {\n\t\t\thandleResponse(req.nativeRequest(), resp);\n\t\t}else {\n\t\t\tlong r = req.nativeRequest();\n\t\t\tWorkerResponseContext ctx = new WorkerResponseContext(r, resp, resp.buildOutputChain(r));\n\t\t\tsavePostEventData(r, ctx);\n\t\t\tngx_http_clojure_mem_post_event(r);\n\t\t}\n\t}",
"@Override\n\tpublic void WriteResponseTime() {\n\t\ttry (FileOutputStream out = new FileOutputStream(responseTimeFileStr, true)) {\n\t\t\tString responseStr = \"Using a programmer-managed byte-array of \" + bufferSize + \"\\n\";\n\t\t\tresponseStr += \"Response Time: \" + elapsedTime / 1000000.0 + \" msec\\n\\n\";\n\t\t\tout.write(responseStr.getBytes());\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"interface Response {\n void send(HttpServletRequest request, HttpServletResponse response, TreeLogger logger)\n throws IOException;\n}",
"public String viewResponse(Response response) {\r\n this.currentResponse = response;\r\n return \"viewResponse\";\r\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_UPLOAD;\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}",
"protected synchronized void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain;charset=UTF-8\");\n String remoteHost = request.getRemoteHost();\n String localhost = request.getLocalName();\n String localIP = request.getLocalAddr();\n\n\n PrintWriter out = response.getWriter();\n try {\n out.println(\"healthy=true\");\n out.println(\"ip=\" + localIP);\n out.println(\"host=\" + localhost);\n out.println(\"client=\" + remoteHost);\n if (lastHeathCheck != null) {\n out.println(\"lastCheck=\" + sdf.format(lastHeathCheck));\n out.println(\"lastCheckClient=\" + lastCheckClient);\n }\n\n } finally {\n if (!\"true\".equals(request.getParameter(\"nolog\"))) {\n lastHeathCheck = new Date();\n lastCheckClient = remoteHost;\n }\n out.close();\n }\n }",
"protected void logError( HttpServletRequest req, HttpServletResponse resp, Exception ex, String str ) {\r\n\ttry {\r\n\t StringBuffer sb = new StringBuffer();\r\n\t sb.append(\"\\n---------- Gateway error:\\n\");\r\n\t sb.append(\"Error message: \" + str + \"\\n\");\r\n\t sb.append(\"Request method: \" + req.getMethod() + \"\\n\");\r\n\t sb.append(\"Query string: \" + req.getQueryString() + \"\\n\");\r\n\t sb.append(\"Content length: \" + req.getContentLength() + \"\\n\");\r\n\t sb.append(\"Cookies: ( session info )\\n\");\r\n\t Cookie[] cookies = req.getCookies();\r\n\t if (cookies == null || cookies.length == 0)\r\n\t\tsb.append(\"No cookies in the HTTP request\\n\");\r\n\t else {\r\n\t\tfor (int i = 0; i < cookies.length; i++) {\r\n\t\t sb.append(\"\\tName: \" + cookies[i].getName() + \"\\t\" + \"Value: \" + cookies[i].getValue() + \"\\n\");\r\n\t\t}\r\n\t }\r\n\t sb.append(\"\\n\");\r\n\t m_ctx.log( sb.toString(), ex );\r\n\t} catch (Exception e) {\r\n\t System.err.println(\"Error logging a message\");\r\n\t}\r\n }",
"@Override\n\tpublic void WriteResponseTime() {\n\t\ttry (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(responseTimeFileStr, true))) {\n\t\t\tString responseStr = \"Using Buffered Stream with a Byte Size of \" + bufferSize + \"\\n\";\n\t\t\tresponseStr += \"Response Time: \" + elapsedTime / 1000000.0 + \" msec\\n\\n\";\n\t\t\tout.write(responseStr.getBytes());\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"protected void sendResponseMessage(Response response) {\n\t\tsendMessage(obtainMessage(HttpConsts.REQUEST_SUCCESS, response));\n\t}",
"@Override\r\n public void onResponse(String response) {\n button.setText(\"Response is: \" + response);\r\n Log.i(NAME, response);\r\n }",
"void responseSent( C conn ) ;",
"public synchronized void addResponse( Serializable o ) {\n if ( o instanceof MessageEvent ) {\n MessageEvent event = (MessageEvent) o ;\n event.setSeqId( numSent );\n }\n responses.add( o ) ;\n numSent ++ ;\n\n // Toggle the respond changed.\n if ( !responseChanged ) {\n responseChanged = true ;\n }\n }",
"@Override\n public void onResponse(String response) {\n }",
"public static void recv( String response ) {\n\t\tLog.v(TAG,\"get response: \" + response );\n\t}",
"@Override\n public void onResponse(String response) {\n finalData(response);\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(Call call, final Response response) throws IOException {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n try {\n// responseText.setText(response.body().string());\n Log.d(\"Flask Server\",response.body().string());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n });\n }",
"protected void handleSuccessMessage(Response response) {\n\t\tonRequestResponse(response);\n\t}",
"private void send(HttpServletResponse response, int status, String message) throws IOException {\n\t\tresponse.setStatus(status);\n\t\tresponse.getOutputStream().println(message);\n\t}",
"protected abstract void output(DavServletResponse response)\n throws IOException;",
"public void addElement(CharArrayWriter buf, Date date, Request request, Response response, long time)\n/* */ {\n/* 411 */ buf.append(ExtendedAccessLogValve.wrap(urlEncode(request.getParameter(this.parameter))));\n/* */ }",
"public static void actionLogPostProcessor(ResponseStatus statusCode, String responseCode, String responseDescription,\n boolean isServiceMetricLog) {\n actionLogPostProcessor(statusCode, responseCode, responseDescription, isServiceMetricLog, System::currentTimeMillis);\n }",
"public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\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 }",
"public Response onResponse(Response response) {\n\t\tlog.info(\"chatbot shouting\");\n\n\t\t// String r = resizeImage(response.msg);\n\t\tString r = response.msg;\n\n\t\tconns.addConnection(\"mr.turing\", \"mr.turing\");\n\n\t\tShout shout = createShout(TYPE_USER, r);\n\t\tshout.from = \"mr.turing\";\n\t\tMessage out = createMessage(\"shoutclient\", \"onShout\", Encoder.toJson(shout));\n\t\tonShout(\"mr.turing\", out);\n\t\treturn response;\n\t}",
"@Override\n public void onResponse(String response) {\n }",
"public void requestAppendLog(AppendLogCommand appendLogCmd) throws PandaException {\r\n\r\n //logger.info(\"request Append in ,UUID : {}\", cmd.getUuid());\r\n // uuid is handled ?\r\n \r\n if(this.counter.size() > 300) return ;\r\n\r\n if (uuidHadRequest(appendLogCmd)) {\r\n\r\n\r\n return;\r\n }\r\n \r\n \r\n\r\n\r\n counter.initCmdCounter(appendLogCmd, corePeer.getMemberPeers().size());\r\n\r\n\r\n corePeer.getStore().appendCommand(appendLogCmd);// leader store\r\n\r\n \r\n leaderHandler.sendToAllFollowers(appendLogCmd);\r\n\r\n\r\n\r\n }",
"@Override\n public void onResponse(String response)\n {\n\n }",
"public void addToResponseHeader(String s) {\n\t\tif (!responseAdded) {\n\t\t\tthis.addedResponseHeaders = new ArrayList<String>();\n\t\t\tthis.responseAdded = true;\n\t\t}\n\t\tthis.addedResponseHeaders.add(s);\n\t}",
"@Override\n public void onResponse(String response) {\n mTextView.setText(\"Response is: \" + response);\n }",
"@Override\n\tpublic void sendResponse() {\n\t\t\n\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\tpublic void handleResponse() {\n\t\t\n\t}",
"public void get(HttpRequest request, HttpResponse response) {\n\t\tresponse.setStatus(HttpStatus.SERVER_ERROR_NOT_IMPLEMENTED);\n\t\tresponse.write(\" \");\n\t}",
"private void toLog(HttpUtils.HttpResult httpResult) {\n Log.d(DEBUG_REQUEST, \"request url: \" + url);\n Log.d(DEBUG_REQUEST, \"request envelope: \" + envelope);\n Log.d(DEBUG_REQUEST, \"request type: \" + requestType);\n if (httpResult != null) {\n Log.d(DEBUG_REQUEST, \"response code: \" + httpResult.getCode());\n Log.d(DEBUG_REQUEST, \"response envelope: \" + httpResult.getEnvelope());\n } else {\n Log.d(DEBUG_REQUEST, \"response null\");\n }\n }"
] |
[
"0.6953734",
"0.6776648",
"0.67246974",
"0.6463236",
"0.64563996",
"0.6435285",
"0.6414216",
"0.63686514",
"0.63686514",
"0.63619846",
"0.63135195",
"0.63070816",
"0.6284547",
"0.61960983",
"0.61503327",
"0.6114248",
"0.6060803",
"0.6045307",
"0.5988588",
"0.59878385",
"0.5982671",
"0.59681267",
"0.5959617",
"0.59414697",
"0.59127146",
"0.5887955",
"0.5885999",
"0.58826405",
"0.58589876",
"0.5839398",
"0.5836979",
"0.58276105",
"0.58202255",
"0.58142006",
"0.57943356",
"0.57823086",
"0.5773446",
"0.5757798",
"0.5743204",
"0.5733595",
"0.5719995",
"0.57088035",
"0.5691091",
"0.56910324",
"0.56904525",
"0.5683061",
"0.5666687",
"0.56605434",
"0.5657379",
"0.5653709",
"0.5641418",
"0.5634117",
"0.5628156",
"0.56251353",
"0.5608512",
"0.56024915",
"0.5601551",
"0.5587126",
"0.55739504",
"0.5567525",
"0.5567525",
"0.5567525",
"0.5564889",
"0.55602133",
"0.55434203",
"0.553996",
"0.55315566",
"0.5526179",
"0.55203557",
"0.5518083",
"0.5496581",
"0.548981",
"0.54746747",
"0.5466841",
"0.5466331",
"0.5455421",
"0.5435189",
"0.5435097",
"0.5434644",
"0.5433627",
"0.54301685",
"0.5430015",
"0.54264057",
"0.5415682",
"0.54118747",
"0.5410754",
"0.54047143",
"0.54047143",
"0.54047143",
"0.54012394",
"0.539908",
"0.53989637",
"0.5389481",
"0.53855515",
"0.5376621",
"0.53720236",
"0.5362709",
"0.5361743",
"0.53607935",
"0.5359988"
] |
0.6708667
|
3
|
Returns endpoint entry set
|
private Set<Map.Entry<String, Integer>> getEndpointFrequencyEntrySet() {
return endpointVisitFrequency.entrySet();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection getEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().find_element_user(ENDPOINTS$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public List<Endpoint> getEndpoints()\n\t\t{\n\t\t\treturn endpointsList;\n\t\t}",
"Map<String, String> getEndpointMap();",
"List<ManagedEndpoint> all();",
"public Map<Range, List<EndPoint>> getRangeToEndpointMap()\n {\n return ssProxy.getRangeToEndPointMap();\n }",
"public Set<AddressEntry> getEntry() {\n return entrySet;\n }",
"@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }",
"@Override\n\tpublic Set<ServerEndpointConfig> getEndpointConfigs(Set<Class<? extends Endpoint>> arg0) {\n\t\tSet<ServerEndpointConfig> result = new HashSet<>();\n//\t\tif (arg0.contains(EchoEndpoint.class)) {\n//\t\t\tresult.add(ServerEndpointConfig.Builder.create(\n//\t\t\t\t\tEchoEndpoint.class,\n//\t\t\t\t\t\"/websocket/echoProgrammatic\").build());\n//\t\t}\n\n\t\treturn result;\t\n\t}",
"private Future<List<Record>> getAllEndpoints() {\n Future<List<Record>> future = Future.future();\n discovery.getRecords(record -> record.getType().equals(HttpEndpoint.TYPE),\n future.completer());\n return future;\n }",
"public Vertex<V>[] getEndpoints() { return endpoints; }",
"HSet entrySet();",
"public Set<Map.Entry<String, List<String>>> entrySet()\r\n/* 431: */ {\r\n/* 432:592 */ return this.headers.entrySet();\r\n/* 433: */ }",
"public final String[] getEntryPoints() {\n return mEntryPoints;\n }",
"protected Set<Endpoint> getDiscoveredEndpoints() {\n return new HashSet<>(mDiscoveredEndpoints.values());\n }",
"private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}",
"public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset);",
"@Override\n public Set<Map.Entry<K, V>> entrySet() {\n return new EntrySet();\n }",
"public Set<EndpointInterface> getEndpointInterfaces() {\n return endpointInterfaces;\n }",
"public UMOEntryPointResolverSet getEntryPointResolverSet()\n {\n return entryPointResolverSet;\n }",
"Collection<? extends Service> getHost();",
"public Set<Map.Entry<String, Object>> entrySet()\n {\n return data.entrySet();\n }",
"EndpointDetails getEndpointDetails();",
"@Override\n public Set<Map.Entry<String,Pacote>> entrySet() {\n \n //resultado\n Set<Map.Entry<String,Pacote>> r = new HashSet<>();\n \n \n Pacote p;\n \n try {\n \n conn = Connect.connect();// abrir uma conecção\n \n // querie que obtem os dados para poder\n PreparedStatement stm = conn.prepareStatement(\"SELECT nomePacote, preco FROM Pacote WHERE visivel=TRUE;\");\n \n // agora executa a querie\n ResultSet rs = stm.executeQuery();\n \n //percorrer o resultado\n while (rs.next()) {\n p = new Pacote(rs.getString(\"nomePacote\"),rs.getDouble(\"preco\"));\n \n \n /*\n AGORA FALTA OS METUDOS PARA PREENCHER A LISTA DAS CONFIGURAÇÕES\n */\n \n this.addComponentes(p);\n \n \n \n r.add(new AbstractMap.SimpleEntry(p.getNome(),p));\n }\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn); // fechar a connecção\n }\n return r;\n }",
"public Set<E> getEdges();",
"public Object getTarget() {\n return this.endpoints;\n }",
"public Set entrySet() {\n\treturn new EntrySet(map.entrySet());\n }",
"protected Set<Endpoint> getConnectedEndpoints() {\n return new HashSet<>(mEstablishedConnections.values());\n }",
"@Override\n public List<RefsetEntry> getRefsetEntries() {\n return refsetEntries;\n }",
"@GET\n @Path(\"/endpoints\")\n @Produces(ApiOverviewRestEndpoint.MEDIA_TYPE_JSON_V1)\n @Cache\n Response getAvailableEndpoints(@Context final Dispatcher dispatcher);",
"public LinkedList<MapEntry<String, Integer>> entrySet(){\r\n return this.list;\r\n }",
"@Override\n\tpublic Set<Map.Entry<K, V>> entrySet() {\n\t\t// TODO\n\t\treturn new EntryView();\n\t}",
"public com.microsoft.schemas.xrm._2014.contracts.EndpointCollection addNewEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2014.contracts.EndpointCollection target = null;\r\n target = (com.microsoft.schemas.xrm._2014.contracts.EndpointCollection)get_store().add_element_user(ENDPOINTS$0);\r\n return target;\r\n }\r\n }",
"@Override\n\t\t\tpublic Set<java.util.Map.Entry<PathwayImpl, AnalysisResult>> entrySet() {\n\t\t\t\treturn null;\n\t\t\t}",
"Set<PinningService> getReplicaSet();",
"List<EndpointElement> findEndpoints(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String searchString,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;",
"public HashMap<String, Edge> getEdgeList () {return edgeList;}",
"@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 String getEndpoint() {\n return this.endpoint;\n }",
"public String getEndpoint() {\n return this.endpoint;\n }",
"public Set entrySet() {\n return map.entrySet();\n }",
"@Override\n public Set<Map.Entry<String,Componente>> entrySet() {\n \n //resultado\n Set<Map.Entry<String,Componente>> r = new HashSet<>();\n \n \n Componente c;\n \n try {\n \n conn = Connect.connect();// abrir uma conecção\n \n // querie que obtem os dados para poder\n PreparedStatement stm = conn.prepareStatement(\"SELECT nome, tipo, designacao, preco, stock FROM Componente WHERE visivel=TRUE;\");\n \n // agora executa a querie\n ResultSet rs = stm.executeQuery();\n \n //percorrer o resultado\n while (rs.next()) {\n c = new Componente(rs.getString(\"nome\"),rs.getString(\"tipo\"),rs.getString(\"designacao\"),rs.getDouble(\"preco\"),rs.getInt(\"stock\"));\n \n /*\n AGORA FALTA OS METUDOS PARA PREENCHER A LISTA DAS CONFIGURAÇÕES\n \n Agora temos de ter \n */\n \n this.adicionarIncompativeis(c);\n this.adicionarObrigatorias(c);\n\n \n r.add(new AbstractMap.SimpleEntry(c.getNome(),c));\n }\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn); // fechar a connecção\n }\n \n return r;\n }",
"public Object getEntries() {\n\t\t\treturn null;\n\t\t}",
"@Override\n public Set<Map.Entry<String,Administrador>> entrySet() {\n //resultado\n Set<Map.Entry<String,Administrador>> r = new HashSet<>();\n \n Administrador a;\n \n try {\n conn = Connect.connect();// abrir uma conecção\n // querie que obtem os dados para poder\n PreparedStatement stm = conn.prepareStatement(\"SELECT username, password FROM Administrador WHERE visivel=TRUE;\");\n // agora executa a querie\n ResultSet rs = stm.executeQuery();\n //percorrer o resultado\n while (rs.next()) {\n a = new Administrador(rs.getString(\"username\"),rs.getString(\"password\"));\n r.add(new AbstractMap.SimpleEntry(a.getId(),a));\n }\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n Connect.close(conn); \n }\n return r;\n }",
"public String endpoint() {\n return this.endpoint;\n }",
"public int endpointSetId() {\r\n\t\treturn getEntityId().getEndpointSetId();\r\n\t}",
"public void setEndpoints(String... endpoints) {\n this.endpoints = endpoints;\n }",
"Set<CyEdge> getExternalEdgeList();",
"@Override\n\tpublic Collection<IEdge<S>> getEdges()\n\t{\n\t\tfinal List<IEdge<S>> set = new ArrayList<>(map.size());\n\t\tfor (final Entry<S, Integer> entry : map.entrySet())\n\t\t{\n\t\t\tset.add(createEdge(entry.getKey(), entry.getValue()));\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(set);\n\t}",
"@Override\n public Set<Map.Entry<String, T>> entrySet() {\n Set<Map.Entry<String, T>> entrySet = new TreeSet<>();\n for (Map.Entry<String, Map.Entry<String, T>> v : entries.entrySet()) {\n entrySet.add(new Entry<>(v));\n }\n return entrySet;\n }",
"public Set getSendAltLocsSet()\r\n {\r\n if ( sendAltLocSet == null )\r\n {// TODO2 use something like a LRUMap. But current LRUMap uses maxSize\r\n // as initial hash size. This would be much to big in most cases!\r\n // Currently this HashSet has no size boundry. We would need our own\r\n // LRUMap implementation with a low initial size and a different max size.\r\n sendAltLocSet = new HashSet();\r\n }\r\n return sendAltLocSet;\r\n }",
"@Override\n\tpublic List<EndpointEntity> getAllChild() {\n\t\treturn null;\n\t}",
"Set<URI> fetchAllUris(ServicePath service);",
"public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 481 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }",
"public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 217 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }",
"public EndpointService endpointService() {\n return this.endpointService;\n }",
"public int getEntriesSet() {\r\n return entriesSet;\r\n }",
"java.util.List<com.google.cloud.aiplatform.v1beta1.IndexEndpoint> \n getIndexEndpointsList();",
"@Override\n\t\tpublic List<? extends MyHashMap.Entry<K, V>> getEntries() {\n\t\t\treturn e;\n\t\t}",
"public Set<Entry<K, V>> entrySet() {\n\t\tthrow new UnsupportedOperationException();\n\t}",
"List<EndpointElement> getEndpointsByName(String userId,\n String assetManagerGUID,\n String assetManagerName,\n String name,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;",
"public Set<Map.Entry<String, Collection<V>>> entrySet() {\n return map.entrySet();\n }",
"public abstract List<OriginEntryFull> getGeneratedOriginEntries();",
"public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 315 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }",
"@Override\n public String toString() {\n return endpoint;\n }",
"@DataProvider(name = \"tc_EndPointTypes\")\n public Object[][] dataTable_tc_EndPointTypes() { \t\n \treturn this.getDataTable(\"URLs\",\"EndPointTypes\");\n }",
"public Set<java.util.Map.Entry<E, V>> entrySet() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Set<java.util.Map.Entry<String, String>> entrySet() {\n\t\treturn null;\n\t}",
"public HdfsLeDescriptors findEndpoint() {\n try {\n// return em.createNamedQuery(\"HdfsLeDescriptors.findEndpoint\", HdfsLeDescriptors.class).getSingleResult();\n List<HdfsLeDescriptors> res = em.createNamedQuery(\n \"HdfsLeDescriptors.findEndpoint\", HdfsLeDescriptors.class).\n getResultList();\n if (res.isEmpty()) {\n return null;\n } else {\n return res.get(0);\n }\n } catch (NoResultException e) {\n return null;\n }\n }",
"public Entry[] getEntries()\n\t{\n\t\treturn entries;\n\t}",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic Iterable<Entry<K, V>> entrySet() {\n\t/* TCJ\n\t * Iterates through potentially entire collection: O(n)\n\t */\n\t\treturn snapShot(0, null);\n\t}",
"public Set<Map.Entry<K, V>> entrySet() {\r\n return new CacheEntrySet<K, V>(this);\r\n }",
"@java.lang.Override\n public boolean hasAddressList() {\n return endpointConfigCase_ == 1;\n }",
"public Map getESBComponents()\n\t{\t\n\t\tMap endPoints = (Map)cache( \"components\" );\t\t\n\t\t\n\t\tif ( endPoints == null )\n\t\t{\n\t\t\tendPoints = new HashMap();\n\t\t\tCollection names \t= getESBComponentNames();\n\t\t\tIterator iter\t\t= names.iterator();\n\t\t\tString name\t\t\t= null;\n\t\t\t\t\n\t\t\twhile( iter.hasNext() )\n\t\t\t{\n\t\t\t\tname = (String)iter.next();\n\t\t\t\tendPoints.put( name, getESBComponentData( name ) );\n\t\t\t}\n\t\t\t\n\t\t\tcache( \"components\", endPoints );\n\t\t}\n\t\t\n\t\treturn( endPoints );\n\t}",
"List<EndpointElement> getEndpointsForAssetManager(String userId,\n String assetManagerGUID,\n String assetManagerName,\n int startFrom,\n int pageSize,\n Date effectiveTime,\n boolean forLineage,\n boolean forDuplicateProcessing) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;",
"public Set<ServiceName> getSet() {\n return new HashSet<ServiceName>(set);\n }",
"@Override\r\n\tpublic Collection<TreatmentTable2> entrySet() {\n\t\treturn null;\r\n\t}",
"public List<EndpointElement> getEndpointsByName(String name,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n return connectionManagerClient.getEndpointsByName(userId, name, startFrom, pageSize);\n }",
"@java.lang.Override\n public boolean hasAddressList() {\n return endpointConfigCase_ == 1;\n }",
"public Set getDirectoryEntrySet() {\r\n\t\treturn new HashSet(entryMap.values());\r\n\t}",
"public EndPoint getEndPoint() {\r\n\t\treturn endPoint;\r\n\t}",
"public AddressSetView getAddressSet() {\n\t\treturn new AddressSet(baseAddress, getEndAddress());\n\t}",
"public Collection< EDataT > edgeData();",
"@java.lang.Override\n public io.envoyproxy.envoy.data.dns.v3.DnsTable.AddressList getAddressList() {\n if (endpointConfigCase_ == 1) {\n return (io.envoyproxy.envoy.data.dns.v3.DnsTable.AddressList) endpointConfig_;\n }\n return io.envoyproxy.envoy.data.dns.v3.DnsTable.AddressList.getDefaultInstance();\n }",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\treturn null;\n\t}",
"public Iterable<Entry<K, V>> entrySet() {\n ArrayList<Entry<K, V>> buffer = new ArrayList<>();\n for (int h = 0; h < capacity; h++)\n if (!isAvailable(h)) buffer.add(table[h]);\n return buffer;\n }",
"public DEdge[] getEdges(){\n return listOfEdges;\n }",
"public RangesByEndpoint getAddressReplicas(TokenMetadata metadata)\n {\n RangesByEndpoint.Builder map = new RangesByEndpoint.Builder();\n\n for (Token token : metadata.sortedTokens())\n {\n Range<Token> range = metadata.getPrimaryRangeFor(token);\n for (Replica replica : calculateNaturalReplicas(token, metadata))\n {\n // LocalStrategy always returns (min, min] ranges for it's replicas, so we skip the check here\n Preconditions.checkState(range.equals(replica.range()) || this instanceof LocalStrategy);\n map.put(replica.endpoint(), replica);\n }\n }\n\n return map.build();\n }",
"@JsonGetter(\"entries\")\r\n public List<V1SettlementEntry> getEntries() {\r\n return entries;\r\n }",
"public abstract Set<Map.Entry<K, V>> entrySet();",
"public Object[] entrySet() {\n MyStack<Object> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current);\n current = current.getNext();\n }\n result.push(current);\n }\n }\n return result.toArray();\n }",
"public ItemCollection<Appointment> getAdjacentMeetings()\n\t\t\tthrows ServiceLocalException {\n\t\treturn (ItemCollection<Appointment>) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(\n\t\t\t\t\t\tAppointmentSchema.AdjacentMeetings);\n\t}",
"public int entries(){\n\t\treturn routeTable.size();\n\t}",
"@Override\r\n\tpublic Vector getEntries() throws NotesApiException {\n\t\treturn null;\r\n\t}",
"public String endpointUri() {\n return this.endpointUri;\n }",
"@Override\n public Collection<? extends IHyperEdge> getHyperEdges() {\n\n return new LinkedList<>(\n Collections.unmodifiableCollection(this.hyperEdgeMap.values()));\n }",
"public Map<String, String> assignedEndpointKey() {\n return this.assignedEndpointKey;\n }",
"public static EndpointMBean getAddEndpointMBean()\n {\n return new Endpoint(\n \"http://localhost:9080/WebServiceProject/CalculatorService\");\n }"
] |
[
"0.67622906",
"0.67508274",
"0.6571922",
"0.6548072",
"0.6544022",
"0.6469792",
"0.64612985",
"0.6325752",
"0.6268305",
"0.62103623",
"0.6131833",
"0.60755855",
"0.6060813",
"0.6060807",
"0.5966968",
"0.5921207",
"0.5913898",
"0.58386284",
"0.5821597",
"0.58134884",
"0.58108944",
"0.5793149",
"0.5782667",
"0.57771736",
"0.5739179",
"0.5730954",
"0.5707773",
"0.5705577",
"0.57053524",
"0.5697403",
"0.5696662",
"0.5693785",
"0.5673046",
"0.5668718",
"0.56660444",
"0.5649764",
"0.56374305",
"0.5606403",
"0.5606403",
"0.56028366",
"0.5589683",
"0.5587589",
"0.5587397",
"0.55749714",
"0.55613077",
"0.5561216",
"0.55544233",
"0.5532793",
"0.5532752",
"0.5528719",
"0.5528582",
"0.55240005",
"0.55225766",
"0.5521354",
"0.5519357",
"0.55058825",
"0.5498849",
"0.54968154",
"0.5491318",
"0.5481592",
"0.5476914",
"0.54647225",
"0.5462567",
"0.54557085",
"0.543891",
"0.54330325",
"0.54312396",
"0.54094744",
"0.5407526",
"0.54033226",
"0.539538",
"0.5392095",
"0.53738403",
"0.53716964",
"0.536499",
"0.5346201",
"0.53396106",
"0.5338958",
"0.53294724",
"0.5329225",
"0.53197104",
"0.531826",
"0.5315522",
"0.5304431",
"0.5304431",
"0.5304431",
"0.5304431",
"0.5296326",
"0.5295292",
"0.5291053",
"0.5290923",
"0.5288657",
"0.52885836",
"0.52799976",
"0.5278478",
"0.5277707",
"0.5247974",
"0.5242689",
"0.52406555",
"0.5235686"
] |
0.7070647
|
0
|
TODO Autogenerated method stub
|
@Override
public List<Integer> queryAllGroupId(int groupId) {
List<Integer> inList=new ArrayList<Integer>();
List<BmsGroupEntity> list=selectList("com.jiuyescm.bms.base.group.mapper.BmsGroupMapper.queryAllGroupId", groupId);
for(BmsGroupEntity entity:list){
if(groupId!=entity.getId()){
inList.add(entity.getId());
}
}
return inList;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public BmsGroupEntity queryOne(Map<String, Object> condition) {
return (BmsGroupEntity) selectOne("com.jiuyescm.bms.base.group.mapper.BmsGroupMapper.queryOne", condition);
}
|
{
"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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.